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: <f654f6fe-defb-4bdd-b4a3-7228ff5b5f8e@amd.com>
Date: Fri, 12 Sep 2025 10:02:13 -0700
From: Brett Creeley <bcreeley@....com>
To: Alok Tiwari <alok.a.tiwari@...cle.com>, sln@...main.com,
 brett.creeley@....com, andrew+netdev@...n.ch, davem@...emloft.net,
 edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, horms@...nel.org,
 netdev@...r.kernel.org
Subject: Re: [PATCH v2 net] ionic: use int type for err in
 ionic_get_module_eeprom_by_page



On 9/12/2025 7:14 AM, Alok Tiwari wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
> 
> 
> The variable 'err' is declared as u32, but it is used to store
> negative error codes such as -EINVAL.
> 
> Changing the type of 'err' to int ensures proper representation of
> negative error codes and aligns with standard kernel error handling
> conventions.
> 
> Also, there is no need to initialize 'err' since it is always set
> before being used.
> 
> Fixes: c51ab838f532 ("ionic: extend the QSFP module sprom for more pages")
> Signed-off-by: Alok Tiwari <alok.a.tiwari@...cle.com>
> Reviewed-by: Shannon Nelson <sln@...main.com>
> ---
> v1 -> v2
> Made 'err' uninitialized as suggested by Brett
> added Reviewed-by: Shannon
> ---
>   drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
> index 92f30ff2d631..2d9efadb5d2a 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
> @@ -978,7 +978,7 @@ static int ionic_get_module_eeprom_by_page(struct net_device *netdev,
>   {
>          struct ionic_lif *lif = netdev_priv(netdev);
>          struct ionic_dev *idev = &lif->ionic->idev;
> -       u32 err = -EINVAL;
> +       int err;

Thanks again.

Reviewed-by: Brett Creeley <brett.creeley@....com>
>          u8 *src;
> 
>          if (!page_data->length)
> --
> 2.50.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ