From: kernel test robot <lkp@intel.com>
To: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: fs/pstore/ram_core.c:532:36: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Wed, 13 Dec 2023 22:13:40 +0800 [thread overview]
Message-ID: <202312132232.faZpeGsh-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 88035e5694a86a7167d490bb95e9df97a9bb162b
commit: a811c05c16b53ff89e9cfc029ec77a0aae846881 nios2: use generic early_init_dt_add_memory_arch
date: 5 years ago
config: nios2-randconfig-r113-20231116 (https://download.01.org/0day-ci/archive/20231213/202312132232.faZpeGsh-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231213/202312132232.faZpeGsh-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/202312132232.faZpeGsh-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
fs/pstore/ram_core.c:277:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned char * @@
fs/pstore/ram_core.c:277:34: sparse: expected void volatile [noderef] __iomem *addr
fs/pstore/ram_core.c:277:34: sparse: got unsigned char *
fs/pstore/ram_core.c:310:50: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned char * @@
fs/pstore/ram_core.c:310:50: sparse: expected void const volatile [noderef] __iomem *addr
fs/pstore/ram_core.c:310:50: sparse: got unsigned char *
fs/pstore/ram_core.c:311:65: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned char * @@
fs/pstore/ram_core.c:311:65: sparse: expected void const volatile [noderef] __iomem *addr
fs/pstore/ram_core.c:311:65: sparse: got unsigned char *
fs/pstore/ram_core.c:452:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *va @@ got void [noderef] __iomem * @@
fs/pstore/ram_core.c:452:20: sparse: expected void *va
fs/pstore/ram_core.c:452:20: sparse: got void [noderef] __iomem *
fs/pstore/ram_core.c:454:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *va @@ got void [noderef] __iomem * @@
fs/pstore/ram_core.c:454:20: sparse: expected void *va
fs/pstore/ram_core.c:454:20: sparse: got void [noderef] __iomem *
>> fs/pstore/ram_core.c:532:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *vaddr @@
fs/pstore/ram_core.c:532:36: sparse: expected void [noderef] __iomem *addr
fs/pstore/ram_core.c:532:36: sparse: got void *vaddr
fs/pstore/ram_core.c: note: in included file (through include/linux/irqflags.h, include/asm-generic/bitops.h, arch/nios2/include/generated/asm/bitops.h, ...):
arch/nios2/include/asm/irqflags.h:25:16: sparse: sparse: undefined identifier '__builtin_rdctl'
arch/nios2/include/asm/irqflags.h:34:9: sparse: sparse: undefined identifier '__builtin_wrctl'
fs/pstore/ram_core.c: In function 'persistent_ram_save_old':
fs/pstore/ram_core.c:310:37: warning: array subscript <unknown> is outside array bounds of 'uint8_t[0]' {aka 'unsigned char[]'} [-Warray-bounds=]
310 | memcpy_fromio(prz->old_log, &buffer->data[start], size - start);
| ^~~~~~~~~~~~~~~~~~~~
fs/pstore/ram_core.c:36:21: note: while referencing 'data'
36 | uint8_t data[0];
| ^~~~
fs/pstore/ram_core.c:311:52: warning: array subscript 0 is outside array bounds of 'uint8_t[0]' {aka 'unsigned char[]'} [-Warray-bounds=]
311 | memcpy_fromio(prz->old_log + size - start, &buffer->data[0], start);
| ^~~~~~~~~~~~~~~~
fs/pstore/ram_core.c:36:21: note: while referencing 'data'
36 | uint8_t data[0];
| ^~~~
vim +532 fs/pstore/ram_core.c
bb4206f2042d95 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 521
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 522 void persistent_ram_free(struct persistent_ram_zone *prz)
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 523 {
beeb94321a7a6d fs/pstore/ram_core.c Anton Vorontsov 2012-06-18 524 if (!prz)
beeb94321a7a6d fs/pstore/ram_core.c Anton Vorontsov 2012-06-18 525 return;
beeb94321a7a6d fs/pstore/ram_core.c Anton Vorontsov 2012-06-18 526
beeb94321a7a6d fs/pstore/ram_core.c Anton Vorontsov 2012-06-18 527 if (prz->vaddr) {
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 528 if (pfn_valid(prz->paddr >> PAGE_SHIFT)) {
831b624df1b420 fs/pstore/ram_core.c Bin Yang 2018-09-12 529 /* We must vunmap() at page-granularity. */
831b624df1b420 fs/pstore/ram_core.c Bin Yang 2018-09-12 530 vunmap(prz->vaddr - offset_in_page(prz->paddr));
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 531 } else {
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 @532 iounmap(prz->vaddr);
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 533 release_mem_region(prz->paddr, prz->size);
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 534 }
beeb94321a7a6d fs/pstore/ram_core.c Anton Vorontsov 2012-06-18 535 prz->vaddr = NULL;
beeb94321a7a6d fs/pstore/ram_core.c Anton Vorontsov 2012-06-18 536 }
f2531f1976d98a fs/pstore/ram_core.c Kees Cook 2018-03-07 537 if (prz->rs_decoder) {
f2531f1976d98a fs/pstore/ram_core.c Kees Cook 2018-03-07 538 free_rs(prz->rs_decoder);
f2531f1976d98a fs/pstore/ram_core.c Kees Cook 2018-03-07 539 prz->rs_decoder = NULL;
f2531f1976d98a fs/pstore/ram_core.c Kees Cook 2018-03-07 540 }
f2531f1976d98a fs/pstore/ram_core.c Kees Cook 2018-03-07 541 kfree(prz->ecc_info.par);
f2531f1976d98a fs/pstore/ram_core.c Kees Cook 2018-03-07 542 prz->ecc_info.par = NULL;
f2531f1976d98a fs/pstore/ram_core.c Kees Cook 2018-03-07 543
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 544 persistent_ram_free_old(prz);
1227daa43bce13 fs/pstore/ram_core.c Kees Cook 2018-10-17 545 kfree(prz->label);
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 546 kfree(prz);
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 547 }
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 548
:::::: The code at line 532 was first introduced by commit
:::::: d3b487695120b5342067244253697eabb121436d staging: android: persistent_ram: Introduce persistent_ram_free()
:::::: TO: Anton Vorontsov <anton.vorontsov@linaro.org>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-12-13 14:14 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=202312132232.faZpeGsh-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rppt@linux.vnet.ibm.com \
/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.