oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [intel-lts:5.15/linux 18852/23027] drivers/net/can/m_can/m_can_pci.c:190:13: warning: variable 'cgsr_reg' set but not used
@ 2023-03-09 12:15 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-03-09 12:15 UTC (permalink / raw)
  To: Jyothi A; +Cc: oe-kbuild-all, renjiaox

Hi Jyothi,

FYI, the error/warning still remains.

tree:   https://github.com/intel/linux-intel-lts.git 5.15/linux
head:   2533aa36ba52e96057d68a4ab377a6293b91c1fc
commit: 32cb6a2f6e5cb873bfc4cf06b831d90bf44080da [18852/23027] m_can_pci: Runtime power-management changes
config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20230309/202303092047.0hUuVxOA-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 12.1.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/32cb6a2f6e5cb873bfc4cf06b831d90bf44080da
        git remote add intel-lts https://github.com/intel/linux-intel-lts.git
        git fetch --no-tags intel-lts 5.15/linux
        git checkout 32cb6a2f6e5cb873bfc4cf06b831d90bf44080da
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash drivers/counter/ drivers/gpu/drm/bridge/imx/ drivers/gpu/drm/mcde/ drivers/media/i2c/ drivers/net/can/m_can/ drivers/pwm/ drivers/spi/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303092047.0hUuVxOA-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/can/m_can/m_can_pci.c: In function 'm_can_pci_runtime_suspend':
>> drivers/net/can/m_can/m_can_pci.c:190:13: warning: variable 'cgsr_reg' set but not used [-Wunused-but-set-variable]
     190 |         u32 cgsr_reg;
         |             ^~~~~~~~


vim +/cgsr_reg +190 drivers/net/can/m_can/m_can_pci.c

   183	
   184	static int __maybe_unused m_can_pci_runtime_suspend(struct device *dev)
   185	{
   186		struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
   187		struct net_device *ndev = pci_get_drvdata(pdev);
   188		struct m_can_classdev *mcan_class = netdev_priv(ndev);
   189		u32 d0i3c_reg;
 > 190		u32 cgsr_reg;
   191		unsigned long j0, j1, delay;
   192	
   193		delay = msecs_to_jiffies(100);
   194		j0 = jiffies;
   195		j1 = j0 + delay;
   196	
   197		cgsr_reg = iomap_read_reg(mcan_class, M_CAN_CGSR);
   198		iomap_write_reg(mcan_class, M_CAN_CGSR, M_CAN_CGSR_CG);
   199	
   200		d0i3c_reg = iomap_read_reg(mcan_class, M_CAN_D0I3C);
   201	
   202		if (d0i3c_reg & M_CAN_D0I3_CIP) {
   203			dev_info(dev, "%s d0i3c CIP detected", __func__);
   204		} else {
   205			iomap_write_reg(mcan_class, M_CAN_D0I3C, M_CAN_D0I3_EN);
   206			d0i3c_reg = iomap_read_reg(mcan_class, M_CAN_D0I3C);
   207		}
   208	
   209		while (time_before(jiffies, j1)) {
   210			d0i3c_reg = iomap_read_reg(mcan_class, M_CAN_D0I3C);
   211			if (!(d0i3c_reg & M_CAN_D0I3_CIP))
   212				break;
   213		}
   214	
   215		if (d0i3c_reg & M_CAN_D0I3_CIP)
   216			dev_info(dev, "%s d0i3c timeout waiting CIP to be cleared", __func__);
   217	
   218		return 0;
   219	}
   220	

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

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

only message in thread, other threads:[~2023-03-09 12:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-09 12:15 [intel-lts:5.15/linux 18852/23027] drivers/net/can/m_can/m_can_pci.c:190:13: warning: variable 'cgsr_reg' set but not used kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).