Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1548374
| From | Jacek Anaszewski <jacek.anaszewski@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] leds: pca9532: fix device_node_continue.cocci warnings |
| Date | 2016-12-29 22:40 +0100 |
| Message-ID | <sTQAx-3wI-13@gated-at.bofh.it> (permalink) |
| References | <sTQhb-3qn-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Julia,
This patch doesn't apply to current for-next branch
of linux-leds.git.
Best regards,
Jacek Anaszewski
On 12/29/2016 10:10 PM, Julia Lawall wrote:
> Device node iterators put the previous value of the index variable, so an
> explicit put causes a double put.
>
> Generated by: scripts/coccinelle/iterators/device_node_continue.cocci
>
> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
>
> I haven't looked at the context in detail, but given the rule, I assume
> that there is an iterator, such as for_each_child_of_node, and these
> iterators do a put on each iteration, so none is needed in the loop body.
>
> tree: https://github.com/manabian/linux-lpc lpc18xx_43xx_devel
> head: 9ee5f58bbb16c08da223c4b4933457e0eb72268d
> commit: c58957273142be779f62c17fae389ce9c134139f [44/55] leds: pca9532: use
>
> leds-pca9532.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> --- a/drivers/leds/leds-pca9532.c
> +++ b/drivers/leds/leds-pca9532.c
> @@ -473,7 +473,6 @@ pca9532_of_populate_pdata(struct device
>
> res = of_property_read_u32(child, "reg", ®);
> if ((res != 0) || (reg >= maxleds)) {
> - of_node_put(child);
> continue;
> }
>
> @@ -484,8 +483,6 @@ pca9532_of_populate_pdata(struct device
> of_property_read_u32(child, "type", &pdata->leds[reg].type);
> of_property_read_string(child, "linux,default-trigger",
> &pdata->leds[reg].default_trigger);
> -
> - of_node_put(child);
> }
>
> return pdata;
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] leds: pca9532: fix device_node_continue.cocci warnings Julia Lawall <julia.lawall@lip6.fr> - 2016-12-29 22:20 +0100
Re: [PATCH] leds: pca9532: fix device_node_continue.cocci warnings Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2016-12-29 22:40 +0100
Re: [PATCH] leds: pca9532: fix device_node_continue.cocci warnings Julia Lawall <julia.lawall@lip6.fr> - 2016-12-29 22:50 +0100
Re: [PATCH] leds: pca9532: fix device_node_continue.cocci warnings Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2016-12-30 15:10 +0100
Re: [PATCH] leds: pca9532: fix device_node_continue.cocci warnings Julia Lawall <julia.lawall@lip6.fr> - 2016-12-30 17:30 +0100
csiph-web