Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

amd-xgbe: Use int type to store negative error codes

Use int instead of unsigned int for the 'ret' variable to store return
values from functions that either return zero on success or negative error
codes on failure. Storing negative error codes in an unsigned int causes
no runtime issues, but it's ugly as pants, Change 'ret' from unsigned int
to int type - this change has no runtime impact.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20250826142159.525059-1-rongqianfeng@vivo.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Qianfeng Rong and committed by
Jakub Kicinski
a6bac182 33035519

+3 -3
+1 -1
drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
··· 464 464 { 465 465 struct xgbe_prv_data *pdata = netdev_priv(netdev); 466 466 struct xgbe_hw_if *hw_if = &pdata->hw_if; 467 - unsigned int ret; 467 + int ret; 468 468 469 469 if (rxfh->hfunc != ETH_RSS_HASH_NO_CHANGE && 470 470 rxfh->hfunc != ETH_RSS_HASH_TOP) {
+1 -1
drivers/net/ethernet/amd/xgbe/xgbe-i2c.c
··· 70 70 71 71 static int xgbe_i2c_disable(struct xgbe_prv_data *pdata) 72 72 { 73 - unsigned int ret; 73 + int ret; 74 74 75 75 ret = xgbe_i2c_set_enable(pdata, false); 76 76 if (ret) {
+1 -1
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
··· 2902 2902 static int xgbe_phy_int_mdio_reset(struct xgbe_prv_data *pdata) 2903 2903 { 2904 2904 struct xgbe_phy_data *phy_data = pdata->phy_data; 2905 - unsigned int ret; 2905 + int ret; 2906 2906 2907 2907 ret = pdata->hw_if.set_gpio(pdata, phy_data->mdio_reset_gpio); 2908 2908 if (ret)