All of lore.kernel.org
 help / color / mirror / Atom feed
* [intel-lts:5.10/preempt-rt 9797/17188] drivers/net/ethernet/intel/igc/igc_ptp.c:438:18: warning: variable 'nsec' set but not used
@ 2021-09-30 10:43 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-09-30 10:43 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2350 bytes --]

tree:   https://github.com/intel/linux-intel-lts.git 5.10/preempt-rt
head:   3ab3139402e6adc34f10481f1c1c60459bcd0a7e
commit: 26a890b883303c93193cca69d5a096f550f93c6d [9797/17188] igc: Add support for DMA timestamp for non-PTP packets
config: parisc-buildonly-randconfig-r005-20210929 (attached as .config)
compiler: hppa-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel/linux-intel-lts/commit/26a890b883303c93193cca69d5a096f550f93c6d
        git remote add intel-lts https://github.com/intel/linux-intel-lts.git
        git fetch --no-tags intel-lts 5.10/preempt-rt
        git checkout 26a890b883303c93193cca69d5a096f550f93c6d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=parisc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/intel/igc/igc_ptp.c: In function 'igc_ptp_dma_time_to_hwtstamp':
>> drivers/net/ethernet/intel/igc/igc_ptp.c:438:18: warning: variable 'nsec' set but not used [-Wunused-but-set-variable]
     438 |         u32 sec, nsec;
         |                  ^~~~


vim +/nsec +438 drivers/net/ethernet/intel/igc/igc_ptp.c

   432	
   433	static void igc_ptp_dma_time_to_hwtstamp(struct igc_adapter *adapter,
   434						 struct skb_shared_hwtstamps *hwtstamps,
   435						 u64 systim)
   436	{
   437		struct igc_hw *hw = &adapter->hw;
 > 438		u32 sec, nsec;
   439	
   440		/* FIXME: use a workqueue to read these values to avoid
   441		 * reading these registers in the hot path.
   442		 */
   443		nsec = rd32(IGC_SYSTIML);
   444		sec = rd32(IGC_SYSTIMH);
   445	
   446		switch (adapter->hw.mac.type) {
   447		case igc_i225:
   448			memset(hwtstamps, 0, sizeof(*hwtstamps));
   449	
   450			/* HACK */
   451			hwtstamps->hwtstamp = ktime_set(sec, systim & 0xFFFFFFFF);
   452			break;
   453		default:
   454			break;
   455		}
   456	}
   457	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 27085 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-30 10:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30 10:43 [intel-lts:5.10/preempt-rt 9797/17188] drivers/net/ethernet/intel/igc/igc_ptp.c:438:18: warning: variable 'nsec' set but not used kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.