[linux-next:master 7943/8276] mm/early_ioremap.c:235:31: sparse: incorrect type in argument 1 (different address spaces)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   84db9c17966188a15e1f2266e6ef80b353114c21
commit: 37c651e39edd43099b840daeed4ccf3331ba8def [7943/8276] mm: add utility for early copy from unmapped ram
reproduce:
  # apt-get install sparse
  git checkout 37c651e39edd43099b840daeed4ccf3331ba8def
  make ARCH=x86_64 allmodconfig
  make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> mm/early_ioremap.c:235:31: sparse: incorrect type in argument 1 (different address spaces)
   mm/early_ioremap.c:235:31:    expected void [noderef] <asn:2>*addr
   mm/early_ioremap.c:235:31:    got char *[assigned] p

vim +235 mm/early_ioremap.c

   219	}
   220	
   221	#define MAX_MAP_CHUNK	(NR_FIX_BTMAPS << PAGE_SHIFT)
   222	
   223	void __init copy_from_early_mem(void *dest, phys_addr_t src, unsigned long size)
   224	{
   225		unsigned long slop, clen;
   226		char *p;
   227	
   228		while (size) {
   229			slop = src & ~PAGE_MASK;
   230			clen = size;
   231			if (clen > MAX_MAP_CHUNK - slop)
   232				clen = MAX_MAP_CHUNK - slop;
   233			p = early_memremap(src & PAGE_MASK, clen + slop);
   234			memcpy(dest, p + slop, clen);
 > 235			early_iounmap(p, clen + slop);
   236			dest += clen;
   237			src += clen;
   238			size -= clen;
   239		}
   240	}
   241	
   242	#else /* CONFIG_MMU */
   243	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]