[linux-next:master 5313/5845] arch/arm/mach-omap2/sram.c:78:17: sparse: sparse: cast removes address space '__iomem' of expression

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   e7d6987e09a328d4a949701db40ef63fbb970670
commit: 6eab9bfd712f63c0977f2d38a45f321816030707 [5313/5845] Merge branch 'omap1/multiplatform-prep' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc into arm/multiplatform
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20220424/202204241527.n36cr1e5-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=6eab9bfd712f63c0977f2d38a45f321816030707
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 6eab9bfd712f63c0977f2d38a45f321816030707
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)
>> arch/arm/mach-omap2/sram.c:78:17: sparse: sparse: cast removes address space '__iomem' of expression

vim +/__iomem +78 arch/arm/mach-omap2/sram.c

bd5b46d0540296 Arnd Bergmann 2019-09-20  55  
bd5b46d0540296 Arnd Bergmann 2019-09-20  56  /*
bd5b46d0540296 Arnd Bergmann 2019-09-20  57   * Memory allocator for SRAM: calculates the new ceiling address
bd5b46d0540296 Arnd Bergmann 2019-09-20  58   * for pushing a function using the fncpy API.
bd5b46d0540296 Arnd Bergmann 2019-09-20  59   *
bd5b46d0540296 Arnd Bergmann 2019-09-20  60   * Note that fncpy requires the returned address to be aligned
bd5b46d0540296 Arnd Bergmann 2019-09-20  61   * to an 8-byte boundary.
bd5b46d0540296 Arnd Bergmann 2019-09-20  62   */
bd5b46d0540296 Arnd Bergmann 2019-09-20  63  static void *omap_sram_push_address(unsigned long size)
bd5b46d0540296 Arnd Bergmann 2019-09-20  64  {
bd5b46d0540296 Arnd Bergmann 2019-09-20  65  	unsigned long available, new_ceil = (unsigned long)omap_sram_ceil;
bd5b46d0540296 Arnd Bergmann 2019-09-20  66  
bd5b46d0540296 Arnd Bergmann 2019-09-20  67  	available = omap_sram_ceil - (omap_sram_base + omap_sram_skip);
bd5b46d0540296 Arnd Bergmann 2019-09-20  68  
bd5b46d0540296 Arnd Bergmann 2019-09-20  69  	if (size > available) {
bd5b46d0540296 Arnd Bergmann 2019-09-20  70  		pr_err("Not enough space in SRAM\n");
bd5b46d0540296 Arnd Bergmann 2019-09-20  71  		return NULL;
bd5b46d0540296 Arnd Bergmann 2019-09-20  72  	}
bd5b46d0540296 Arnd Bergmann 2019-09-20  73  
bd5b46d0540296 Arnd Bergmann 2019-09-20  74  	new_ceil -= size;
bd5b46d0540296 Arnd Bergmann 2019-09-20  75  	new_ceil = ROUND_DOWN(new_ceil, FNCPY_ALIGN);
bd5b46d0540296 Arnd Bergmann 2019-09-20  76  	omap_sram_ceil = IOMEM(new_ceil);
bd5b46d0540296 Arnd Bergmann 2019-09-20  77  
bd5b46d0540296 Arnd Bergmann 2019-09-20 @78  	return (void *)omap_sram_ceil;
bd5b46d0540296 Arnd Bergmann 2019-09-20  79  }
bd5b46d0540296 Arnd Bergmann 2019-09-20  80  

:::::: The code at line 78 was first introduced by commit
:::::: bd5b46d054029637b3c8b4918406eae8b9291ccc ARM: omap: un-merge plat/sram.c

:::::: TO: Arnd Bergmann <arnd@xxxxxxxx>
:::::: CC: Arnd Bergmann <arnd@xxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp




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

  Powered by Linux