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]
Date: Mon, 6 May 2024 09:07:41 +0200 (CEST)
From: Romain Gantois <romain.gantois@...tlin.com>
To: Serge Semin <fancer.lancer@...il.com>
cc: Romain Gantois <romain.gantois@...tlin.com>, 
    "David S. Miller" <davem@...emloft.net>, 
    Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, 
    Paolo Abeni <pabeni@...hat.com>, Rob Herring <robh@...nel.org>, 
    Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, 
    Conor Dooley <conor+dt@...nel.org>, 
    Geert Uytterhoeven <geert+renesas@...der.be>, 
    Magnus Damm <magnus.damm@...il.com>, 
    Alexandre Torgue <alexandre.torgue@...s.st.com>, 
    Jose Abreu <joabreu@...opsys.com>, 
    Maxime Coquelin <mcoquelin.stm32@...il.com>, 
    Russell King <linux@...linux.org.uk>, 
    Clément Léger <clement.leger@...tlin.com>, 
    Thomas Petazzoni <thomas.petazzoni@...tlin.com>, netdev@...r.kernel.org, 
    devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, 
    linux-renesas-soc@...r.kernel.org, 
    linux-stm32@...md-mailman.stormreply.com, 
    linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH net-next v5 2/7] net: stmmac: Add dedicated XPCS cleanup
 method

Hi Serge,

On Fri, 3 May 2024, Serge Semin wrote:

> 
> > +void stmmac_pcs_clean(struct stmmac_priv *priv)
> 
> Ideally it would have been great to have the entire driver fixed to
> accept the stmmac_priv pointer as the functions argument. But this
> would be too tiresome. Anyway seeing the PCS-setup protagonist method
> has the net_device pointer passed I would implement the same prototype
> for the antagonist even though it would require an additional local
> variable. That will make the MDIO and PCS local interface-functions
> looking alike and as if unified. That is the reason of why I made
> stmmac_xpcs_clean() accepting the net_device pointer. 
> 
> Alternatively both stmmac_pcs_setup() and stmmac_pcs_clean() could be
> converted to just accepting a pointer to the stmmac_priv instance.

I think that adapting stmmac_pcs_clean() to take a net_device struct would be 
more appropriate since it's the simpler of the two methods. I'll implement this 
in the next version.

Thanks,

-- 
Romain Gantois, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ