All of lore.kernel.org
 help / color / mirror / Atom feed
* [srini-nvmem:for-next 1/1] drivers/mtd/mtdcore.c:548:29: warning: unused variable 'node'
@ 2023-10-25 20:24 kernel test robot
  2023-10-25 20:29 ` Rafał Miłecki
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2023-10-25 20:24 UTC (permalink / raw)
  To: Rafał Miłecki; +Cc: oe-kbuild-all, Srinivas Kandagatla, Miquel Raynal

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/srini/nvmem.git for-next
head:   ca7384334d9bf741e2768d60887924671c4d9a7f
commit: ca7384334d9bf741e2768d60887924671c4d9a7f [1/1] Revert "nvmem: add new config option"
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20231026/202310260402.NPx7gZH3-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231026/202310260402.NPx7gZH3-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/202310260402.NPx7gZH3-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/mtd/mtdcore.c: In function 'mtd_nvmem_add':
>> drivers/mtd/mtdcore.c:548:29: warning: unused variable 'node' [-Wunused-variable]
     548 |         struct device_node *node = mtd_get_of_node(mtd);
         |                             ^~~~


vim +/node +548 drivers/mtd/mtdcore.c

c4dfa25ab307a2 Alban Bedel        2018-11-13  545  
c4dfa25ab307a2 Alban Bedel        2018-11-13  546  static int mtd_nvmem_add(struct mtd_info *mtd)
c4dfa25ab307a2 Alban Bedel        2018-11-13  547  {
658c4448bbbf02 Christian Marangi  2021-03-12 @548  	struct device_node *node = mtd_get_of_node(mtd);
c4dfa25ab307a2 Alban Bedel        2018-11-13  549  	struct nvmem_config config = {};
c4dfa25ab307a2 Alban Bedel        2018-11-13  550  
75f32f4b9d5263 Miquel Raynal      2023-03-07  551  	config.id = NVMEM_DEVID_NONE;
c4dfa25ab307a2 Alban Bedel        2018-11-13  552  	config.dev = &mtd->dev;
7b01b7239d0dc9 Ricardo Ribalda    2020-04-30  553  	config.name = dev_name(&mtd->dev);
c4dfa25ab307a2 Alban Bedel        2018-11-13  554  	config.owner = THIS_MODULE;
c4dfa25ab307a2 Alban Bedel        2018-11-13  555  	config.reg_read = mtd_nvmem_reg_read;
c4dfa25ab307a2 Alban Bedel        2018-11-13  556  	config.size = mtd->size;
c4dfa25ab307a2 Alban Bedel        2018-11-13  557  	config.word_size = 1;
c4dfa25ab307a2 Alban Bedel        2018-11-13  558  	config.stride = 1;
c4dfa25ab307a2 Alban Bedel        2018-11-13  559  	config.read_only = true;
c4dfa25ab307a2 Alban Bedel        2018-11-13  560  	config.root_only = true;
6c7621890995d0 Christophe Kerello 2022-02-20  561  	config.ignore_wp = true;
c4dfa25ab307a2 Alban Bedel        2018-11-13  562  	config.priv = mtd;
c4dfa25ab307a2 Alban Bedel        2018-11-13  563  
c4dfa25ab307a2 Alban Bedel        2018-11-13  564  	mtd->nvmem = nvmem_register(&config);
c4dfa25ab307a2 Alban Bedel        2018-11-13  565  	if (IS_ERR(mtd->nvmem)) {
c4dfa25ab307a2 Alban Bedel        2018-11-13  566  		/* Just ignore if there is no NVMEM support in the kernel */
5cab06156aade1 Miquel Raynal      2023-03-07  567  		if (PTR_ERR(mtd->nvmem) == -EOPNOTSUPP)
c4dfa25ab307a2 Alban Bedel        2018-11-13  568  			mtd->nvmem = NULL;
5cab06156aade1 Miquel Raynal      2023-03-07  569  		else
5cab06156aade1 Miquel Raynal      2023-03-07  570  			return dev_err_probe(&mtd->dev, PTR_ERR(mtd->nvmem),
5cab06156aade1 Miquel Raynal      2023-03-07  571  					     "Failed to register NVMEM device\n");
c4dfa25ab307a2 Alban Bedel        2018-11-13  572  	}
c4dfa25ab307a2 Alban Bedel        2018-11-13  573  
c4dfa25ab307a2 Alban Bedel        2018-11-13  574  	return 0;
c4dfa25ab307a2 Alban Bedel        2018-11-13  575  }
c4dfa25ab307a2 Alban Bedel        2018-11-13  576  

:::::: The code at line 548 was first introduced by commit
:::::: 658c4448bbbf02a143abf1b89d09a3337ebd3ba6 mtd: core: add nvmem-cells compatible to parse mtd as nvmem cells

:::::: TO: Ansuel Smith <ansuelsmth@gmail.com>
:::::: CC: Miquel Raynal <miquel.raynal@bootlin.com>

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

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

* Re: [srini-nvmem:for-next 1/1] drivers/mtd/mtdcore.c:548:29: warning: unused variable 'node'
  2023-10-25 20:24 [srini-nvmem:for-next 1/1] drivers/mtd/mtdcore.c:548:29: warning: unused variable 'node' kernel test robot
@ 2023-10-25 20:29 ` Rafał Miłecki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafał Miłecki @ 2023-10-25 20:29 UTC (permalink / raw)
  To: kernel test robot; +Cc: oe-kbuild-all, Srinivas Kandagatla, Miquel Raynal

On 2023-10-25 22:24, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/srini/nvmem.git 
> for-next
> head:   ca7384334d9bf741e2768d60887924671c4d9a7f
> commit: ca7384334d9bf741e2768d60887924671c4d9a7f [1/1] Revert "nvmem:
> add new config option"
> config: m68k-allyesconfig
> (https://download.01.org/0day-ci/archive/20231026/202310260402.NPx7gZH3-lkp@intel.com/config)
> compiler: m68k-linux-gcc (GCC) 13.2.0
> reproduce (this is a W=1 build):
> (https://download.01.org/0day-ci/archive/20231026/202310260402.NPx7gZH3-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/202310260402.NPx7gZH3-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
>    drivers/mtd/mtdcore.c: In function 'mtd_nvmem_add':
>>> drivers/mtd/mtdcore.c:548:29: warning: unused variable 'node' 
>>> [-Wunused-variable]
>      548 |         struct device_node *node = mtd_get_of_node(mtd);
>          |                             ^~~~

This warning comes from applying this patch on top of v6.6-rc1.

It was meant to be applied after my commit 2cc3b37f5b6d ("nvmem: add
explicit config option to read old syntax fixed OF cells") that is now
part of the:
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git/log/?h=char-misc-next

-- 
Rafał Miłecki

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

end of thread, other threads:[~2023-10-25 22:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-25 20:24 [srini-nvmem:for-next 1/1] drivers/mtd/mtdcore.c:548:29: warning: unused variable 'node' kernel test robot
2023-10-25 20:29 ` Rafał Miłecki

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.