Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1698022
| From | Gilad Ben-Yossef <gilad@benyossef.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 1/3] staging: ccree: Replace kzalloc with devm_kzalloc |
| Date | 2017-07-27 16:30 +0200 |
| Message-ID | <u7RXz-7d4-5@gated-at.bofh.it> (permalink) |
| References | <u4dtE-51t-17@gated-at.bofh.it> <u4yop-1lh-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Jul 18, 2017 at 1:58 PM, <sunil.m@techveda.org> wrote: > From: Suniel Mahesh <sunil.m@techveda.org> > > It is recommended to use managed function devm_kzalloc, which > simplifies driver cleanup paths and driver code. > This patch does the following: > (a) replace kzalloc with devm_kzalloc. > (b) drop kfree(), because memory allocated with devm_kzalloc() is > automatically freed on driver detach, otherwise it leads to a double > free. > (c) remove unnecessary blank lines. > > Signed-off-by: Suniel Mahesh <sunil.m@techveda.org> > --- > Changes for v2: > > - Changes done as suggested by Greg-KH. > - Rebased on top of next-20170718. > --- > Note: > > - Patch was tested and built(ARCH=arm) on next-20170718. > No build issues reported, however it was not tested on > real hardware. I verified the patch set on CrytoCell HW and it's fine. Unfortunately, my coding style fixes patch set made two of these to fail to apply. Following up is a rebased patch. There are no changes except resolving conflicts. -- Gilad Ben-Yossef Chief Coffee Drinker "If you take a class in large-scale robotics, can you end up in a situation where the homework eats your dog?" -- Jean-Baptiste Queru
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2 1/3] staging: ccree: Replace kzalloc with devm_kzalloc sunil.m@techveda.org - 2017-07-18 13:00 +0200 [PATCH v2 3/3] staging: ccree: Use platform_get_irq and devm_request_irq sunil.m@techveda.org - 2017-07-18 13:00 +0200 [PATCH v2 2/3] staging: ccree: Convert to devm_ioremap_resource for map, unmap sunil.m@techveda.org - 2017-07-18 13:10 +0200 Re: [PATCH v2 1/3] staging: ccree: Replace kzalloc with devm_kzalloc Gilad Ben-Yossef <gilad@benyossef.com> - 2017-07-27 16:30 +0200
csiph-web