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] [day] [month] [year] [list]
Message-ID: <aRSh_dNeOPFRjXyD@smile.fi.intel.com>
Date: Wed, 12 Nov 2025 17:04:29 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	Richard Cochran <richardcochran@...il.com>,
	Jonathan Lemon <jonathan.lemon@...il.com>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next v1 3/7] ptp: ocp: Refactor
 ptp_ocp_i2c_notifier_call()

On Wed, Nov 12, 2025 at 01:45:31PM +0000, Vadim Fedorenko wrote:
> On 11/11/2025 16:52, Andy Shevchenko wrote:
> > Refactor ptp_ocp_i2c_notifier_call() to avoid unneeded local variable.

...

> the reason we've done it is to avoid iterating over devices and do
> string comparisons for actions we don't care about. We can still avoid
> local variable by changing if condition later in the code, but I'm not
> sure this refactor gives any benefits.

This is definitely a slow path and having less LoCs and straightforward code
flow is important for readability and maintenance. I find my proposed change
useful.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ