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: <dce21d03-d6e3-4511-9b1b-5da92efc45a0@kernel.org>
Date: Thu, 6 Nov 2025 11:50:36 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
 Benoît Monin <benoit.monin@...tlin.com>
Cc: Andi Shyti <andi.shyti@...nel.org>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
 <conor+dt@...nel.org>, Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
 Mika Westerberg <mika.westerberg@...ux.intel.com>,
 Jan Dabros <jsd@...ihalf.com>,
 Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
 Clark Williams <clrkwllms@...nel.org>, Steven Rostedt <rostedt@...dmis.org>,
 Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
 Gregory CLEMENT <gregory.clement@...tlin.com>,
 Théo Lebrun <theo.lebrun@...tlin.com>,
 Tawfik Bayouk <tawfik.bayouk@...ileye.com>,
 Vladimir Kondratiev <vladimir.kondratiev@...ileye.com>,
 Dmitry Guzman <dmitry.guzman@...ileye.com>, linux-i2c@...r.kernel.org,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-rt-devel@...ts.linux.dev
Subject: Re: [PATCH v2 2/5] i2c: designware: Optimize flag reading in
 i2c_dw_read()

On 31/10/2025 15:48, Andy Shevchenko wrote:
> On Fri, Oct 31, 2025 at 03:35:40PM +0100, Benoît Monin wrote:
>> Optimize the i2c_dw_read() function by reading the message flags only
>> once per message, rather than for every byte.
>>
>> The message index is only modified by the outer loop, so reading the
>> flags in the inner loop was always getting the same value.
> 
> Does it affect the binary (compiled) file?


It does not really matter that much, because new code is more readable -
'flags' depend on the outer (first) loop and they are used there, so
that's where variable should be defined.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ