lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <zlb7ok43sqjsxq7gv6gutiqaw32oupzlvyglfc2f7jg5qwv6or@yvnxchzpmf33>
Date: Mon, 20 Oct 2025 00:03:03 +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 v7 3/3] i2c: pcf8584: Move 'ret' variable inside for
 loop, break if ret < 0.

Hi Cezar,

On Sat, Oct 18, 2025 at 12:12:58PM +0300, Cezar Chiru wrote:
> Require spaces around '=', '>' and '<'. Add space(s) around binary
> operators.
> Move 'ret' variable inside for loop. Then check if (ret < 0) break.
> This improves usage of ret variable.
> Enforce errors fixing based on checkpatch.pl output on file.

Thanks for following up.

> @@ -284,9 +284,10 @@ static int pcf_xfer(struct i2c_adapter *i2c_adap,
>  		goto out;
>  	}
>  
> -	for (i = 0;ret >= 0 && i < num; i++) {
> -		pmsg = &msgs[i];
> +	for (i = 0; i < num; i++) {
> +		int ret = 0;

there is no need for initialization here.

>  
> +		pmsg = &msgs[i];
>  		ret = pcf_doAddress(adap, pmsg);

as a folloing patch you can make pcf_doAddress of the void type
and avoid this extra assignment.

Andi

>  
>  		/* Send START */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ