Content-Type: multipart/mixed; boundary="===============0831371424449847700==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v2 7/7] riscv: Use asm/insn.h for jump labels Date: Tue, 01 Feb 2022 07:31:49 +0800 Message-ID: <202202010743.vFAu8dLA-lkp@intel.com> In-Reply-To: <20220131182720.236065-8-kernel@esmil.dk> List-Id: --===============0831371424449847700== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Emil, I love your patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v5.17-rc2 next-20220131] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Emil-Renner-Berthing/Modul= e-relocation-fixes-and-asm-insn-h-header/20220201-023028 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git = 26291c54e111ff6ba87a164d85d4a4e134b7315c config: riscv-randconfig-r012-20220130 (https://download.01.org/0day-ci/arc= hive/20220201/202202010743.vFAu8dLA-lkp(a)intel.com/config) compiler: riscv32-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/5508617c47312c3ddd0318c8e= 084c63f1f77ed5a git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Emil-Renner-Berthing/Module-reloca= tion-fixes-and-asm-insn-h-header/20220201-023028 git checkout 5508617c47312c3ddd0318c8e084c63f1f77ed5a # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Driscv SHELL=3D/bin/bash arch/riscv/kernel/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from arch/riscv/kernel/jump_label.c:12: arch/riscv/include/asm/insn.h: In function 'riscv_insn_valid_32bit_offse= t': >> arch/riscv/include/asm/insn.h:64:17: warning: integer overflow in expres= sion '-2147483648' of type 'long int' results in '-2147483648' [-Woverflow] 64 | return (-(1L << 31) - (1L << 11)) <=3D val && val < ((1L= << 31) - (1L << 11)); | ^ arch/riscv/include/asm/insn.h:64:71: warning: integer overflow in expres= sion of type 'long int' results in '2147481600' [-Woverflow] 64 | return (-(1L << 31) - (1L << 11)) <=3D val && val < ((1L= << 31) - (1L << 11)); | = ^ vim +64 arch/riscv/include/asm/insn.h 4fc4a021bce139 Emil Renner Berthing 2022-01-31 54 = 4fc4a021bce139 Emil Renner Berthing 2022-01-31 55 static inline bool risc= v_insn_valid_32bit_offset(ptrdiff_t val) 4fc4a021bce139 Emil Renner Berthing 2022-01-31 56 { 4fc4a021bce139 Emil Renner Berthing 2022-01-31 57 if (IS_ENABLED(CONFIG_= 32BIT)) 4fc4a021bce139 Emil Renner Berthing 2022-01-31 58 return true; 4fc4a021bce139 Emil Renner Berthing 2022-01-31 59 = 4fc4a021bce139 Emil Renner Berthing 2022-01-31 60 /* 4fc4a021bce139 Emil Renner Berthing 2022-01-31 61 * auipc+jalr can reac= h any PC-relative offset in the range 4fc4a021bce139 Emil Renner Berthing 2022-01-31 62 * [-2^31 - 2^11, 2^31= - 2^11) 4fc4a021bce139 Emil Renner Berthing 2022-01-31 63 */ 4fc4a021bce139 Emil Renner Berthing 2022-01-31 @64 return (-(1L << 31) - = (1L << 11)) <=3D val && val < ((1L << 31) - (1L << 11)); 4fc4a021bce139 Emil Renner Berthing 2022-01-31 65 } 4fc4a021bce139 Emil Renner Berthing 2022-01-31 66 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org --===============0831371424449847700==--