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: <f87eac1a-0f75-44d1-a52c-1ad15b0ccd59@lunn.ch>
Date: Sat, 3 Feb 2024 22:33:44 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Heiner Kallweit <hkallweit1@...il.com>
Cc: Jakub Kicinski <kuba@...nel.org>, David Miller <davem@...emloft.net>,
	Paolo Abeni <pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>,
	Russell King - ARM Linux <linux@...linux.org.uk>,
	Ariel Elior <aelior@...vell.com>,
	Sudarsana Kalluru <skalluru@...vell.com>,
	Manish Chopra <manishc@...vell.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] bnx2x: convert EEE handling to use linkmode
 bitmaps

On Sat, Feb 03, 2024 at 10:19:43PM +0100, Heiner Kallweit wrote:
> Convert EEE handling to use linkmode bitmaps. This prepares for
> removing the legacy bitmaps from struct ethtool_keee.
> No functional change intended.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
> ---
>  .../ethernet/broadcom/bnx2x/bnx2x_ethtool.c   | 45 +++++++++----------
>  1 file changed, 22 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
> index 5f0e1759d..0672188bc 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
> @@ -2081,28 +2081,26 @@ static const char bnx2x_private_arr[BNX2X_PRI_FLAG_LEN][ETH_GSTRING_LEN] = {
>  	"Storage only interface"
>  };
>  
> -static u32 bnx2x_eee_to_adv(u32 eee_adv)
> +static void bnx2x_eee_to_linkmode(unsigned long *mode, u32 eee_adv)
>  {
> -	u32 modes = 0;
> -
> +	linkmode_zero(mode);

While i agree this is a straight translation, i don't think it is
needed. bnx2x_eee_to_adv() is only called from bnx2x_get_eee() and the
ethtool core will already of zeroed all the fields.

Apart from that

Reviewed-by: Andrew Lunn <andrew@...n.ch>

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ