[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202207160349.IPT6QfVO-lkp@intel.com>
Date: Sat, 16 Jul 2022 03:12:31 +0800
From: kernel test robot <lkp@...el.com>
To: Geert Uytterhoeven <geert+renesas@...der.be>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Stafford Horne <shorne@...il.com>
Subject: fs/pstore/ram_core.c:542:36: sparse: sparse: incorrect type in
argument 1 (different address spaces)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9b59ec8d50a1f28747ceff9a4f39af5deba9540e
commit: 031c7a8cd6fc565e90320bf08f22ee6e70f9d969 openrisc: io: Add missing __iomem annotation to iounmap()
date: 1 year, 6 months ago
config: openrisc-randconfig-s033-20220715 (https://download.01.org/0day-ci/archive/20220716/202207160349.IPT6QfVO-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=031c7a8cd6fc565e90320bf08f22ee6e70f9d969
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 031c7a8cd6fc565e90320bf08f22ee6e70f9d969
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=openrisc SHELL=/bin/bash fs/pstore/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
fs/pstore/ram_core.c:278: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:278:34: sparse: expected void volatile [noderef] __iomem *addr
fs/pstore/ram_core.c:278:34: sparse: got unsigned char *
fs/pstore/ram_core.c:311: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:311:50: sparse: expected void const volatile [noderef] __iomem *addr
fs/pstore/ram_core.c:311:50: sparse: got unsigned char *
fs/pstore/ram_core.c:312: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:312:65: sparse: expected void const volatile [noderef] __iomem *addr
fs/pstore/ram_core.c:312: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:542:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void *vaddr @@
fs/pstore/ram_core.c:542:36: sparse: expected void [noderef] __iomem *addr
fs/pstore/ram_core.c:542:36: sparse: got void *vaddr
fs/pstore/ram_core.c:69:17: sparse: sparse: context imbalance in 'buffer_start_add' - unexpected unlock
fs/pstore/ram_core.c:95:17: sparse: sparse: context imbalance in 'buffer_size_add' - unexpected unlock
vim +542 fs/pstore/ram_core.c
bb4206f2042d95 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 531
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 532 void persistent_ram_free(struct persistent_ram_zone *prz)
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 533 {
beeb94321a7a6d fs/pstore/ram_core.c Anton Vorontsov 2012-06-18 534 if (!prz)
beeb94321a7a6d fs/pstore/ram_core.c Anton Vorontsov 2012-06-18 535 return;
beeb94321a7a6d fs/pstore/ram_core.c Anton Vorontsov 2012-06-18 536
beeb94321a7a6d fs/pstore/ram_core.c Anton Vorontsov 2012-06-18 537 if (prz->vaddr) {
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 538 if (pfn_valid(prz->paddr >> PAGE_SHIFT)) {
831b624df1b420 fs/pstore/ram_core.c Bin Yang 2018-09-12 539 /* We must vunmap() at page-granularity. */
831b624df1b420 fs/pstore/ram_core.c Bin Yang 2018-09-12 540 vunmap(prz->vaddr - offset_in_page(prz->paddr));
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 541 } else {
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 @542 iounmap(prz->vaddr);
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 543 release_mem_region(prz->paddr, prz->size);
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 544 }
beeb94321a7a6d fs/pstore/ram_core.c Anton Vorontsov 2012-06-18 545 prz->vaddr = NULL;
beeb94321a7a6d fs/pstore/ram_core.c Anton Vorontsov 2012-06-18 546 }
f2531f1976d98a fs/pstore/ram_core.c Kees Cook 2018-03-07 547 if (prz->rs_decoder) {
f2531f1976d98a fs/pstore/ram_core.c Kees Cook 2018-03-07 548 free_rs(prz->rs_decoder);
f2531f1976d98a fs/pstore/ram_core.c Kees Cook 2018-03-07 549 prz->rs_decoder = NULL;
f2531f1976d98a fs/pstore/ram_core.c Kees Cook 2018-03-07 550 }
f2531f1976d98a fs/pstore/ram_core.c Kees Cook 2018-03-07 551 kfree(prz->ecc_info.par);
f2531f1976d98a fs/pstore/ram_core.c Kees Cook 2018-03-07 552 prz->ecc_info.par = NULL;
f2531f1976d98a fs/pstore/ram_core.c Kees Cook 2018-03-07 553
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 554 persistent_ram_free_old(prz);
1227daa43bce13 fs/pstore/ram_core.c Kees Cook 2018-10-17 555 kfree(prz->label);
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 556 kfree(prz);
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 557 }
d3b487695120b5 drivers/staging/android/persistent_ram.c Anton Vorontsov 2012-05-11 558
:::::: The code at line 542 was first introduced by commit
:::::: d3b487695120b5342067244253697eabb121436d staging: android: persistent_ram: Introduce persistent_ram_free()
:::::: TO: Anton Vorontsov <anton.vorontsov@...aro.org>
:::::: CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists