linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/mtd/maps/physmap-bt1-rom.c:78:18: sparse: sparse: cast removes address space '__iomem' of expression
@ 2020-11-02  4:42 kernel test robot
  2020-11-10 11:38 ` Serge Semin
  0 siblings, 1 reply; 12+ messages in thread
From: kernel test robot @ 2020-11-02  4:42 UTC (permalink / raw)
  To: Serge Semin; +Cc: kbuild-all, linux-kernel, Miquel Raynal

[-- 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 --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-11-12 16:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-02  4:42 drivers/mtd/maps/physmap-bt1-rom.c:78:18: sparse: sparse: cast removes address space '__iomem' of expression kernel test robot
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

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).