Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1539801
| From | Robert Jarzmik <robert.jarzmik@free.fr> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V1] pinctrl:pxa:pinctrl-pxa2xx:- No need of devm functions |
| Date | 2016-12-10 10:20 +0100 |
| Message-ID | <sMLYZ-7Jp-11@gated-at.bofh.it> (permalink) |
| References | <sM81z-7fI-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Arvind Yadav <arvind.yadav.cs@gmail.com> writes: Hi Arvind, > In functions pxa2xx_build_functions, the memory allocated for > 'functions' is live within the function only. After the > allocation it is immediately freed with devm_kfree. There is > no need to allocate memory for 'functions' with devm function > so replace devm_kcalloc with kcalloc and devm_kfree with kfree. That's not very true : the "need" is to spare the "manual" kfree you're adding in your patch for one, and make it consistent with pxa2xx_build_groups() and pxa2xx_build_state() for two. Therefore I'm not very thrilled by this patch and unless it fixes a defect in the driver I'd rather not have it in. Cheers. -- Robert
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V1] pinctrl:pxa:pinctrl-pxa2xx:- No need of devm functions Arvind Yadav <arvind.yadav.cs@gmail.com> - 2016-12-08 15:40 +0100
Re: [PATCH V1] pinctrl:pxa:pinctrl-pxa2xx:- No need of devm functions Robin Murphy <robin.murphy@arm.com> - 2016-12-08 16:30 +0100
Re: [PATCH V1] pinctrl:pxa:pinctrl-pxa2xx:- No need of devm functions Robin Murphy <robin.murphy@arm.com> - 2016-12-08 16:30 +0100
Re: [PATCH V1] pinctrl:pxa:pinctrl-pxa2xx:- No need of devm functions Robert Jarzmik <robert.jarzmik@free.fr> - 2016-12-10 10:20 +0100
Re: [PATCH V1] pinctrl:pxa:pinctrl-pxa2xx:- No need of devm functions arvind Yadav <arvind.yadav.cs@gmail.com> - 2016-12-11 09:10 +0100
Re: [PATCH V1] pinctrl:pxa:pinctrl-pxa2xx:- No need of devm functions Linus Walleij <linus.walleij@linaro.org> - 2016-12-27 13:50 +0100
Re: [PATCH V1] pinctrl:pxa:pinctrl-pxa2xx:- No need of devm functions Robert Jarzmik <robert.jarzmik@free.fr> - 2016-12-29 08:30 +0100
Re: [PATCH V1] pinctrl:pxa:pinctrl-pxa2xx:- No need of devm functions Linus Walleij <linus.walleij@linaro.org> - 2016-12-30 14:10 +0100
csiph-web