Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp901134rdb; Sun, 1 Oct 2023 10:06:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEc8wY4AJhSHbEplhFIT611HFzt1Nzo/xLb4pffkw8cop1Z5N+UV1Iov6tW6xQ4xUOYXhtp X-Received: by 2002:a05:6870:9708:b0:1d1:40a6:e82d with SMTP id n8-20020a056870970800b001d140a6e82dmr11676653oaq.59.1696179989452; Sun, 01 Oct 2023 10:06:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696179989; cv=none; d=google.com; s=arc-20160816; b=wCpj17Rr69paT4lL4ZpMsTvsmTyLUFMT6xnHj5lGYj1b4LOdBCwNCCvfdJdnQpsQHA UK5HtQRYSQ//ogBPLz4Y2Q17MgUw6ZfGVUNRjVMFGiEE0c0oUJIWNJYOhfhk22PdGNFN FEmmW5Zx0/MPf84Xl6Vds92iYI1v0xnqs2HatpZd5jYKmXd5JaLYnrc3KvOMFeT0HBQH cxnZJ0jKpApOJwrVuiI2sM/gv/3ejz5uvv1PzyykqCWfjEF3MnJropeszlHwFLXWaj7B DQXqfhC8Us1oTn/grOO6HPF7KMXhKUMCmKZRJ5UUn0WzV/P4CNWJABx6WDw+QKDZ9WmY mc8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=/KwZXmjQLKtmVP9ENXTMBGxFAvvu/EY30obXNq/vQww=; fh=TaVGq00R3C2F8bcjIWR4C15k1ALmsLz068ksRiouRl4=; b=zQH7swEeMghUvGdpH1BPmzOm9zAuieB8MRpCBzEobTlN5YdtY/rArBSNZBgDiRcdl8 GA4Q7rEh8Cn59i8eIMk1oUXAj0WcMcVAAF8QZ/dShwB4AFiRRPivcQvKQnWzE2H1nlMP g8BMPM7Ru34bdIvcA0fbihZpQ+J/X6E8p/IHjYpI/lgdv9E3Afdrt0Llqrfw2Gu0L8Yc 7CdSew6C3RxOMCmH+Q7y81R9DzvmehIDSuO7N+hJeIKqBUeUU1CcTt2H8Bcr9Q1qsDYs 9ItNrSUftfR7HyGQq6QA1G7TJj8nBPhc9YtxzUotywvMsQm/DW3SPozlwdGPING5m65h aB5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id t23-20020a656097000000b0053074c54c3fsi14163352pgu.868.2023.10.01.10.06.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Oct 2023 10:06:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id EB9F58098B94; Sun, 1 Oct 2023 10:06:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235213AbjJARFt (ORCPT + 99 others); Sun, 1 Oct 2023 13:05:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235161AbjJARFt (ORCPT ); Sun, 1 Oct 2023 13:05:49 -0400 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D44F383 for ; Sun, 1 Oct 2023 10:05:46 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qmzsz-0005mK-QE; Sun, 01 Oct 2023 19:05:41 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qmzsy-00AKWJ-OL; Sun, 01 Oct 2023 19:05:40 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qmzsy-0079qX-Eu; Sun, 01 Oct 2023 19:05:40 +0200 Date: Sun, 1 Oct 2023 19:05:40 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: =?utf-8?B?QW5kcsOp?= Apitzsch Cc: Christophe JAILLET , conor+dt@kernel.org, devicetree@vger.kernel.org, krzysztof.kozlowski+dt@linaro.org, lee@kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, pavel@ucw.cz, phone-devel@vger.kernel.org, robh+dt@kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: Re: [PATCH v5 2/2] leds: add ktd202x driver Message-ID: <20231001170540.yiouho2lrzrioxns@pengutronix.de> References: <20231001-ktd202x-v5-0-f544a1d0510d@apitzsch.eu> <20231001-ktd202x-v5-2-f544a1d0510d@apitzsch.eu> <250d0e681e7bbb750464338fb3a1a4a3199ce6ef.camel@apitzsch.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="byfsp32mttsymf7l" Content-Disposition: inline In-Reply-To: <250d0e681e7bbb750464338fb3a1a4a3199ce6ef.camel@apitzsch.eu> X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sun, 01 Oct 2023 10:06:01 -0700 (PDT) --byfsp32mttsymf7l Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Andr=E9, On Sun, Oct 01, 2023 at 06:56:20PM +0200, Andr=E9 Apitzsch wrote: > Am Sonntag, dem 01.10.2023 um 17:15 +0200 schrieb Christophe JAILLET: > > Le 01/10/2023 =E0 15:52, Andr=E9 Apitzsch a =E9crit=A0: > > > +=A0=A0=A0=A0=A0=A0=A0for_each_available_child_of_node(np, child) { > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0u32 mono_color =3D 0; > >=20 > > Un-needed init. > > And, why is it defined here, while reg is defined out-side the loop? >=20 > I'll move it out-side the loop (without initialization). In my book a variable with a narrow scope is better. I didn't check, but if you can restrict both variables to the for loop, that's nicer. Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --byfsp32mttsymf7l Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmUZpuMACgkQj4D7WH0S /k4UrAgAsqfphLfBJY2x0Nxsf8Wj657r8d8qYHsMPFBaWGtTTAmORhde68d7oG2y ZBFbwx6uFFqh+uL005zE/MFzujknV/8ymncUxQUBDyh9oqXfq1K+c9flpwS9rZ13 LhQTu+akTLmSO2KdZEG9qxUP66+T36XyTppUPXCr2xVJtNOELSd6avAno4BkfwP6 0Y29zuL+JILfcd96yBUdUPvGjFpvsX0+qSCPtdckuWGZ34Amw0E/NVtwLfKP1ZSL FbNn4SJ6n7VAhAKlNkXjdhMmw/vTPBeiWmRN5EHX1eBW2bWkx86rWfvhM6FNP8YO 6ZWLbPc0HblCtiHRhRM+06PrNYcvpQ== =WKZx -----END PGP SIGNATURE----- --byfsp32mttsymf7l--