* drivers/power/reset/nvmem-reboot-mode.c:27:42: error: passing argument 2 of 'nvmem_cell_write' from incompatible pointer type
@ 2019-08-10 23:43 kbuild test robot
2019-08-12 12:41 ` Nandor Han
0 siblings, 1 reply; 4+ messages in thread
From: kbuild test robot @ 2019-08-10 23:43 UTC (permalink / raw)
To: Han Nandor; +Cc: kbuild-all, linux-kernel, Sebastian Reichel
[-- Attachment #1: Type: text/plain, Size: 2137 bytes --]
Hi Han,
FYI, the error/warning still remains.
tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dcbb4a153971ff8646af0c963f5698bf21bfbfdc
commit: 7a78a7f7695bf9ef9cef3c06fbc5fa4573fd0eef power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface
date: 7 weeks ago
config: x86_64-randconfig-d003-201932 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-10) 7.4.0
reproduce:
git checkout 7a78a7f7695bf9ef9cef3c06fbc5fa4573fd0eef
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/power/reset/nvmem-reboot-mode.c: In function 'nvmem_reboot_mode_write':
>> drivers/power/reset/nvmem-reboot-mode.c:27:42: error: passing argument 2 of 'nvmem_cell_write' from incompatible pointer type [-Werror=incompatible-pointer-types]
ret = nvmem_cell_write(nvmem_rbm->cell, &magic, sizeof(magic));
^
In file included from drivers/power/reset/nvmem-reboot-mode.c:10:0:
include/linux/nvmem-consumer.h:120:19: note: expected 'const char *' but argument is of type 'unsigned int *'
static inline int nvmem_cell_write(struct nvmem_cell *cell,
^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/nvmem_cell_write +27 drivers/power/reset/nvmem-reboot-mode.c
18
19 static int nvmem_reboot_mode_write(struct reboot_mode_driver *reboot,
20 unsigned int magic)
21 {
22 int ret;
23 struct nvmem_reboot_mode *nvmem_rbm;
24
25 nvmem_rbm = container_of(reboot, struct nvmem_reboot_mode, reboot);
26
> 27 ret = nvmem_cell_write(nvmem_rbm->cell, &magic, sizeof(magic));
28 if (ret < 0)
29 dev_err(reboot->dev, "update reboot mode bits failed\n");
30
31 return ret;
32 }
33
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30684 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers/power/reset/nvmem-reboot-mode.c:27:42: error: passing argument 2 of 'nvmem_cell_write' from incompatible pointer type
2019-08-10 23:43 drivers/power/reset/nvmem-reboot-mode.c:27:42: error: passing argument 2 of 'nvmem_cell_write' from incompatible pointer type kbuild test robot
@ 2019-08-12 12:41 ` Nandor Han
0 siblings, 0 replies; 4+ messages in thread
From: Nandor Han @ 2019-08-12 12:41 UTC (permalink / raw)
Cc: kbuild-all, linux-kernel, Sebastian Reichel
On 8/11/19 2:43 AM, kbuild test robot wrote:
> Hi Han,
>
> FYI, the error/warning still remains.
>
> tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: dcbb4a153971ff8646af0c963f5698bf21bfbfdc
> commit: 7a78a7f7695bf9ef9cef3c06fbc5fa4573fd0eef power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface
> date: 7 weeks ago
> config: x86_64-randconfig-d003-201932 (attached as .config)
> compiler: gcc-7 (Debian 7.4.0-10) 7.4.0
> reproduce:
> git checkout 7a78a7f7695bf9ef9cef3c06fbc5fa4573fd0eef
> # save the attached .config to linux build tree
> make ARCH=x86_64
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> drivers/power/reset/nvmem-reboot-mode.c: In function 'nvmem_reboot_mode_write':
>>> drivers/power/reset/nvmem-reboot-mode.c:27:42: error: passing argument 2 of 'nvmem_cell_write' from incompatible pointer type [-Werror=incompatible-pointer-types]
> ret = nvmem_cell_write(nvmem_rbm->cell, &magic, sizeof(magic));
> ^
> In file included from drivers/power/reset/nvmem-reboot-mode.c:10:0:
> include/linux/nvmem-consumer.h:120:19: note: expected 'const char *' but argument is of type 'unsigned int *'
> static inline int nvmem_cell_write(struct nvmem_cell *cell,
> ^~~~~~~~~~~~~~~~
> cc1: some warnings being treated as errors
>
> vim +/nvmem_cell_write +27 drivers/power/reset/nvmem-reboot-mode.c
>
> 18
> 19 static int nvmem_reboot_mode_write(struct reboot_mode_driver *reboot,
> 20 unsigned int magic)
> 21 {
> 22 int ret;
> 23 struct nvmem_reboot_mode *nvmem_rbm;
> 24
> 25 nvmem_rbm = container_of(reboot, struct nvmem_reboot_mode, reboot);
> 26
> > 27 ret = nvmem_cell_write(nvmem_rbm->cell, &magic, sizeof(magic));
> 28 if (ret < 0)
> 29 dev_err(reboot->dev, "update reboot mode bits failed\n");
> 30
> 31 return ret;
> 32 }
> 33
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
>
Hi,
Seems that `nvmem-consumer.h` declares a different signature for
`nvmem_cell_write` method depending on `CONFIG_NVMEM` configuration:
#if IS_ENABLED(CONFIG_NVMEM)
...
int nvmem_cell_write(struct nvmem_cell *cell, void *buf, size_t len);
...
#else
...
static inline int nvmem_cell_write(struct nvmem_cell *cell,
const char *buf, size_t len)
{
return -EOPNOTSUPP;
}
...
#endif /* CONFIG_NVMEM *
What's the best approach here?
Nandor
^ permalink raw reply [flat|nested] 4+ messages in thread
* drivers/power/reset/nvmem-reboot-mode.c:27:42: error: passing argument 2 of 'nvmem_cell_write' from incompatible pointer type
@ 2019-09-11 8:22 kbuild test robot
0 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2019-09-11 8:22 UTC (permalink / raw)
To: Han Nandor; +Cc: kbuild-all, linux-kernel, Sebastian Reichel
[-- Attachment #1: Type: text/plain, Size: 2134 bytes --]
Hi Han,
FYI, the error/warning still remains.
tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3120b9a6a3f7487f96af7bd634ec49c87ef712ab
commit: 7a78a7f7695bf9ef9cef3c06fbc5fa4573fd0eef power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface
date: 3 months ago
config: i386-randconfig-e003-201936 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-11) 7.4.0
reproduce:
git checkout 7a78a7f7695bf9ef9cef3c06fbc5fa4573fd0eef
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/power/reset/nvmem-reboot-mode.c: In function 'nvmem_reboot_mode_write':
>> drivers/power/reset/nvmem-reboot-mode.c:27:42: error: passing argument 2 of 'nvmem_cell_write' from incompatible pointer type [-Werror=incompatible-pointer-types]
ret = nvmem_cell_write(nvmem_rbm->cell, &magic, sizeof(magic));
^
In file included from drivers/power/reset/nvmem-reboot-mode.c:10:0:
include/linux/nvmem-consumer.h:120:19: note: expected 'const char *' but argument is of type 'unsigned int *'
static inline int nvmem_cell_write(struct nvmem_cell *cell,
^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/nvmem_cell_write +27 drivers/power/reset/nvmem-reboot-mode.c
18
19 static int nvmem_reboot_mode_write(struct reboot_mode_driver *reboot,
20 unsigned int magic)
21 {
22 int ret;
23 struct nvmem_reboot_mode *nvmem_rbm;
24
25 nvmem_rbm = container_of(reboot, struct nvmem_reboot_mode, reboot);
26
> 27 ret = nvmem_cell_write(nvmem_rbm->cell, &magic, sizeof(magic));
28 if (ret < 0)
29 dev_err(reboot->dev, "update reboot mode bits failed\n");
30
31 return ret;
32 }
33
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36129 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* drivers/power/reset/nvmem-reboot-mode.c:27:42: error: passing argument 2 of 'nvmem_cell_write' from incompatible pointer type
@ 2019-09-08 0:40 kbuild test robot
0 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2019-09-08 0:40 UTC (permalink / raw)
To: Han Nandor; +Cc: kbuild-all, linux-kernel, Sebastian Reichel
[-- Attachment #1: Type: text/plain, Size: 2134 bytes --]
Hi Han,
FYI, the error/warning still remains.
tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 950b07c14e8c59444e2359f15fd70ed5112e11a0
commit: 7a78a7f7695bf9ef9cef3c06fbc5fa4573fd0eef power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface
date: 2 months ago
config: i386-randconfig-e003-201936 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-11) 7.4.0
reproduce:
git checkout 7a78a7f7695bf9ef9cef3c06fbc5fa4573fd0eef
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/power/reset/nvmem-reboot-mode.c: In function 'nvmem_reboot_mode_write':
>> drivers/power/reset/nvmem-reboot-mode.c:27:42: error: passing argument 2 of 'nvmem_cell_write' from incompatible pointer type [-Werror=incompatible-pointer-types]
ret = nvmem_cell_write(nvmem_rbm->cell, &magic, sizeof(magic));
^
In file included from drivers/power/reset/nvmem-reboot-mode.c:10:0:
include/linux/nvmem-consumer.h:120:19: note: expected 'const char *' but argument is of type 'unsigned int *'
static inline int nvmem_cell_write(struct nvmem_cell *cell,
^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/nvmem_cell_write +27 drivers/power/reset/nvmem-reboot-mode.c
18
19 static int nvmem_reboot_mode_write(struct reboot_mode_driver *reboot,
20 unsigned int magic)
21 {
22 int ret;
23 struct nvmem_reboot_mode *nvmem_rbm;
24
25 nvmem_rbm = container_of(reboot, struct nvmem_reboot_mode, reboot);
26
> 27 ret = nvmem_cell_write(nvmem_rbm->cell, &magic, sizeof(magic));
28 if (ret < 0)
29 dev_err(reboot->dev, "update reboot mode bits failed\n");
30
31 return ret;
32 }
33
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36129 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-09-11 8:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-10 23:43 drivers/power/reset/nvmem-reboot-mode.c:27:42: error: passing argument 2 of 'nvmem_cell_write' from incompatible pointer type kbuild test robot
2019-08-12 12:41 ` Nandor Han
2019-09-08 0:40 kbuild test robot
2019-09-11 8:22 kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).