[openeuler:openEuler-1.0-LTS 1757/1757] arch/x86/kernel/unwind_orc.c:199:12: warning: 'orc_sort_cmp' defined but not used

tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: bb7bded3da5e82ce40450cdb7a128c41403bf330 commit: badd79c400ed404df871e1d035bed971d20ead4c [1757/1757] x86/unwind/orc: Remove boot-time ORC unwind tables sorting config: x86_64-buildonly-randconfig-2001-20250816 (https://download.01.org/0day-ci/archive/20250816/202508161516.nk05OTkQ-lkp@i...) compiler: gcc-11 (Debian 11.3.0-12) 11.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250816/202508161516.nk05OTkQ-lkp@i...) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202508161516.nk05OTkQ-lkp@intel.com/ All warnings (new ones prefixed by >>):
arch/x86/kernel/unwind_orc.c:199:12: warning: 'orc_sort_cmp' defined but not used [-Wunused-function] 199 | static int orc_sort_cmp(const void *_a, const void *_b) | ^~~~~~~~~~~~ arch/x86/kernel/unwind_orc.c:179:13: warning: 'orc_sort_swap' defined but not used [-Wunused-function] 179 | static void orc_sort_swap(void *_a, void *_b, int size) | ^~~~~~~~~~~~~ arch/x86/kernel/unwind_orc.o: warning: objtool: missing symbol for section .init.text
vim +/orc_sort_cmp +199 arch/x86/kernel/unwind_orc.c ee9f8fce9964081 Josh Poimboeuf 2017-07-24 178 ee9f8fce9964081 Josh Poimboeuf 2017-07-24 @179 static void orc_sort_swap(void *_a, void *_b, int size) ee9f8fce9964081 Josh Poimboeuf 2017-07-24 180 { ee9f8fce9964081 Josh Poimboeuf 2017-07-24 181 struct orc_entry *orc_a, *orc_b; ee9f8fce9964081 Josh Poimboeuf 2017-07-24 182 struct orc_entry orc_tmp; ee9f8fce9964081 Josh Poimboeuf 2017-07-24 183 int *a = _a, *b = _b, tmp; ee9f8fce9964081 Josh Poimboeuf 2017-07-24 184 int delta = _b - _a; ee9f8fce9964081 Josh Poimboeuf 2017-07-24 185 ee9f8fce9964081 Josh Poimboeuf 2017-07-24 186 /* Swap the .orc_unwind_ip entries: */ ee9f8fce9964081 Josh Poimboeuf 2017-07-24 187 tmp = *a; ee9f8fce9964081 Josh Poimboeuf 2017-07-24 188 *a = *b + delta; ee9f8fce9964081 Josh Poimboeuf 2017-07-24 189 *b = tmp - delta; ee9f8fce9964081 Josh Poimboeuf 2017-07-24 190 ee9f8fce9964081 Josh Poimboeuf 2017-07-24 191 /* Swap the corresponding .orc_unwind entries: */ ee9f8fce9964081 Josh Poimboeuf 2017-07-24 192 orc_a = cur_orc_table + (a - cur_orc_ip_table); ee9f8fce9964081 Josh Poimboeuf 2017-07-24 193 orc_b = cur_orc_table + (b - cur_orc_ip_table); ee9f8fce9964081 Josh Poimboeuf 2017-07-24 194 orc_tmp = *orc_a; ee9f8fce9964081 Josh Poimboeuf 2017-07-24 195 *orc_a = *orc_b; ee9f8fce9964081 Josh Poimboeuf 2017-07-24 196 *orc_b = orc_tmp; ee9f8fce9964081 Josh Poimboeuf 2017-07-24 197 } ee9f8fce9964081 Josh Poimboeuf 2017-07-24 198 ee9f8fce9964081 Josh Poimboeuf 2017-07-24 @199 static int orc_sort_cmp(const void *_a, const void *_b) ee9f8fce9964081 Josh Poimboeuf 2017-07-24 200 { ee9f8fce9964081 Josh Poimboeuf 2017-07-24 201 struct orc_entry *orc_a; ee9f8fce9964081 Josh Poimboeuf 2017-07-24 202 const int *a = _a, *b = _b; ee9f8fce9964081 Josh Poimboeuf 2017-07-24 203 unsigned long a_val = orc_ip(a); ee9f8fce9964081 Josh Poimboeuf 2017-07-24 204 unsigned long b_val = orc_ip(b); ee9f8fce9964081 Josh Poimboeuf 2017-07-24 205 ee9f8fce9964081 Josh Poimboeuf 2017-07-24 206 if (a_val > b_val) ee9f8fce9964081 Josh Poimboeuf 2017-07-24 207 return 1; ee9f8fce9964081 Josh Poimboeuf 2017-07-24 208 if (a_val < b_val) ee9f8fce9964081 Josh Poimboeuf 2017-07-24 209 return -1; ee9f8fce9964081 Josh Poimboeuf 2017-07-24 210 ee9f8fce9964081 Josh Poimboeuf 2017-07-24 211 /* ee9f8fce9964081 Josh Poimboeuf 2017-07-24 212 * The "weak" section terminator entries need to always be on the left ee9f8fce9964081 Josh Poimboeuf 2017-07-24 213 * to ensure the lookup code skips them in favor of real entries. ee9f8fce9964081 Josh Poimboeuf 2017-07-24 214 * These terminator entries exist to handle any gaps created by ee9f8fce9964081 Josh Poimboeuf 2017-07-24 215 * whitelisted .o files which didn't get objtool generation. ee9f8fce9964081 Josh Poimboeuf 2017-07-24 216 */ ee9f8fce9964081 Josh Poimboeuf 2017-07-24 217 orc_a = cur_orc_table + (a - cur_orc_ip_table); d31a580266eeb1f Josh Poimboeuf 2018-05-18 218 return orc_a->sp_reg == ORC_REG_UNDEFINED && !orc_a->end ? -1 : 1; ee9f8fce9964081 Josh Poimboeuf 2017-07-24 219 } ee9f8fce9964081 Josh Poimboeuf 2017-07-24 220 :::::: The code at line 199 was first introduced by commit :::::: ee9f8fce99640811b2b8e79d0d1dbe8bab69ba67 x86/unwind: Add the ORC unwinder :::::: TO: Josh Poimboeuf <jpoimboe@redhat.com> :::::: CC: Ingo Molnar <mingo@kernel.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot