CC: kbuild-all(a)lists.01.org TO: Gabriel Somlo CC: 0day robot tree: https://github.com/0day-ci/linux/commits/UPDATE-20201223-061018/Gabriel-Somlo/drivers-soc-litex-support-32-bit-subregisters-64-bit-CPUs/20201222-225133 head: 84b136c64cb0afb95001ebb64456bd6aacf84383 commit: 84b136c64cb0afb95001ebb64456bd6aacf84383 drivers/soc/litex: support 32-bit subregisters, 64-bit CPUs date: 4 days ago :::::: branch date: 4 days ago :::::: commit date: 4 days ago config: arm-randconfig-s032-20201221 (attached as .config) compiler: arm-linux-gnueabi-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-184-g1b896707-dirty # https://github.com/0day-ci/linux/commit/84b136c64cb0afb95001ebb64456bd6aacf84383 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review UPDATE-20201223-061018/Gabriel-Somlo/drivers-soc-litex-support-32-bit-subregisters-64-bit-CPUs/20201222-225133 git checkout 84b136c64cb0afb95001ebb64456bd6aacf84383 # 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=arm If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot "sparse warnings: (new ones prefixed by >>)" drivers/soc/litex/litex_soc_ctrl.c: note: in included file: >> include/linux/litex.h:112:23: sparse: sparse: shift too big (32) for type unsigned long >> include/linux/litex.h:112:23: sparse: sparse: shift too big (32) for type unsigned long vim +112 include/linux/litex.h 84b136c64cb0afb Gabriel Somlo 2020-12-22 94 84b136c64cb0afb Gabriel Somlo 2020-12-22 95 /** 84b136c64cb0afb Gabriel Somlo 2020-12-22 96 * litex_get_reg() - Reads the value of the LiteX CSR (Control&Status Register) 84b136c64cb0afb Gabriel Somlo 2020-12-22 97 * @reg: Address of the CSR 84b136c64cb0afb Gabriel Somlo 2020-12-22 98 * @reg_size: The width of the CSR expressed in the number of bytes 84b136c64cb0afb Gabriel Somlo 2020-12-22 99 * 84b136c64cb0afb Gabriel Somlo 2020-12-22 100 * Return: Value read from the CSR 84b136c64cb0afb Gabriel Somlo 2020-12-22 101 * 84b136c64cb0afb Gabriel Somlo 2020-12-22 102 * This function generates a series of subregister reads with a proper offset 84b136c64cb0afb Gabriel Somlo 2020-12-22 103 * and joins their results into a single (possibly multi-byte) LiteX CSR value. 84b136c64cb0afb Gabriel Somlo 2020-12-22 104 */ 84b136c64cb0afb Gabriel Somlo 2020-12-22 105 static inline ulong litex_get_reg(void __iomem *reg, ulong reg_size) 84b136c64cb0afb Gabriel Somlo 2020-12-22 106 { 84b136c64cb0afb Gabriel Somlo 2020-12-22 107 ulong r; 84b136c64cb0afb Gabriel Somlo 2020-12-22 108 u8 i; 84b136c64cb0afb Gabriel Somlo 2020-12-22 109 84b136c64cb0afb Gabriel Somlo 2020-12-22 110 r = _read_litex_subregister(reg); 84b136c64cb0afb Gabriel Somlo 2020-12-22 111 for (i = 1; i < _litex_num_subregs(reg_size); i++) { 84b136c64cb0afb Gabriel Somlo 2020-12-22 @112 r <<= LITEX_SUBREG_SIZE_BIT; 84b136c64cb0afb Gabriel Somlo 2020-12-22 113 reg += LITEX_SUBREG_ALIGN; 84b136c64cb0afb Gabriel Somlo 2020-12-22 114 r |= _read_litex_subregister(reg); 84b136c64cb0afb Gabriel Somlo 2020-12-22 115 } 84b136c64cb0afb Gabriel Somlo 2020-12-22 116 return r; 84b136c64cb0afb Gabriel Somlo 2020-12-22 117 } 22447a99c97e353 Pawel Czarnecki 2020-10-13 118 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org