From: kernel test robot <lkp@intel.com>
To: "Rafał Miłecki" <rafal@milecki.pl>
Cc: oe-kbuild-all@lists.linux.dev,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Miquel Raynal <miquel.raynal@bootlin.com>
Subject: [srini-nvmem:for-next 1/1] drivers/mtd/mtdcore.c:548:29: warning: unused variable 'node'
Date: Thu, 26 Oct 2023 04:24:00 +0800 [thread overview]
Message-ID: <202310260402.NPx7gZH3-lkp@intel.com> (raw)
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
next reply other threads:[~2023-10-25 20:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-25 20:24 kernel test robot [this message]
2023-10-25 20:29 ` [srini-nvmem:for-next 1/1] drivers/mtd/mtdcore.c:548:29: warning: unused variable 'node' Rafał Miłecki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202310260402.NPx7gZH3-lkp@intel.com \
--to=lkp@intel.com \
--cc=miquel.raynal@bootlin.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rafal@milecki.pl \
--cc=srinivas.kandagatla@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.