Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1447487imu; Fri, 7 Dec 2018 23:30:25 -0800 (PST) X-Google-Smtp-Source: AFSGD/VFSaf4AtaxNC9gBoXL8VQ8JxuPePsacYnlqe8pTA0e0KijTRDwLwGS8ieXlJR1Tw1IAJxk X-Received: by 2002:a62:14d1:: with SMTP id 200mr5142524pfu.103.1544254225752; Fri, 07 Dec 2018 23:30:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544254225; cv=none; d=google.com; s=arc-20160816; b=flKnNCoTmOhakoG7iVV7Rle+v/y4g5DhSUiiDNsSNMdqsyj/guS69fwwTiIKJcqdAh MamoYh7s/9IbEgXj9y6tzSzp0gW8U0culDzpUKSs4CxBCTmEzs2Dx0prJkm7Fylde1RQ fyQ+AQqEpDbVJH9TQtM4G1IX+6uqW55teXZwgVxv0OvtUYxWWJrIUO62d4t9vwBrh7G5 pDaYCrI7BmYh+H3K9hde4jj2iz9pjYKOxrIqSFXRY35RChpwpwozy7KDBJUSTEY41Ba7 hRxUxDMlubzbUugtUWTNVm5ygT2b7xAWujZBgZCMLJr7lhaJlgIydB4qNPM+aDGwvAHx aehQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=2FsOLDPFLq8hzWOKt+D8K4m4xWoeaxUrs82YvGBvwq8=; b=lyyYCjln95p5poKo6s0dTiF/vprRN9yYWF6tt5E1vinNKG4B+GbRBXPbzXh6fQLB+2 7gWflmy+gEmso36tPvb5iv1KMndHam4Qtfdd9lhmEVIyMg07aAiPFudJU+gXWEIihdH0 MaVXHCdXdbdS09Ypt4S8NpKFTXmTXNIyR88daQNzNit51rgpyID4+KjXOfeFOgP6LbMr KkNey/xI2/ZtGbrpW+SeFjpA6250YmyN1SYskk03DDCa8yFXdFLzyAZJO+9vOeDNl5kN 8MtD7mvg6z8gqdtfgNQ3ATyoPqkczLyXhGp/a0k1rAYajc+OHfCVGk/o0UAqhDEdLt+S XbLg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s4si4733957plr.306.2018.12.07.23.29.54; Fri, 07 Dec 2018 23:30:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726184AbeLHH2x (ORCPT + 99 others); Sat, 8 Dec 2018 02:28:53 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:12441 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726084AbeLHH2x (ORCPT ); Sat, 8 Dec 2018 02:28:53 -0500 X-IronPort-AV: E=Sophos;i="5.56,329,1539640800"; d="scan'208";a="288349384" Received: from abo-91-111-68.mrs.modulonet.fr (HELO hadrien) ([85.68.111.91]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Dec 2018 08:28:50 +0100 Date: Sat, 8 Dec 2018 08:28:49 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Jacek Anaszewski cc: Jyri Sarha , Peter Ujfalusi , Pavel Machek , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, kbuild-all@01.org Subject: Re: [PATCH] leds: tlc591xx: fix device_node_continue.cocci warnings (fwd) In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > To: kbuild@01.org > > Cc: Julia Lawall > > Subject: [PATCH] leds: tlc591xx: fix device_node_continue.cocci warnings > > > > CC: kbuild-all@01.org > > TO: Jyri Sarha > > CC: Peter Ujfalusi > > CC: Jacek Anaszewski > > CC: Pavel Machek > > CC: linux-leds@vger.kernel.org > > CC: linux-kernel@vger.kernel.org > > > > From: kbuild test robot > > > > 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 > > Signed-off-by: kbuild test robot > > --- > > > > 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; > > } > > > > >