All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH AUTOSEL 4.4 33/37] perf regs: Make perf_reg_name() return "unknown" instead of NULL
Date: Wed, 11 Dec 2019 10:38:09 -0500	[thread overview]
Message-ID: <20191211153813.24126-33-sashal@kernel.org> (raw)
In-Reply-To: <20191211153813.24126-1-sashal@kernel.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

[ 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>
---
 tools/perf/util/perf_regs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/perf_regs.h b/tools/perf/util/perf_regs.h
index 679d6e4939622..e6324397b295b 100644
--- a/tools/perf/util/perf_regs.h
+++ b/tools/perf/util/perf_regs.h
@@ -26,7 +26,7 @@ int perf_reg_value(u64 *valp, struct regs_dump *regs, int id);
 
 static inline const char *perf_reg_name(int id __maybe_unused)
 {
-	return NULL;
+	return "unknown";
 }
 
 static inline int perf_reg_value(u64 *valp __maybe_unused,
-- 
2.20.1


  parent reply	other threads:[~2019-12-11 15:38 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-11 15:37 [PATCH AUTOSEL 4.4 01/37] scsi: mpt3sas: Fix clear pending bit in ioctl status Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 02/37] scsi: lpfc: Fix locking on mailbox command completion Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 03/37] Input: atmel_mxt_ts - disable IRQ across suspend Sasha Levin
     [not found] ` <20191211153813.24126-1-sashal-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2019-12-11 15:37   ` [PATCH AUTOSEL 4.4 04/37] iommu/tegra-smmu: Fix page tables in > 4 GiB memory Sasha Levin
2019-12-11 15:37     ` Sasha Levin
2019-12-11 15:37     ` Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 05/37] scsi: target: compare full CHAP_A Algorithm strings Sasha Levin
2019-12-11 15:37   ` Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 06/37] scsi: lpfc: Fix SLI3 hba in loop mode not discovering devices Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 07/37] scsi: csiostor: Don't enable IRQs too early Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 08/37] powerpc/pseries: Mark accumulate_stolen_time() as notrace Sasha Levin
2019-12-11 15:37   ` Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 09/37] dma-debug: add a schedule point in debug_dma_dump_mappings() Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 10/37] clocksource/drivers/asm9260: Add a check for of_clk_get Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 11/37] powerpc/security/book3s64: Report L1TF status in sysfs Sasha Levin
2019-12-11 15:37   ` Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 12/37] jbd2: Fix statistics for the number of logged blocks Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 13/37] scsi: tracing: Fix handling of TRANSFER LENGTH == 0 for READ(6) and WRITE(6) Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 14/37] scsi: lpfc: Fix duplicate unreg_rpi error in port offline flow Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 15/37] clk: qcom: Allow constant ratio freq tables for rcg Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 16/37] irqchip/irq-bcm7038-l1: Enable parent IRQ if necessary Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 17/37] irqchip: ingenic: Error out if IRQ domain creation failed Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 18/37] mfd: mfd-core: Honour Device Tree's request to disable a child-device Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 19/37] fs/quota: handle overflows of sysctl fs.quota.* and report as unsigned long Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 20/37] scsi: lpfc: fix: Coverity: lpfc_cmpl_els_rsp(): Null pointer dereferences Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 21/37] scsi: ufs: fix potential bug which ends in system hang Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 22/37] powerpc/pseries/cmm: Implement release() function for sysfs device Sasha Levin
2019-12-11 15:37   ` Sasha Levin
2019-12-11 15:37 ` [PATCH AUTOSEL 4.4 23/37] powerpc/security: Fix wrong message when RFI Flush is disable Sasha Levin
2019-12-11 15:37   ` Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 24/37] clk: pxa: fix one of the pxa RTC clocks Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 25/37] bcache: at least try to shrink 1 node in bch_mca_scan() Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 26/37] HID: Improve Windows Precision Touchpad detection Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 27/37] ext4: work around deleting a file with i_nlink == 0 safely Sasha Levin
2019-12-11 16:19   ` Theodore Y. Ts'o
2019-12-11 18:25     ` Greg KH
2019-12-11 20:04     ` Sasha Levin
2019-12-12 15:17       ` Theodore Y. Ts'o
2019-12-13  0:54         ` Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 28/37] scsi: pm80xx: Fix for SATA device discovery Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 29/37] scsi: target: iscsi: Wait for all commands to finish before freeing a session Sasha Levin
2019-12-11 15:38   ` [PATCH AUTOSEL 4.4 29/37] scsi: target: iscsi: Wait for all commands to finish before freeing a sess Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 30/37] gpio: mpc8xxx: Don't overwrite default irq_set_type callback Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 31/37] scripts/kallsyms: fix definitely-lost memory leak Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 32/37] cdrom: respect device capabilities during opening action Sasha Levin
2019-12-11 15:38 ` Sasha Levin [this message]
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 34/37] libfdt: define INT32_MAX and UINT32_MAX in libfdt_env.h Sasha Levin
2019-12-11 15:38   ` Sasha Levin
2019-12-11 15:38   ` Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 35/37] s390/cpum_sf: Check for SDBT and SDB consistency Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 36/37] ocfs2: fix passing zero to 'PTR_ERR' warning Sasha Levin
2019-12-11 15:38 ` [PATCH AUTOSEL 4.4 37/37] kernel: sysctl: make drop_caches write-only Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191211153813.24126-33-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.