[PATCH net-next v3 4/8] net: qualcomm: ipqess: Add Ethtool ops to IPQESS port netdevices

kernel test robot lkp at intel.com
Tue Nov 21 04:18:01 PST 2023


Hi Romain,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Romain-Gantois/dt-bindings-net-Introduce-the-Qualcomm-IPQESS-Ethernet-switch/20231114-185953
base:   net-next/main
patch link:    https://lore.kernel.org/r/20231114105600.1012056-5-romain.gantois%40bootlin.com
patch subject: [PATCH net-next v3 4/8] net: qualcomm: ipqess: Add Ethtool ops to IPQESS port netdevices
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20231121/202311211930.FOMUSlbU-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231121/202311211930.FOMUSlbU-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311211930.FOMUSlbU-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/qualcomm/ipqess/ipqess_ethtool.c:165:10: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
     165 |                 return ret;
         |                        ^~~
   drivers/net/ethernet/qualcomm/ipqess/ipqess_ethtool.c:152:9: note: initialize the variable 'ret' to silence this warning
     152 |         int ret;
         |                ^
         |                 = 0
   1 warning generated.


vim +/ret +165 drivers/net/ethernet/qualcomm/ipqess/ipqess_ethtool.c

   148	
   149	static int ipqess_port_set_eee(struct net_device *dev, struct ethtool_eee *eee)
   150	{
   151		struct ipqess_port *port = netdev_priv(dev);
   152		int ret;
   153		u32 lpi_en = QCA8K_REG_EEE_CTRL_LPI_EN(port->index);
   154		struct qca8k_priv *priv = port->sw->priv;
   155		u32 lpi_ctl1;
   156	
   157		/* Port's PHY and MAC both need to be EEE capable */
   158		if (!dev->phydev || !port->pl)
   159			return -ENODEV;
   160	
   161		mutex_lock(&priv->reg_mutex);
   162		lpi_ctl1 = qca8k_read(priv, QCA8K_REG_EEE_CTRL, &lpi_ctl1);
   163		if (lpi_ctl1 < 0) {
   164			mutex_unlock(&priv->reg_mutex);
 > 165			return ret;
   166		}
   167	
   168		if (eee->tx_lpi_enabled && eee->eee_enabled)
   169			lpi_ctl1 |= lpi_en;
   170		else
   171			lpi_ctl1 &= ~lpi_en;
   172		ret = qca8k_write(priv, QCA8K_REG_EEE_CTRL, lpi_ctl1);
   173		mutex_unlock(&priv->reg_mutex);
   174	
   175		if (ret)
   176			return ret;
   177	
   178		return phylink_ethtool_set_eee(port->pl, eee);
   179	}
   180	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



More information about the linux-arm-kernel mailing list