From: kernel test robot <lkp@intel.com>
To: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Miquel Raynal <miquel.raynal@bootlin.com>
Subject: drivers/mtd/maps/physmap-bt1-rom.c:78:18: sparse: sparse: cast removes address space '__iomem' of expression
Date: Mon, 2 Nov 2020 12:42:57 +0800 [thread overview]
Message-ID: <202011021254.XC70BaQT-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2837 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3cea11cd5e3b00d91caf0b4730194039b45c5891
commit: b3e79e7682e075326df8041b826b03453acacd0a mtd: physmap: Add Baikal-T1 physically mapped ROM support
date: 4 weeks ago
config: sparc64-randconfig-s032-20201031 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.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.3-76-gf680124b-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b3e79e7682e075326df8041b826b03453acacd0a
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b3e79e7682e075326df8041b826b03453acacd0a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sparc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/mtd/maps/physmap-bt1-rom.c:78:18: sparse: sparse: cast removes address space '__iomem' of expression
vim +/__iomem +78 drivers/mtd/maps/physmap-bt1-rom.c
57
58 static void __xipram bt1_rom_map_copy_from(struct map_info *map,
59 void *to, unsigned long from,
60 ssize_t len)
61 {
62 void __iomem *src = map->virt + from;
63 ssize_t shift, chunk;
64 u32 data;
65
66 if (len <= 0 || from >= map->size)
67 return;
68
69 /* Make sure we don't go over the map limit. */
70 len = min_t(ssize_t, map->size - from, len);
71
72 /*
73 * Since requested data size can be pretty big we have to implement
74 * the copy procedure as optimal as possible. That's why it's split
75 * up into the next three stages: unaligned head, aligned body,
76 * unaligned tail.
77 */
> 78 shift = (ssize_t)src & 0x3;
79 if (shift) {
80 chunk = min_t(ssize_t, 4 - shift, len);
81 data = readl_relaxed(src - shift);
82 memcpy(to, &data + shift, chunk);
83 src += chunk;
84 to += chunk;
85 len -= chunk;
86 }
87
88 while (len >= 4) {
89 data = readl_relaxed(src);
90 memcpy(to, &data, 4);
91 src += 4;
92 to += 4;
93 len -= 4;
94 }
95
96 if (len) {
97 data = readl_relaxed(src);
98 memcpy(to, &data, len);
99 }
100 }
101
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36802 bytes --]
next reply other threads:[~2020-11-02 4:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-02 4:42 kernel test robot [this message]
2020-11-10 11:38 ` Serge Semin
2020-11-10 15:35 ` Miquel Raynal
2020-11-11 19:22 ` Serge Semin
2020-11-12 8:27 ` Miquel Raynal
2020-11-12 11:20 ` Serge Semin
2020-11-12 15:00 ` Vignesh Raghavendra
2020-11-12 15:27 ` Serge Semin
2020-11-12 15:43 ` Miquel Raynal
2020-11-12 16:10 ` Serge Semin
2020-11-12 16:15 ` Miquel Raynal
2020-11-12 16:21 ` Serge Semin
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=202011021254.XC70BaQT-lkp@intel.com \
--to=lkp@intel.com \
--cc=Sergey.Semin@baikalelectronics.ru \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miquel.raynal@bootlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome