From: kernel test robot <lkp@intel.com>
To: Joy Chakraborty <joychakr@google.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [srini-nvmem:for-next 1/1] drivers/mtd/mtdcore.c:557:18: error: incompatible function pointer types assigning to 'nvmem_reg_read_t' (aka 'long (*)(void *, unsigned int, void *, unsigned long)') from 'int (void *, unsigned int, void *, size_t)' (aka 'int (void *, unsigned int, void ...
Date: Wed, 5 Jun 2024 03:00:15 +0800 [thread overview]
Message-ID: <202406050200.8BOdZUla-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/srini/nvmem.git for-next
head: f5de138db5b76de7d96d4cf92f871ba893ba0119
commit: f5de138db5b76de7d96d4cf92f871ba893ba0119 [1/1] nvmem: Change return type of reg read/write to ssize_t
config: riscv-defconfig (https://download.01.org/0day-ci/archive/20240605/202406050200.8BOdZUla-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project d7d2d4f53fc79b4b58e8d8d08151b577c3699d4a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240605/202406050200.8BOdZUla-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/202406050200.8BOdZUla-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/mtd/mtdcore.c:12:
In file included from include/linux/ptrace.h:10:
In file included from include/linux/pid_namespace.h:7:
In file included from include/linux/mm.h:2253:
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/mtd/mtdcore.c:557:18: error: incompatible function pointer types assigning to 'nvmem_reg_read_t' (aka 'long (*)(void *, unsigned int, void *, unsigned long)') from 'int (void *, unsigned int, void *, size_t)' (aka 'int (void *, unsigned int, void *, unsigned long)') [-Wincompatible-function-pointer-types]
557 | config.reg_read = mtd_nvmem_reg_read;
| ^ ~~~~~~~~~~~~~~~~~~
>> drivers/mtd/mtdcore.c:966:14: error: incompatible function pointer types passing 'int (void *, unsigned int, void *, size_t)' (aka 'int (void *, unsigned int, void *, unsigned long)') to parameter of type 'nvmem_reg_read_t' (aka 'long (*)(void *, unsigned int, void *, unsigned long)') [-Wincompatible-function-pointer-types]
966 | mtd_nvmem_user_otp_reg_read);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/mtdcore.c:889:27: note: passing argument to parameter 'reg_read' here
889 | nvmem_reg_read_t reg_read)
| ^
drivers/mtd/mtdcore.c:1004:14: error: incompatible function pointer types passing 'int (void *, unsigned int, void *, size_t)' (aka 'int (void *, unsigned int, void *, unsigned long)') to parameter of type 'nvmem_reg_read_t' (aka 'long (*)(void *, unsigned int, void *, unsigned long)') [-Wincompatible-function-pointer-types]
1004 | mtd_nvmem_fact_otp_reg_read);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/mtdcore.c:889:27: note: passing argument to parameter 'reg_read' here
889 | nvmem_reg_read_t reg_read)
| ^
1 warning and 3 errors generated.
--
In file included from drivers/rtc/rtc-sun6i.c:21:
In file included from include/linux/interrupt.h:21:
In file included from arch/riscv/include/asm/sections.h:9:
In file included from include/linux/mm.h:2253:
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/rtc/rtc-sun6i.c:704:14: error: incompatible function pointer types initializing 'nvmem_reg_read_t' (aka 'long (*)(void *, unsigned int, void *, unsigned long)') with an expression of type 'int (void *, unsigned int, void *, size_t)' (aka 'int (void *, unsigned int, void *, unsigned long)') [-Wincompatible-function-pointer-types]
704 | .reg_read = sun6i_rtc_nvmem_read,
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/rtc/rtc-sun6i.c:705:15: error: incompatible function pointer types initializing 'nvmem_reg_write_t' (aka 'long (*)(void *, unsigned int, void *, unsigned long)') with an expression of type 'int (void *, unsigned int, void *, size_t)' (aka 'int (void *, unsigned int, void *, unsigned long)') [-Wincompatible-function-pointer-types]
705 | .reg_write = sun6i_rtc_nvmem_write,
| ^~~~~~~~~~~~~~~~~~~~~
1 warning and 2 errors generated.
vim +557 drivers/mtd/mtdcore.c
c4dfa25ab307a2 Alban Bedel 2018-11-13 546
c4dfa25ab307a2 Alban Bedel 2018-11-13 547 static int mtd_nvmem_add(struct mtd_info *mtd)
c4dfa25ab307a2 Alban Bedel 2018-11-13 548 {
658c4448bbbf02 Christian Marangi 2021-03-12 549 struct device_node *node = mtd_get_of_node(mtd);
c4dfa25ab307a2 Alban Bedel 2018-11-13 550 struct nvmem_config config = {};
c4dfa25ab307a2 Alban Bedel 2018-11-13 551
75f32f4b9d5263 Miquel Raynal 2023-03-07 552 config.id = NVMEM_DEVID_NONE;
c4dfa25ab307a2 Alban Bedel 2018-11-13 553 config.dev = &mtd->dev;
7b01b7239d0dc9 Ricardo Ribalda 2020-04-30 554 config.name = dev_name(&mtd->dev);
c4dfa25ab307a2 Alban Bedel 2018-11-13 555 config.owner = THIS_MODULE;
2cc3b37f5b6df8 Rafał Miłecki 2023-10-20 556 config.add_legacy_fixed_of_cells = of_device_is_compatible(node, "nvmem-cells");
c4dfa25ab307a2 Alban Bedel 2018-11-13 @557 config.reg_read = mtd_nvmem_reg_read;
c4dfa25ab307a2 Alban Bedel 2018-11-13 558 config.size = mtd->size;
c4dfa25ab307a2 Alban Bedel 2018-11-13 559 config.word_size = 1;
c4dfa25ab307a2 Alban Bedel 2018-11-13 560 config.stride = 1;
c4dfa25ab307a2 Alban Bedel 2018-11-13 561 config.read_only = true;
c4dfa25ab307a2 Alban Bedel 2018-11-13 562 config.root_only = true;
6c7621890995d0 Christophe Kerello 2022-02-20 563 config.ignore_wp = true;
c4dfa25ab307a2 Alban Bedel 2018-11-13 564 config.priv = mtd;
c4dfa25ab307a2 Alban Bedel 2018-11-13 565
c4dfa25ab307a2 Alban Bedel 2018-11-13 566 mtd->nvmem = nvmem_register(&config);
c4dfa25ab307a2 Alban Bedel 2018-11-13 567 if (IS_ERR(mtd->nvmem)) {
c4dfa25ab307a2 Alban Bedel 2018-11-13 568 /* Just ignore if there is no NVMEM support in the kernel */
5cab06156aade1 Miquel Raynal 2023-03-07 569 if (PTR_ERR(mtd->nvmem) == -EOPNOTSUPP)
c4dfa25ab307a2 Alban Bedel 2018-11-13 570 mtd->nvmem = NULL;
5cab06156aade1 Miquel Raynal 2023-03-07 571 else
5cab06156aade1 Miquel Raynal 2023-03-07 572 return dev_err_probe(&mtd->dev, PTR_ERR(mtd->nvmem),
5cab06156aade1 Miquel Raynal 2023-03-07 573 "Failed to register NVMEM device\n");
c4dfa25ab307a2 Alban Bedel 2018-11-13 574 }
c4dfa25ab307a2 Alban Bedel 2018-11-13 575
c4dfa25ab307a2 Alban Bedel 2018-11-13 576 return 0;
c4dfa25ab307a2 Alban Bedel 2018-11-13 577 }
c4dfa25ab307a2 Alban Bedel 2018-11-13 578
:::::: The code at line 557 was first introduced by commit
:::::: c4dfa25ab307a277eafa7067cd927fbe4d9be4ba mtd: add support for reading MTD devices via the nvmem API
:::::: TO: Alban Bedel <albeu@free.fr>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-06-04 19:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202406050200.8BOdZUla-lkp@intel.com \
--to=lkp@intel.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=gregkh@linuxfoundation.org \
--cc=joychakr@google.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox