From nobody Thu Apr 18 19:47:16 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34940C25B08 for ; Fri, 5 Aug 2022 20:55:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239543AbiHEUzn (ORCPT ); Fri, 5 Aug 2022 16:55:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237544AbiHEUzg (ORCPT ); Fri, 5 Aug 2022 16:55:36 -0400 Received: from smtp.smtpout.orange.fr (smtp07.smtpout.orange.fr [80.12.242.129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1125013E35 for ; Fri, 5 Aug 2022 13:55:36 -0700 (PDT) Received: from pop-os.home ([90.11.190.129]) by smtp.orange.fr with ESMTPA id K4M1oAZJDoEdDK4M1o1VPQ; Fri, 05 Aug 2022 22:55:34 +0200 X-ME-Helo: pop-os.home X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Fri, 05 Aug 2022 22:55:34 +0200 X-ME-IP: 90.11.190.129 From: Christophe JAILLET To: Will Deacon , Mark Rutland , Robin Murphy Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] perf/arm_pmu_platform: Fix an error message related to dev_err_probe() usage Date: Fri, 5 Aug 2022 22:55:30 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" dev_err() is a macro that expand dev_fmt, but dev_err_probe() is a function and cannot perform this macro expansion. So hard code the "hw perfevents: " prefix and dd a comment explaining why. Fixes: 11fa1dc8020a ("perf/arm_pmu_platform: Use dev_err_probe() for IRQ er= rors") Signed-off-by: Christophe JAILLET --- Untested, but I can't see how it could work. v1 --> v2 - fix a typo in the comment --- drivers/perf/arm_pmu_platform.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/perf/arm_pmu_platform.c b/drivers/perf/arm_pmu_platfor= m.c index 513de1f54e2d..02cca4b8f0fd 100644 --- a/drivers/perf/arm_pmu_platform.c +++ b/drivers/perf/arm_pmu_platform.c @@ -101,8 +101,11 @@ static int pmu_parse_irqs(struct arm_pmu *pmu) struct device *dev =3D &pdev->dev; =20 num_irqs =3D platform_irq_count(pdev); - if (num_irqs < 0) - return dev_err_probe(dev, num_irqs, "unable to count PMU IRQs\n"); + if (num_irqs < 0) { + /* dev_err_probe() does not handle dev_fmt, so hard-code the prefix */ + return dev_err_probe(dev, num_irqs, + "hw perfevents: unable to count PMU IRQs\n"); + } =20 /* * In this case we have no idea which CPUs are covered by the PMU. --=20 2.34.1