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: <20250925102329.GE836419@horms.kernel.org>
Date: Thu, 25 Sep 2025 11:23:29 +0100
From: Simon Horman <horms@...nel.org>
To: Alok Tiwari <alok.a.tiwari@...cle.com>
Cc: anthony.l.nguyen@...el.com, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
	intel-wired-lan@...ts.osuosl.org
Subject: Re: [PATCH net-next] ixgbe: avoid redundant call to
 ixgbe_non_sfp_link_config()

On Wed, Sep 24, 2025 at 12:33:54PM -0700, Alok Tiwari wrote:
> ixgbe_non_sfp_link_config() is called twice in ixgbe_open()
> once to assign its return value to err and again in the
> conditional check. This patch uses the stored err value
> instead of calling the function a second time. This avoids
> redundant work and ensures consistent error reporting.
> 
> Also fix a small typo in the ixgbe_remove() comment:
> "The could be caused" -> "This could be caused".
> 
> Signed-off-by: Alok Tiwari <alok.a.tiwari@...cle.com>
> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> index 90d4e57b1c93..39ef604af3eb 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> @@ -7449,7 +7449,7 @@ int ixgbe_open(struct net_device *netdev)
>  					 adapter->hw.link.link_info.link_cfg_err);
>  
>  		err = ixgbe_non_sfp_link_config(&adapter->hw);
> -		if (ixgbe_non_sfp_link_config(&adapter->hw))
> +		if (err)
>  			e_dev_err("Link setup failed, err %d.\n", err);
>  	}
>  

I am wondering if there is some intended side-effect of
calling ixgbe_non_sfp_link_config() twice.

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ