Subject: Re: [PATCH net-next 2/2] qede: convert to use ndo_hwtstamp callbacks

From: kernel test robot <[email-masked]>
Date: Thu, 6 Nov 2025 16:56:11 +0800

Hi Vadim,

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/Vadim-Fedorenko/bnx2x-convert-to-use-ndo_hwtstamp-callbacks/20251106-030837
base:   net-next/main
patch link:    https://lore.kernel.org/r/20251105185133.3542054-3-vadim.fedorenko%40linux.dev
patch subject: [PATCH net-next 2/2] qede: convert to use ndo_hwtstamp callbacks
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20251106/[email-masked]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251106/[email-masked]/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 <[email-masked]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email-masked]/

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/qlogic/qede/qede_ptp.c: In function 'qede_hwtstamp_set':
>> drivers/net/ethernet/qlogic/qede/qede_ptp.c:289:13: warning: unused variable 'rc' [-Wunused-variable]
     289 |         int rc;
         |             ^~

vim +/rc +289 drivers/net/ethernet/qlogic/qede/qede_ptp.c

4c55215c05d252 Sudarsana Reddy Kalluru 2017-02-15  282  
c704f693a6ea05 Vadim Fedorenko         2025-11-05  283  int qede_hwtstamp_set(struct net_device *netdev,
c704f693a6ea05 Vadim Fedorenko         2025-11-05  284  		      struct kernel_hwtstamp_config *config,
c704f693a6ea05 Vadim Fedorenko         2025-11-05  285  		      struct netlink_ext_ack *extack)
4c55215c05d252 Sudarsana Reddy Kalluru 2017-02-15  286  {
c704f693a6ea05 Vadim Fedorenko         2025-11-05  287  	struct qede_dev *edev = netdev_priv(netdev);
4c55215c05d252 Sudarsana Reddy Kalluru 2017-02-15  288  	struct qede_ptp *ptp;
4c55215c05d252 Sudarsana Reddy Kalluru 2017-02-15 @289  	int rc;
4c55215c05d252 Sudarsana Reddy Kalluru 2017-02-15  290  
4c55215c05d252 Sudarsana Reddy Kalluru 2017-02-15  291  	ptp = edev->ptp;
c704f693a6ea05 Vadim Fedorenko         2025-11-05  292  	if (!ptp) {
c704f693a6ea05 Vadim Fedorenko         2025-11-05  293  		NL_SET_ERR_MSG_MOD(extack, "HW timestamping is not supported");
4c55215c05d252 Sudarsana Reddy Kalluru 2017-02-15  294  		return -EIO;
c704f693a6ea05 Vadim Fedorenko         2025-11-05  295  	}
4c55215c05d252 Sudarsana Reddy Kalluru 2017-02-15  296  
4c55215c05d252 Sudarsana Reddy Kalluru 2017-02-15  297  	DP_VERBOSE(edev, QED_MSG_DEBUG,
c704f693a6ea05 Vadim Fedorenko         2025-11-05  298  		   "HWTSTAMP SET: Requested tx_type = %d, requested rx_filters = %d\n",
c704f693a6ea05 Vadim Fedorenko         2025-11-05  299  		   config->tx_type, config->rx_filter);
c704f693a6ea05 Vadim Fedorenko         2025-11-05  300  
c704f693a6ea05 Vadim Fedorenko         2025-11-05  301  	switch (config->tx_type) {
c704f693a6ea05 Vadim Fedorenko         2025-11-05  302  	case HWTSTAMP_TX_ONESTEP_SYNC:
c704f693a6ea05 Vadim Fedorenko         2025-11-05  303  	case HWTSTAMP_TX_ONESTEP_P2P:
c704f693a6ea05 Vadim Fedorenko         2025-11-05  304  		NL_SET_ERR_MSG_MOD(extack,
c704f693a6ea05 Vadim Fedorenko         2025-11-05  305  				   "One-step timestamping is not supported");
c704f693a6ea05 Vadim Fedorenko         2025-11-05  306  		return -ERANGE;
c704f693a6ea05 Vadim Fedorenko         2025-11-05  307  	}
4c55215c05d252 Sudarsana Reddy Kalluru 2017-02-15  308  
4c55215c05d252 Sudarsana Reddy Kalluru 2017-02-15  309  	ptp->hw_ts_ioctl_called = 1;
c704f693a6ea05 Vadim Fedorenko         2025-11-05  310  	ptp->tx_type = config->tx_type;
c704f693a6ea05 Vadim Fedorenko         2025-11-05  311  	ptp->rx_filter = config->rx_filter;
4c55215c05d252 Sudarsana Reddy Kalluru 2017-02-15  312  
c704f693a6ea05 Vadim Fedorenko         2025-11-05  313  	qede_ptp_cfg_filters(edev);
4c55215c05d252 Sudarsana Reddy Kalluru 2017-02-15  314  
c704f693a6ea05 Vadim Fedorenko         2025-11-05  315  	config->rx_filter = ptp->rx_filter;
4c55215c05d252 Sudarsana Reddy Kalluru 2017-02-15  316  
c704f693a6ea05 Vadim Fedorenko         2025-11-05  317  	return 0;
c704f693a6ea05 Vadim Fedorenko         2025-11-05  318  }
c704f693a6ea05 Vadim Fedorenko         2025-11-05  319  

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