android_kernel_oneplus_msm8998/arch/x86/tools
Markus Trippelsdorf 0214a8ca61 x86/tools: Fix gcc-7 warning in relocs.c
commit 7ebb916782949621ff6819acf373a06902df7679 upstream.

gcc-7 warns:

In file included from arch/x86/tools/relocs_64.c:17:0:
arch/x86/tools/relocs.c: In function ‘process_64’:
arch/x86/tools/relocs.c:953:2: warning: argument 1 null where non-null expected [-Wnonnull]
  qsort(r->offset, r->count, sizeof(r->offset[0]), cmp_relocs);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/tools/relocs.h:6:0,
                 from arch/x86/tools/relocs_64.c:1:
/usr/include/stdlib.h:741:13: note: in a call to function ‘qsort’ declared here
 extern void qsort

This happens because relocs16 is not used for ELF_BITS == 64,
so there is no point in trying to sort it.

Make the sort_relocs(&relocs16) call 32bit only.

Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Link: http://lkml.kernel.org/r/20161215124513.GA289@x4
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-15 11:57:47 +02:00
..
.gitignore x86, relocs: Refactor the relocs tool to merge 32- and 64-bit ELF 2013-04-16 16:02:58 -07:00
calc_run_size.sh x86, build: replace Perl script with Shell script 2015-01-26 13:37:18 -08:00
chkobjdump.awk
distill.awk
gen-insn-attr-x86.awk x86, insn: Add new opcodes as of June, 2013 2013-08-06 08:08:47 -07:00
insn_sanity.c x86: Remove arbitrary instruction size limit in instruction decoder 2014-11-18 00:58:52 +01:00
Makefile x86/build: Supress "Nothing to be done for ..." messages 2014-04-14 11:44:36 +02:00
relocs.c x86/tools: Fix gcc-7 warning in relocs.c 2017-07-15 11:57:47 +02:00
relocs.h x86, relocs: Add manual debug mode 2014-01-22 04:21:45 -08:00
relocs_32.c x86, relocs: Refactor the relocs tool to merge 32- and 64-bit ELF 2013-04-16 16:02:58 -07:00
relocs_64.c x86, relocs: Refactor the relocs tool to merge 32- and 64-bit ELF 2013-04-16 16:02:58 -07:00
relocs_common.c x86, relocs: Add manual debug mode 2014-01-22 04:21:45 -08:00
test_get_len.c x86: Remove arbitrary instruction size limit in instruction decoder 2014-11-18 00:58:52 +01:00