android_kernel_samsung_a7y1.../tools
Arnaldo Carvalho de Melo 51afff3d94 perf regs: Make perf_reg_name() return "unknown" instead of NULL
[ Upstream commit 5b596e0ff0e1852197d4c82d3314db5e43126bf7 ]

To avoid breaking the build on arches where this is not wired up, at
least all the other features should be made available and when using
this specific routine, the "unknown" should point the user/developer to
the need to wire this up on this particular hardware architecture.

Detected in a container mipsel debian cross build environment, where it
shows up as:

  In file included from /usr/mipsel-linux-gnu/include/stdio.h:867,
                   from /git/linux/tools/perf/lib/include/perf/cpumap.h:6,
                   from util/session.c:13:
  In function 'printf',
      inlined from 'regs_dump__printf' at util/session.c:1103:3,
      inlined from 'regs__printf' at util/session.c:1131:2:
  /usr/mipsel-linux-gnu/include/bits/stdio2.h:107:10: error: '%-5s' directive argument is null [-Werror=format-overflow=]
    107 |   return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cross compiler details:

  mipsel-linux-gnu-gcc (Debian 9.2.1-8) 9.2.1 20190909

Also on mips64:

  In file included from /usr/mips64-linux-gnuabi64/include/stdio.h:867,
                   from /git/linux/tools/perf/lib/include/perf/cpumap.h:6,
                   from util/session.c:13:
  In function 'printf',
      inlined from 'regs_dump__printf' at util/session.c:1103:3,
      inlined from 'regs__printf' at util/session.c:1131:2,
      inlined from 'regs_user__printf' at util/session.c:1139:3,
      inlined from 'dump_sample' at util/session.c:1246:3,
      inlined from 'machines__deliver_event' at util/session.c:1421:3:
  /usr/mips64-linux-gnuabi64/include/bits/stdio2.h:107:10: error: '%-5s' directive argument is null [-Werror=format-overflow=]
    107 |   return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  In function 'printf',
      inlined from 'regs_dump__printf' at util/session.c:1103:3,
      inlined from 'regs__printf' at util/session.c:1131:2,
      inlined from 'regs_intr__printf' at util/session.c:1147:3,
      inlined from 'dump_sample' at util/session.c:1249:3,
      inlined from 'machines__deliver_event' at util/session.c:1421:3:
  /usr/mips64-linux-gnuabi64/include/bits/stdio2.h:107:10: error: '%-5s' directive argument is null [-Werror=format-overflow=]
    107 |   return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cross compiler details:

  mips64-linux-gnuabi64-gcc (Debian 9.2.1-8) 9.2.1 20190909

Fixes: 2bcd355b71da ("perf tools: Add interface to arch registers sets")
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-95wjyv4o65nuaeweq31t7l1s@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-07 13:23:37 +02:00
..
arch A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
build A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cgroup A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
firewire A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hv Tools: hv: kvp: eliminate 'may be used uninitialized' warning 2020-04-06 21:34:23 +02:00
iio iio: iio-utils: Fix possible incorrect mask calculation 2020-04-06 20:06:12 +02:00
include tools include: Adopt linux/bits.h 2020-04-06 18:15:26 +02:00
laptop/freefall A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lguest A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lib libtraceevent: Fix memory leakage in copy_filter_type 2020-04-07 13:21:50 +02:00
net A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nfsd A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
perf perf regs: Make perf_reg_name() return "unknown" instead of NULL 2020-04-07 13:23:37 +02:00
power tools/power/cpupower: Fix initializer override in hsw_ext_cstates 2020-04-07 13:20:20 +02:00
scripts A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
testing selftests/ftrace: Fix to test kprobe $comm arg only if available 2020-04-07 12:35:29 +02:00
thermal/tmon A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
time A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
usb A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
virtio A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
vm A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30