[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1812080828160.2909@hadrien>
Date: Sat, 8 Dec 2018 08:28:49 +0100 (CET)
From: Julia Lawall <julia.lawall@...6.fr>
To: Jacek Anaszewski <jacek.anaszewski@...il.com>
cc: Jyri Sarha <jsarha@...com>, Peter Ujfalusi <peter.ujfalusi@...com>,
Pavel Machek <pavel@....cz>, linux-leds@...r.kernel.org,
linux-kernel@...r.kernel.org, kbuild-all@...org
Subject: Re: [PATCH] leds: tlc591xx: fix device_node_continue.cocci warnings
(fwd)
On Fri, 7 Dec 2018, Jacek Anaszewski wrote:
> Hi Julia,
>
> Thank you for the patch, but it doesn't apply to LED tree.
>
> The patch causing the problem is out-of-LED-tree.
OK, I guess that the patch is in a TI-specific tree, given the name.
Thanks for looking into it.
julia
>
> Best regards,
> Jacek Anaszewski
>
> On 12/6/18 9:28 PM, Julia Lawall wrote:
> > Hello,
> >
> > The code seems to be wrong in several ways. If the continue is wanted,
> > the of_node_put is not needed; it will happen on the next iteration. If
> > the continue is not wanted, the of_node_put is needed, and the continue
> > should be dropped.
> >
> > julia
> >
> > ---------- Forwarded message ----------
> > Date: Thu, 6 Dec 2018 19:48:54 +0800
> > From: kbuild test robot <lkp@...el.com>
> > To: kbuild@...org
> > Cc: Julia Lawall <julia.lawall@...6.fr>
> > Subject: [PATCH] leds: tlc591xx: fix device_node_continue.cocci warnings
> >
> > CC: kbuild-all@...org
> > TO: Jyri Sarha <jsarha@...com>
> > CC: Peter Ujfalusi <peter.ujfalusi@...com>
> > CC: Jacek Anaszewski <jacek.anaszewski@...il.com>
> > CC: Pavel Machek <pavel@....cz>
> > CC: linux-leds@...r.kernel.org
> > CC: linux-kernel@...r.kernel.org
> >
> > From: kbuild test robot <fengguang.wu@...el.com>
> >
> > drivers/leds/leds-tlc591xx.c:342:3-14: ERROR: probable double put.
> >
> > 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
> >
> > Fixes: 7b2d34aaede7 ("leds: tlc591xx: Add gpio output support")
> > CC: Jyri Sarha <jsarha@...com>
> > Signed-off-by: kbuild test robot <fengguang.wu@...el.com>
> > ---
> >
> > tree: https://github.com/omap-audio/linux-audio peter/ti-linux-4.19.y/wip
> > head: 838f24e2deaf1229002bd6555eb7e889b09ac1f9
> > commit: 7b2d34aaede727b4abfc78061bbd2202fcd92bc8 [62/67] leds: tlc591xx: Add
> > gpio output support
> > :::::: branch date: 26 hours ago
> > :::::: commit date: 26 hours ago
> >
> > Please take the patch only if it's a positive warning. Thanks!
> >
> > leds-tlc591xx.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > --- a/drivers/leds/leds-tlc591xx.c
> > +++ b/drivers/leds/leds-tlc591xx.c
> > @@ -339,7 +339,6 @@ tlc591xx_probe(struct i2c_client *client
> > for_each_child_of_node(np, child) {
> > err = of_property_read_u32(child, "reg", ®);
> > if (err) {
> > - of_node_put(child);
> > continue;
> > return err;
> > }
> >
>
>
>
Powered by blists - more mailing lists