[arm-platforms:irq/generic_handle_domain_irq 39/40] arch/powerpc/sysdev/fsl_msi.c:269:15: warning: variable 'cascade_irq' set but not used

kernel test robot lkp at intel.com
Sun Jun 6 09:22:39 PDT 2021


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/generic_handle_domain_irq
head:   525cb5407b091a353d023c27be9885073d08b169
commit: 21f0222752fa1523e2981a93dc82ed613e1e5e99 [39/40] powerpc: Bulk conversion to generic_handle_domain_irq()
config: powerpc-randconfig-r034-20210606 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.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://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=21f0222752fa1523e2981a93dc82ed613e1e5e99
        git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
        git fetch --no-tags arm-platforms irq/generic_handle_domain_irq
        git checkout 21f0222752fa1523e2981a93dc82ed613e1e5e99
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc 

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

All warnings (new ones prefixed by >>):

   arch/powerpc/sysdev/fsl_msi.c: In function 'fsl_msi_cascade':
>> arch/powerpc/sysdev/fsl_msi.c:269:15: warning: variable 'cascade_irq' set but not used [-Wunused-but-set-variable]
     269 |  unsigned int cascade_irq;
         |               ^~~~~~~~~~~


vim +/cascade_irq +269 arch/powerpc/sysdev/fsl_msi.c

34e36c1541fe70 Jason Jin         2008-05-23  266  
543c043cbae791 Tudor Laurentiu   2014-08-19  267  static irqreturn_t fsl_msi_cascade(int irq, void *data)
34e36c1541fe70 Jason Jin         2008-05-23  268  {
34e36c1541fe70 Jason Jin         2008-05-23 @269  	unsigned int cascade_irq;
02adac6051b0ff Li Yang           2010-04-22  270  	struct fsl_msi *msi_data;
34e36c1541fe70 Jason Jin         2008-05-23  271  	int msir_index = -1;
34e36c1541fe70 Jason Jin         2008-05-23  272  	u32 msir_value = 0;
34e36c1541fe70 Jason Jin         2008-05-23  273  	u32 intr_index;
34e36c1541fe70 Jason Jin         2008-05-23  274  	u32 have_shift = 0;
543c043cbae791 Tudor Laurentiu   2014-08-19  275  	struct fsl_msi_cascade_data *cascade_data = data;
543c043cbae791 Tudor Laurentiu   2014-08-19  276  	irqreturn_t ret = IRQ_NONE;
02adac6051b0ff Li Yang           2010-04-22  277  
02adac6051b0ff Li Yang           2010-04-22  278  	msi_data = cascade_data->msi_data;
34e36c1541fe70 Jason Jin         2008-05-23  279  
02adac6051b0ff Li Yang           2010-04-22  280  	msir_index = cascade_data->index;
34e36c1541fe70 Jason Jin         2008-05-23  281  
f31dd9443afd35 Minghuan Lian     2013-06-21  282  	if (msir_index >= NR_MSI_REG_MAX)
ef24ba7091517d Michael Ellerman  2016-09-06  283  		cascade_irq = 0;
34e36c1541fe70 Jason Jin         2008-05-23  284  
8081881327d479 Lan Chunhe-B25806 2010-03-15  285  	switch (msi_data->feature & FSL_PIC_IP_MASK) {
34e36c1541fe70 Jason Jin         2008-05-23  286  	case FSL_PIC_IP_MPIC:
34e36c1541fe70 Jason Jin         2008-05-23  287  		msir_value = fsl_msi_read(msi_data->msi_regs,
34e36c1541fe70 Jason Jin         2008-05-23  288  			msir_index * 0x10);
34e36c1541fe70 Jason Jin         2008-05-23  289  		break;
34e36c1541fe70 Jason Jin         2008-05-23  290  	case FSL_PIC_IP_IPIC:
34e36c1541fe70 Jason Jin         2008-05-23  291  		msir_value = fsl_msi_read(msi_data->msi_regs, msir_index * 0x4);
34e36c1541fe70 Jason Jin         2008-05-23  292  		break;
305bcf26128e38 Scott Wood        2012-07-03  293  #ifdef CONFIG_EPAPR_PARAVIRT
305bcf26128e38 Scott Wood        2012-07-03  294  	case FSL_PIC_IP_VMPIC: {
305bcf26128e38 Scott Wood        2012-07-03  295  		unsigned int ret;
446bc1ffe4f2ca Timur Tabi        2011-12-13  296  		ret = fh_vmpic_get_msir(virq_to_hw(irq), &msir_value);
446bc1ffe4f2ca Timur Tabi        2011-12-13  297  		if (ret) {
446bc1ffe4f2ca Timur Tabi        2011-12-13  298  			pr_err("fsl-msi: fh_vmpic_get_msir() failed for "
446bc1ffe4f2ca Timur Tabi        2011-12-13  299  			       "irq %u (ret=%u)\n", irq, ret);
446bc1ffe4f2ca Timur Tabi        2011-12-13  300  			msir_value = 0;
446bc1ffe4f2ca Timur Tabi        2011-12-13  301  		}
446bc1ffe4f2ca Timur Tabi        2011-12-13  302  		break;
34e36c1541fe70 Jason Jin         2008-05-23  303  	}
305bcf26128e38 Scott Wood        2012-07-03  304  #endif
305bcf26128e38 Scott Wood        2012-07-03  305  	}
34e36c1541fe70 Jason Jin         2008-05-23  306  
34e36c1541fe70 Jason Jin         2008-05-23  307  	while (msir_value) {
21f0222752fa15 Marc Zyngier      2021-05-04  308  		int err;
34e36c1541fe70 Jason Jin         2008-05-23  309  		intr_index = ffs(msir_value) - 1;
34e36c1541fe70 Jason Jin         2008-05-23  310  
21f0222752fa15 Marc Zyngier      2021-05-04  311  		err = generic_handle_domain_irq(msi_data->irqhost,
f31dd9443afd35 Minghuan Lian     2013-06-21  312  				msi_hwirq(msi_data, msir_index,
f31dd9443afd35 Minghuan Lian     2013-06-21  313  					  intr_index + have_shift));
21f0222752fa15 Marc Zyngier      2021-05-04  314  		if (!err)
543c043cbae791 Tudor Laurentiu   2014-08-19  315  			ret = IRQ_HANDLED;
21f0222752fa15 Marc Zyngier      2021-05-04  316  
692d1037e6914a Anton Vorontsov   2008-05-23  317  		have_shift += intr_index + 1;
692d1037e6914a Anton Vorontsov   2008-05-23  318  		msir_value = msir_value >> (intr_index + 1);
34e36c1541fe70 Jason Jin         2008-05-23  319  	}
34e36c1541fe70 Jason Jin         2008-05-23  320  
543c043cbae791 Tudor Laurentiu   2014-08-19  321  	return ret;
34e36c1541fe70 Jason Jin         2008-05-23  322  }
34e36c1541fe70 Jason Jin         2008-05-23  323  

:::::: The code at line 269 was first introduced by commit
:::::: 34e36c1541fe70e5b3842a3278c0e7631d31f4cb [POWERPC] fsl: PCIe MSI support for 83xx/85xx/86xx processors.

:::::: TO: Jason Jin <Jason.jin at freescale.com>
:::::: CC: Kumar Gala <galak at kernel.crashing.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 38689 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210607/510f8342/attachment-0001.gz>


More information about the linux-arm-kernel mailing list