Re: [PATCH net-next v5 03/16] net: ethtool: Refactor identical get_ts_info implementations.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Köry,

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/K-ry-Maincent/net-Convert-PHYs-hwtstamp-callback-to-use-kernel_hwtstamp_config/20231009-235451
base:   net-next/main
patch link:    https://lore.kernel.org/r/20231009155138.86458-4-kory.maincent%40bootlin.com
patch subject: [PATCH net-next v5 03/16] net: ethtool: Refactor identical get_ts_info implementations.
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20231010/202310100344.QG4Jg301-lkp@xxxxxxxxx/config)
compiler: m68k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231010/202310100344.QG4Jg301-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310100344.QG4Jg301-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/net/bonding/bond_main.c: In function 'bond_ethtool_get_ts_info':
>> drivers/net/bonding/bond_main.c:5755:28: warning: unused variable 'phydev' [-Wunused-variable]
    5755 |         struct phy_device *phydev;
         |                            ^~~~~~
>> drivers/net/bonding/bond_main.c:5752:35: warning: unused variable 'ops' [-Wunused-variable]
    5752 |         const struct ethtool_ops *ops;
         |                                   ^~~


vim +/phydev +5755 drivers/net/bonding/bond_main.c

217df670d9a4da Jay Vosburgh    2005-09-26  5746  
94dd016ae538b1 Hangbin Liu     2021-11-30  5747  static int bond_ethtool_get_ts_info(struct net_device *bond_dev,
94dd016ae538b1 Hangbin Liu     2021-11-30  5748  				    struct ethtool_ts_info *info)
94dd016ae538b1 Hangbin Liu     2021-11-30  5749  {
94dd016ae538b1 Hangbin Liu     2021-11-30  5750  	struct bonding *bond = netdev_priv(bond_dev);
980f0799a15c75 Hangbin Liu     2023-04-18  5751  	struct ethtool_ts_info ts_info;
94dd016ae538b1 Hangbin Liu     2021-11-30 @5752  	const struct ethtool_ops *ops;
94dd016ae538b1 Hangbin Liu     2021-11-30  5753  	struct net_device *real_dev;
980f0799a15c75 Hangbin Liu     2023-04-18  5754  	bool sw_tx_support = false;
94dd016ae538b1 Hangbin Liu     2021-11-30 @5755  	struct phy_device *phydev;
980f0799a15c75 Hangbin Liu     2023-04-18  5756  	struct list_head *iter;
980f0799a15c75 Hangbin Liu     2023-04-18  5757  	struct slave *slave;
9b80ccda233fa6 Hangbin Liu     2022-05-19  5758  	int ret = 0;
94dd016ae538b1 Hangbin Liu     2021-11-30  5759  
9b80ccda233fa6 Hangbin Liu     2022-05-19  5760  	rcu_read_lock();
94dd016ae538b1 Hangbin Liu     2021-11-30  5761  	real_dev = bond_option_active_slave_get_rcu(bond);
9b80ccda233fa6 Hangbin Liu     2022-05-19  5762  	dev_hold(real_dev);
9b80ccda233fa6 Hangbin Liu     2022-05-19  5763  	rcu_read_unlock();
9b80ccda233fa6 Hangbin Liu     2022-05-19  5764  
94dd016ae538b1 Hangbin Liu     2021-11-30  5765  	if (real_dev) {
59b068fe2f41f9 Richard Cochran 2023-10-09  5766  		ret = ethtool_get_ts_info_by_layer(real_dev, info);
980f0799a15c75 Hangbin Liu     2023-04-18  5767  	} else {
980f0799a15c75 Hangbin Liu     2023-04-18  5768  		/* Check if all slaves support software tx timestamping */
980f0799a15c75 Hangbin Liu     2023-04-18  5769  		rcu_read_lock();
980f0799a15c75 Hangbin Liu     2023-04-18  5770  		bond_for_each_slave_rcu(bond, slave, iter) {
59b068fe2f41f9 Richard Cochran 2023-10-09  5771  			ret = ethtool_get_ts_info_by_layer(slave->dev, &ts_info);
980f0799a15c75 Hangbin Liu     2023-04-18  5772  			if (!ret && (ts_info.so_timestamping & SOF_TIMESTAMPING_TX_SOFTWARE)) {
980f0799a15c75 Hangbin Liu     2023-04-18  5773  				sw_tx_support = true;
980f0799a15c75 Hangbin Liu     2023-04-18  5774  				continue;
980f0799a15c75 Hangbin Liu     2023-04-18  5775  			}
980f0799a15c75 Hangbin Liu     2023-04-18  5776  
980f0799a15c75 Hangbin Liu     2023-04-18  5777  			sw_tx_support = false;
980f0799a15c75 Hangbin Liu     2023-04-18  5778  			break;
980f0799a15c75 Hangbin Liu     2023-04-18  5779  		}
980f0799a15c75 Hangbin Liu     2023-04-18  5780  		rcu_read_unlock();
94dd016ae538b1 Hangbin Liu     2021-11-30  5781  	}
94dd016ae538b1 Hangbin Liu     2021-11-30  5782  
980f0799a15c75 Hangbin Liu     2023-04-18  5783  	if (sw_tx_support)
980f0799a15c75 Hangbin Liu     2023-04-18  5784  		info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE;
980f0799a15c75 Hangbin Liu     2023-04-18  5785  
9b80ccda233fa6 Hangbin Liu     2022-05-19  5786  	dev_put(real_dev);
9b80ccda233fa6 Hangbin Liu     2022-05-19  5787  	return ret;
94dd016ae538b1 Hangbin Liu     2021-11-30  5788  }
94dd016ae538b1 Hangbin Liu     2021-11-30  5789  

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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux