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] [thread-next>] [day] [month] [year] [list]
Message-ID: <b0b9e3d4-5e65-491d-81c1-232520d73ab3@linux.intel.com>
Date: Thu, 6 Feb 2025 10:20:47 +0800
From: Choong Yong Liang <yong.liang.choong@...ux.intel.com>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc: Simon Horman <horms@...nel.org>, Jose Abreu <joabreu@...opsys.com>,
 Jose Abreu <Jose.Abreu@...opsys.com>,
 David E Box <david.e.box@...ux.intel.com>,
 Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
 Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
 "H . Peter Anvin" <hpa@...or.com>,
 Rajneesh Bhardwaj <irenic.rajneesh@...il.com>,
 David E Box <david.e.box@...el.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>, Maxime Coquelin
 <mcoquelin.stm32@...il.com>, Alexandre Torgue
 <alexandre.torgue@...s.st.com>, Jiawen Wu <jiawenwu@...stnetic.com>,
 Mengyuan Lou <mengyuanlou@...-swift.com>,
 Heiner Kallweit <hkallweit1@...il.com>, Russell King
 <linux@...linux.org.uk>, Hans de Goede <hdegoede@...hat.com>,
 Richard Cochran <richardcochran@...il.com>,
 Andrew Halaney <ahalaney@...hat.com>, Serge Semin <fancer.lancer@...il.com>,
 x86@...nel.org, LKML <linux-kernel@...r.kernel.org>,
 Netdev <netdev@...r.kernel.org>, platform-driver-x86@...r.kernel.org,
 linux-stm32@...md-mailman.stormreply.com,
 linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH net-next v6 4/7] stmmac: intel: configure SerDes according
 to the interface mode



On 4/2/2025 4:25 pm, Ilpo Järvinen wrote:
> On Tue, 4 Feb 2025, Choong Yong Liang wrote:
> 
> The logic could be reversed + return immediately to reduce the indentation
> of the block below.
> 
> If you just want to have them initialized, it's enough to use {}, no dummy
> 0 is necessary.
> 
> This looks somewhat ugly. Perhaps it would be better if you make the call
> on main level of the function and use local variables to hold the regs
> array and its number of elements until then.
> 
> It would be even better if you could just store the pointer and # of
> elements into some platform info structure so that it wouldn't need to be
> calculated on the fly here (but I don't know this driver well enough to
> know if that's viable/easy to do).
> 
> Why are these arrays in a header and not in the C file that uses them???
> 

Hi Ilpo,

Thank you for your detailed review and comments on the patch.

I'll reverse the logic in intel_tsn_lane_is_available, define the magic 
number, initialize arrays with {}, refactor intel_config_serdes, and move 
the arrays to the C file.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ