[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdZj2+b4G3V+YeMAEXy=Xkjs=c4FmJ9NBPi_2Mok00_76w@mail.gmail.com>
Date: Thu, 29 Feb 2024 10:26:36 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Théo Lebrun <theo.lebrun@...tlin.com>
Cc: Bartosz Golaszewski <brgl@...ev.pl>, Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley <conor+dt@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>, Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
linux-gpio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mips@...r.kernel.org, Gregory CLEMENT <gregory.clement@...tlin.com>,
Vladimir Kondratiev <vladimir.kondratiev@...ileye.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>, Tawfik Bayouk <tawfik.bayouk@...ileye.com>
Subject: Re: [PATCH v2 10/30] pinctrl: nomadik: minimise indentation in probe
On Wed, Feb 28, 2024 at 12:28 PM Théo Lebrun <theo.lebrun@...tlin.com> wrote:
> nmk_pinctrl_probe() iterates over each GPIO block. Use an early
> conditional continue to skip to the next iteration rather than indent
> all the loop code block.
>
> Do not change code logic. The block is changed from:
>
> for (i = 0; i < NMK_MAX_BANKS; i++) {
> x = of_parse_phandle(...);
> if (x) {
> ... do work ...
> }
> }
>
> To:
>
> for (i = 0; i < NMK_MAX_BANKS; i++) {
> x = of_parse_phandle(...);
> if (!x)
> continue;
>
> ... do work ...
> }
>
> Signed-off-by: Théo Lebrun <theo.lebrun@...tlin.com>
Patch applied!
Yours,
Linus Walleij
Powered by blists - more mailing lists