[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <sirphxaaxjxhoucjnga25lfmx7qpzt4rlh7zghjemjxxic5cws@hl3vdlhdojmf>
Date: Fri, 17 Oct 2025 22:58:38 +0200
From: Andi Shyti <andi.shyti@...nel.org>
To: Cezar Chiru <chiru.cezar.89@...il.com>
Cc: wsa+renesas@...g-engineering.com, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 3/3] i2c: pcf8584: Fix space(s) required before or
after different operators
Hi Cezar,
...
> @@ -284,7 +284,7 @@ static int pcf_xfer(struct i2c_adapter *i2c_adap,
> goto out;
> }
>
> - for (i = 0;ret >= 0 && i < num; i++) {
> + for (i = 0; ret >= 0 && i < num; i++) {
I think the variable ret can be used a bit better, the way it's
used is a bit confusing. I would remove the initialization above
and the check here.
You can declare "ret" inside the for loop...
> pmsg = &msgs[i];
>
> ret = pcf_doAddress(adap, pmsg);
here ret does not have any effect, it will always be '0' and we
don't even check it. We don't need to save the value pf
"pcf_doAddress()" (another patch can be to make it void).
Later in the code you can assign ret depending on
"if (pmsg->flags ..." and simply check "if (ret < 0) break;"
Andi
> --
> 2.43.0
>
Powered by blists - more mailing lists