tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 95065cb54210eba86bed10cb2118041524d54573 commit: 69a75a1a47d80aaade0c1604d1dcc1f2570515f4 [7033/7280] mtd: physmap: physmap-bt1-rom: Fix __iomem addrspace removal warning config: arm64-randconfig-r031-20201123 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c8c3a411c50f541ce5362bd60ee3f8fe43ac2722) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=69a75a1a47d80aaade0c1604d1dcc1f2570515f4 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 69a75a1a47d80aaade0c1604d1dcc1f2570515f4 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): >> drivers/mtd/maps/physmap-bt1-rom.c:39:10: warning: cast to smaller integer type 'unsigned int' from 'void *' [-Wvoid-pointer-to-int-cast] shift = (unsigned int)src & 0x3; ^~~~~~~~~~~~~~~~~ drivers/mtd/maps/physmap-bt1-rom.c:78:10: warning: cast to smaller integer type 'unsigned int' from 'void *' [-Wvoid-pointer-to-int-cast] shift = (unsigned int)src & 0x3; ^~~~~~~~~~~~~~~~~ 2 warnings generated. vim +39 drivers/mtd/maps/physmap-bt1-rom.c 23 24 /* 25 * Baikal-T1 SoC ROMs are only accessible by the dword-aligned instructions. 26 * We have to take this into account when implementing the data read-methods. 27 * Note there is no need in bothering with endianness, since both Baikal-T1 28 * CPU and MMIO are LE. 29 */ 30 static map_word __xipram bt1_rom_map_read(struct map_info *map, 31 unsigned long ofs) 32 { 33 void __iomem *src = map->virt + ofs; 34 unsigned int shift; 35 map_word ret; 36 u32 data; 37 38 /* Read data within offset dword. */ > 39 shift = (unsigned int)src & 0x3; 40 data = readl_relaxed(src - shift); 41 if (!shift) { 42 ret.x[0] = data; 43 return ret; 44 } 45 ret.x[0] = data >> (shift * BITS_PER_BYTE); 46 47 /* Read data from the next dword. */ 48 shift = 4 - shift; 49 if (ofs + shift >= map->size) 50 return ret; 51 52 data = readl_relaxed(src + shift); 53 ret.x[0] |= data << (shift * BITS_PER_BYTE); 54 55 return ret; 56 } 57 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip