public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/soc/fsl/qe/qmc.c:2002:30: warning: unused variable 'qmc_data_qe'
@ 2024-09-23  4:53 kernel test robot
  2024-09-23 11:38 ` Herve Codina
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2024-09-23  4:53 UTC (permalink / raw)
  To: Herve Codina; +Cc: oe-kbuild-all, linux-kernel, Christophe Leroy

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   de5cb0dcb74c294ec527eddfe5094acfdb21ff21
commit: eb680d563089e55b20cb7730ed881638fe4425b7 soc: fsl: cpm1: qmc: Add support for QUICC Engine (QE) implementation
date:   3 weeks ago
config: powerpc-randconfig-r054-20240923 (https://download.01.org/0day-ci/archive/20240923/202409231229.EFlvN9m0-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 8663a75fa2f31299ab8d1d90288d9df92aadee88)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240923/202409231229.EFlvN9m0-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409231229.EFlvN9m0-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/soc/fsl/qe/qmc.c:12:
   In file included from include/linux/dma-mapping.h:11:
   In file included from include/linux/scatterlist.h:8:
   In file included from include/linux/mm.h:2228:
   include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> drivers/soc/fsl/qe/qmc.c:2002:30: warning: unused variable 'qmc_data_qe' [-Wunused-const-variable]
    2002 | static const struct qmc_data qmc_data_qe = {
         |                              ^~~~~~~~~~~
   2 warnings generated.


vim +/qmc_data_qe +2002 drivers/soc/fsl/qe/qmc.c

  2001	
> 2002	static const struct qmc_data qmc_data_qe = {
  2003		.version = QMC_QE,
  2004		.tstate = 0x30000000,
  2005		.rstate = 0x30000000,
  2006		.zistate = 0x00000200,
  2007		.zdstate_hdlc = 0x80FFFFE0,
  2008		.zdstate_transp = 0x003FFFE2,
  2009		.rpack = 0x80000000,
  2010	};
  2011	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: drivers/soc/fsl/qe/qmc.c:2002:30: warning: unused variable 'qmc_data_qe'
  2024-09-23  4:53 drivers/soc/fsl/qe/qmc.c:2002:30: warning: unused variable 'qmc_data_qe' kernel test robot
@ 2024-09-23 11:38 ` Herve Codina
  0 siblings, 0 replies; 2+ messages in thread
From: Herve Codina @ 2024-09-23 11:38 UTC (permalink / raw)
  To: kernel test robot; +Cc: oe-kbuild-all, linux-kernel, Christophe Leroy

Hi,

On Mon, 23 Sep 2024 12:53:23 +0800
kernel test robot <lkp@intel.com> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   de5cb0dcb74c294ec527eddfe5094acfdb21ff21
> commit: eb680d563089e55b20cb7730ed881638fe4425b7 soc: fsl: cpm1: qmc: Add support for QUICC Engine (QE) implementation
> date:   3 weeks ago
> config: powerpc-randconfig-r054-20240923 (https://download.01.org/0day-ci/archive/20240923/202409231229.EFlvN9m0-lkp@intel.com/config)
> compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 8663a75fa2f31299ab8d1d90288d9df92aadee88)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240923/202409231229.EFlvN9m0-lkp@intel.com/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@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202409231229.EFlvN9m0-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
>    In file included from drivers/soc/fsl/qe/qmc.c:12:
>    In file included from include/linux/dma-mapping.h:11:
>    In file included from include/linux/scatterlist.h:8:
>    In file included from include/linux/mm.h:2228:
>    include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
>      514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
>          |                               ~~~~~~~~~~~ ^ ~~~
> >> drivers/soc/fsl/qe/qmc.c:2002:30: warning: unused variable 'qmc_data_qe' [-Wunused-const-variable]  
>     2002 | static const struct qmc_data qmc_data_qe = {
>          |                              ^~~~~~~~~~~
>    2 warnings generated.
> 
> 
> vim +/qmc_data_qe +2002 drivers/soc/fsl/qe/qmc.c
> 
>   2001	
> > 2002	static const struct qmc_data qmc_data_qe = {  
>   2003		.version = QMC_QE,
>   2004		.tstate = 0x30000000,
>   2005		.rstate = 0x30000000,
>   2006		.zistate = 0x00000200,
>   2007		.zdstate_hdlc = 0x80FFFFE0,
>   2008		.zdstate_transp = 0x003FFFE2,
>   2009		.rpack = 0x80000000,
>   2010	};
>   2011	
> 

This issue has been already detected:
  https://lore.kernel.org/oe-kbuild-all/202409071707.ou2KFNKO-lkp@intel.com/
and a patch has been already sent to fix it:
  https://lore.kernel.org/lkml/20240909121129.57067-1-herve.codina@bootlin.com/

Best regards,
Hervé

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-09-23 11:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-23  4:53 drivers/soc/fsl/qe/qmc.c:2002:30: warning: unused variable 'qmc_data_qe' kernel test robot
2024-09-23 11:38 ` Herve Codina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox