From: kernel test robot <lkp@intel.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Stafford Horne <shorne@gmail.com>
Subject: fs/pstore/ram_core.c:542:36: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Sat, 16 Jul 2022 03:12:31 +0800 [thread overview]
Message-ID: <202207160349.IPT6QfVO-lkp@intel.com> (raw)
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@intel.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@linaro.org>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next reply other threads:[~2022-07-15 19:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-15 19:12 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-08-05 9:24 fs/pstore/ram_core.c:542:36: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
2020-08-05 9:24 ` kernel test robot
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=202207160349.IPT6QfVO-lkp@intel.com \
--to=lkp@intel.com \
--cc=geert+renesas@glider.be \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shorne@gmail.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.