Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2477122pxj; Mon, 10 May 2021 04:03:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwybiOkkI9dx5wkokTP/bXc+cxV7cEikrfHl7ig29JSYy3fUZRC3zsBgeL3ws2LF6B4sHA4 X-Received: by 2002:a50:fb02:: with SMTP id d2mr17327963edq.34.1620644620367; Mon, 10 May 2021 04:03:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620644620; cv=none; d=google.com; s=arc-20160816; b=AfJLLHVWtiIdGk64rBEKI5Vt/WENt1Ube86vF83L1cE3ZV7+dMDeuj/8Q3aPnAvB0q Uh55+nick4a1Uu2w1+CCmARh0mUQRo6BQMYaF9UPzMQWGFBV3DRcFMOYx8EKpDchdXTq dHC7jpEkZcmkow3KQDhQaw4tvTbMEkWHrAtWr/2/+bjdwm8qo5rR39/SMOXN6gJgLML0 obQydGQB34uY0AkJBbkSdmAZNmwwE0dYKUwhrMq4E5YzafPaQkAYGga8XYva6hF8aOYc G1fQIjlYSnOjeeBHbuUsxj8ppMstH86f//14LUh8PYEOUKds298M1R5yfF8VhIf7jwUn aOYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=N/6QPaacwiTdvK7wIpC8G3apI2yZLmyRyQQl0oLNTx4=; b=TKuBZxzdVLsbp9X4J1jM3A9mPUevaXHKFFr/sCpljXqCajvH/gfO9ubv1bV59GWfIU sFnqNwUohc4zr6txr3CWVANAtx/TzfNgmGVf8Ap7WPCPc2nSm8lVmMkI/OL7RLOGIgyo XV9YgpSFx4ypehkWIzpAcoLToetHWL2upeKFTdZGq5gMDh5/FGnJp7BxGG35C48u+fc/ NBZ4dxZj0KurPMFlqsQ2X9ngozF0sglvM0lq4sh7X2UlD3dofqauyLgl7waUqgO7zI9U v/bVBpFvkWt99lUpo4fsP4gqciJx7gTF8Q1OpNrVGDFC6TXTjFiQE+dJnim0sD6O6nDx 2wWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Aasp1Njv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u20si7468807edv.439.2021.05.10.04.03.17; Mon, 10 May 2021 04:03:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Aasp1Njv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234356AbhEJLDQ (ORCPT + 99 others); Mon, 10 May 2021 07:03:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:57152 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233353AbhEJKpj (ORCPT ); Mon, 10 May 2021 06:45:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 68AB961938; Mon, 10 May 2021 10:36:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620642970; bh=yG9grq+n316f7uqm/525+H1xUD6NZDUwXohc5xjtg3I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Aasp1NjvoNuGJlNPFBY0UK8x6JkPM4yRS+pJ9iNGIbEImEeNM76xCG484JX5IBQKD gePk/QM89DvRfcyWXllIz89YkMdTBM/gUIZ8AzjwomYDNqRPYbuFzY4FIU1gfH3+Qz 98fmwmItPFE7QNmrO6L+RmnohKlqjieDi1EuFKVk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Menzel , Robin Murphy , Will Deacon , Sasha Levin Subject: [PATCH 5.10 080/299] perf/arm_pmu_platform: Use dev_err_probe() for IRQ errors Date: Mon, 10 May 2021 12:17:57 +0200 Message-Id: <20210510102007.572419248@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102004.821838356@linuxfoundation.org> References: <20210510102004.821838356@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Robin Murphy [ Upstream commit 11fa1dc8020a2a9e0c59998920092d4df3fb7308 ] By virtue of using platform_irq_get_optional() under the covers, platform_irq_count() needs the target interrupt controller to be available and may return -EPROBE_DEFER if it isn't. Let's use dev_err_probe() to avoid a spurious error log (and help debug any deferral issues) in that case. Reported-by: Paul Menzel Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/073d5e0d3ed1f040592cb47ca6fe3759f40cc7d1.1616774562.git.robin.murphy@arm.com Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- drivers/perf/arm_pmu_platform.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/perf/arm_pmu_platform.c b/drivers/perf/arm_pmu_platform.c index 933bd8410fc2..bb6ae955083a 100644 --- a/drivers/perf/arm_pmu_platform.c +++ b/drivers/perf/arm_pmu_platform.c @@ -6,6 +6,7 @@ * Copyright (C) 2010 ARM Ltd., Will Deacon */ #define pr_fmt(fmt) "hw perfevents: " fmt +#define dev_fmt pr_fmt #include #include @@ -100,10 +101,8 @@ static int pmu_parse_irqs(struct arm_pmu *pmu) struct pmu_hw_events __percpu *hw_events = pmu->hw_events; num_irqs = platform_irq_count(pdev); - if (num_irqs < 0) { - pr_err("unable to count PMU IRQs\n"); - return num_irqs; - } + if (num_irqs < 0) + return dev_err_probe(&pdev->dev, num_irqs, "unable to count PMU IRQs\n"); /* * In this case we have no idea which CPUs are covered by the PMU. -- 2.30.2