[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202209252338.WD1rkClO-lkp@intel.com>
Date: Sun, 25 Sep 2022 15:54:04 +0800
From: kernel test robot <lkp@...el.com>
To: Mark Rutland <mark.rutland@....com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [mark:arm64/insn/rework-redo 17/24]
arch/arm64/lib/test_insn.c:1050:66: warning: variable 'gen_rn' set but not
used
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/insn/rework-redo
head: a3e561e860ce1667f50da94bbc7c079e4552a3d9
commit: 237fa6feb341ba8d4e1addbcfd37efa8b718c7b7 [17/24] arm64: insn: rework LDR (Immediate) immediates
config: arm64-randconfig-s031-20220925
compiler: aarch64-linux-gcc (GCC) 12.1.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-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?id=237fa6feb341ba8d4e1addbcfd37efa8b718c7b7
git remote add mark https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git
git fetch --no-tags mark arm64/insn/rework-redo
git checkout 237fa6feb341ba8d4e1addbcfd37efa8b718c7b7
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
arch/arm64/lib/test_insn.c: In function 'test_insn_ldr_imm':
>> arch/arm64/lib/test_insn.c:1050:66: warning: variable 'gen_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1078:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1078 | TEST_LDST_IMM_CASE(test, ldr_imm,
| ^~~~~~~~~~~~~~~~~~
>> arch/arm64/lib/test_insn.c:1050:58: warning: variable 'obj_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1078:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1078 | TEST_LDST_IMM_CASE(test, ldr_imm,
| ^~~~~~~~~~~~~~~~~~
>> arch/arm64/lib/test_insn.c:1050:66: warning: variable 'gen_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1083:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1083 | TEST_LDST_IMM_CASE(test, ldr_imm,
| ^~~~~~~~~~~~~~~~~~
>> arch/arm64/lib/test_insn.c:1050:58: warning: variable 'obj_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1083:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1083 | TEST_LDST_IMM_CASE(test, ldr_imm,
| ^~~~~~~~~~~~~~~~~~
>> arch/arm64/lib/test_insn.c:1050:66: warning: variable 'gen_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1088:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1088 | TEST_LDST_IMM_CASE(test, ldr_imm,
| ^~~~~~~~~~~~~~~~~~
>> arch/arm64/lib/test_insn.c:1050:58: warning: variable 'obj_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1088:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1088 | TEST_LDST_IMM_CASE(test, ldr_imm,
| ^~~~~~~~~~~~~~~~~~
>> arch/arm64/lib/test_insn.c:1050:66: warning: variable 'gen_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1093:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1093 | TEST_LDST_IMM_CASE(test, ldr_imm,
| ^~~~~~~~~~~~~~~~~~
>> arch/arm64/lib/test_insn.c:1050:58: warning: variable 'obj_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1093:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1093 | TEST_LDST_IMM_CASE(test, ldr_imm,
| ^~~~~~~~~~~~~~~~~~
>> arch/arm64/lib/test_insn.c:1050:66: warning: variable 'gen_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1098:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1098 | TEST_LDST_IMM_CASE(test, ldr_imm,
| ^~~~~~~~~~~~~~~~~~
>> arch/arm64/lib/test_insn.c:1050:58: warning: variable 'obj_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1098:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1098 | TEST_LDST_IMM_CASE(test, ldr_imm,
| ^~~~~~~~~~~~~~~~~~
>> arch/arm64/lib/test_insn.c:1050:66: warning: variable 'gen_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1103:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1103 | TEST_LDST_IMM_CASE(test, ldr_imm,
| ^~~~~~~~~~~~~~~~~~
>> arch/arm64/lib/test_insn.c:1050:58: warning: variable 'obj_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1103:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1103 | TEST_LDST_IMM_CASE(test, ldr_imm,
| ^~~~~~~~~~~~~~~~~~
>> arch/arm64/lib/test_insn.c:1050:66: warning: variable 'gen_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1108:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1108 | TEST_LDST_IMM_CASE(test, ldr_imm,
| ^~~~~~~~~~~~~~~~~~
>> arch/arm64/lib/test_insn.c:1050:58: warning: variable 'obj_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1108:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1108 | TEST_LDST_IMM_CASE(test, ldr_imm,
| ^~~~~~~~~~~~~~~~~~
>> arch/arm64/lib/test_insn.c:1050:66: warning: variable 'gen_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1113:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1113 | TEST_LDST_IMM_CASE(test, ldr_imm,
| ^~~~~~~~~~~~~~~~~~
>> arch/arm64/lib/test_insn.c:1050:58: warning: variable 'obj_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1113:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1113 | TEST_LDST_IMM_CASE(test, ldr_imm,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/lib/test_insn.c: In function 'test_insn_str_imm':
>> arch/arm64/lib/test_insn.c:1050:66: warning: variable 'gen_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1153:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1153 | TEST_LDST_IMM_CASE(test, str_imm,
| ^~~~~~~~~~~~~~~~~~
>> arch/arm64/lib/test_insn.c:1050:58: warning: variable 'obj_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1153:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1153 | TEST_LDST_IMM_CASE(test, str_imm,
| ^~~~~~~~~~~~~~~~~~
>> arch/arm64/lib/test_insn.c:1050:66: warning: variable 'gen_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1158:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1158 | TEST_LDST_IMM_CASE(test, str_imm,
| ^~~~~~~~~~~~~~~~~~
>> arch/arm64/lib/test_insn.c:1050:58: warning: variable 'obj_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1158:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1158 | TEST_LDST_IMM_CASE(test, str_imm,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/lib/test_insn.c:1050:66: warning: variable 'gen_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1163:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1163 | TEST_LDST_IMM_CASE(test, str_imm,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/lib/test_insn.c:1050:58: warning: variable 'obj_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1163:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1163 | TEST_LDST_IMM_CASE(test, str_imm,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/lib/test_insn.c:1050:66: warning: variable 'gen_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1168:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1168 | TEST_LDST_IMM_CASE(test, str_imm,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/lib/test_insn.c:1050:58: warning: variable 'obj_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1168:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1168 | TEST_LDST_IMM_CASE(test, str_imm,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/lib/test_insn.c:1050:66: warning: variable 'gen_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1173:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1173 | TEST_LDST_IMM_CASE(test, str_imm,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/lib/test_insn.c:1050:58: warning: variable 'obj_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1173:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1173 | TEST_LDST_IMM_CASE(test, str_imm,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/lib/test_insn.c:1050:66: warning: variable 'gen_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1178:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1178 | TEST_LDST_IMM_CASE(test, str_imm,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/lib/test_insn.c:1050:58: warning: variable 'obj_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1178:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1178 | TEST_LDST_IMM_CASE(test, str_imm,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/lib/test_insn.c:1050:66: warning: variable 'gen_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1183:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1183 | TEST_LDST_IMM_CASE(test, str_imm,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/lib/test_insn.c:1050:58: warning: variable 'obj_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1183:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1183 | TEST_LDST_IMM_CASE(test, str_imm,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/lib/test_insn.c:1050:66: warning: variable 'gen_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1188:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1188 | TEST_LDST_IMM_CASE(test, str_imm,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/lib/test_insn.c:1050:58: warning: variable 'obj_rn' set but not used [-Wunused-but-set-variable]
1050 | enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
| ^~~~~~
arch/arm64/lib/test_insn.c:1188:9: note: in expansion of macro 'TEST_LDST_IMM_CASE'
1188 | TEST_LDST_IMM_CASE(test, str_imm,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/lib/test_insn.c: At top level:
arch/arm64/lib/test_insn.c:1309:6: warning: no previous prototype for 'test_insn_ldp_pre' [-Wmissing-prototypes]
1309 | void test_insn_ldp_pre(struct kunit *test)
| ^~~~~~~~~~~~~~~~~
arch/arm64/lib/test_insn.c:1378:6: warning: no previous prototype for 'test_insn_stp_pre' [-Wmissing-prototypes]
1378 | void test_insn_stp_pre(struct kunit *test)
| ^~~~~~~~~~~~~~~~~
arch/arm64/lib/test_insn.c:1485:6: warning: no previous prototype for 'test_insn_ldp_post' [-Wmissing-prototypes]
1485 | void test_insn_ldp_post(struct kunit *test)
| ^~~~~~~~~~~~~~~~~~
arch/arm64/lib/test_insn.c:1548:6: warning: no previous prototype for 'test_insn_stp_post' [-Wmissing-prototypes]
1548 | void test_insn_stp_post(struct kunit *test)
| ^~~~~~~~~~~~~~~~~~
vim +/gen_rn +1050 arch/arm64/lib/test_insn.c
1045
1046 #define TEST_LDST_IMM_CASE(test, class, insn, arg_rt, arg_rn, arg_offset, \
1047 arg_size, arg_type) \
1048 do { \
1049 enum aarch64_insn_register rt = REG_IDX(arg_rt), obj_rt, gen_rt; \
> 1050 enum aarch64_insn_register rn = REG_IDX(arg_rn), obj_rn, gen_rn; \
1051 s64 offset = (arg_offset), obj_offset, gen_offset; \
1052 enum aarch64_insn_size_type size = (arg_size); \
1053 enum aarch64_insn_ldst_type type = (arg_type); \
1054 int scale = 1 << size; \
1055 \
1056 u32 obj_insn = INSN_AS_U32(#insn " " #arg_rt ", [" #arg_rn ", %0]", \
1057 "i" (offset)); \
1058 u32 gen_insn = aarch64_insn_gen_load_store_imm(rt, rn, offset, size, type); \
1059 \
1060 obj_rt = aarch64_insn_decode_register(AARCH64_INSN_REGTYPE_RT, obj_insn); \
1061 gen_rt = aarch64_insn_decode_register(AARCH64_INSN_REGTYPE_RT, gen_insn); \
1062 obj_rn = aarch64_insn_decode_register(AARCH64_INSN_REGTYPE_RN, obj_insn); \
1063 gen_rn = aarch64_insn_decode_register(AARCH64_INSN_REGTYPE_RN, gen_insn); \
1064 obj_offset = aarch64_insn_decode_scaled_unsigned_imm12(obj_insn, scale); \
1065 gen_offset = aarch64_insn_decode_scaled_unsigned_imm12(gen_insn, scale); \
1066 \
1067 KUNIT_EXPECT_EQ(test, obj_insn, gen_insn); \
1068 KUNIT_EXPECT_EQ(test, obj_rt, rt); \
1069 KUNIT_EXPECT_EQ(test, gen_rt, rt); \
1070 KUNIT_EXPECT_EQ(test, obj_offset, offset); \
1071 KUNIT_EXPECT_EQ(test, gen_offset, offset); \
1072 INSN_EXPECT_IS(test, class, obj_insn); \
1073 INSN_EXPECT_IS(test, class, gen_insn); \
1074 } while (0)
1075
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (163414 bytes)
Powered by blists - more mailing lists