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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <969dbbcd-e965-4c38-8817-56bd87a83f98@vivo.com>
Date: Wed, 9 Jul 2025 10:44:26 +0800
From: Qianfeng Rong <rongqianfeng@...o.com>
To: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Cc: wsa+renesas@...g-engineering.com,
 Patrice Chotard <patrice.chotard@...s.st.com>,
 Andi Shyti <andi.shyti@...nel.org>, linux-arm-kernel@...ts.infradead.org,
 linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
 opensource.kernel@...o.com
Subject: Re: [PATCH v3] i2c: busses: Use min() to improve code


在 2025/7/8 19:06, Jonathan Cameron 写道:
>> -     for (; i > 0; i--, c->count--, c->buf++)
>> +     for (i = min(c->count, SSC_TXFIFO_SIZE - tx_fstat);
>> +             i > 0; i--, c->count--, c->buf++)
>          for (i = min(c->count, SSC_TXFIFO_SIZE - tx_fstat);
>               i > 0; i--, c->count--, c->buf++)
>                  st_i2c_write_tx_fifo(i2c_dev, *c->buf);
>
> So different alignment form what you have.
>
Thank you for pointing out the alignment issue in the code snippet,
Will do in the next version.

Best regards,
Qianfeng


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ