From mboxrd@z Thu Jan 1 00:00:00 1970 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 CE0D0C43217 for ; Thu, 1 Dec 2022 12:24:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231148AbiLAMYp (ORCPT ); Thu, 1 Dec 2022 07:24:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229706AbiLAMYn (ORCPT ); Thu, 1 Dec 2022 07:24:43 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9F9CD5AE1C for ; Thu, 1 Dec 2022 04:24:42 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0FCC9D6E; Thu, 1 Dec 2022 04:24:49 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.5.176]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6D1863F73D; Thu, 1 Dec 2022 04:24:41 -0800 (PST) Date: Thu, 1 Dec 2022 12:24:35 +0000 From: Mark Rutland To: Anshuman Khandual Cc: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm_pmu: Drop redundant armpmu->map_event() in armpmu_event_init() Message-ID: References: <20221130083350.264583-1-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221130083350.264583-1-anshuman.khandual@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 30, 2022 at 02:03:50PM +0530, Anshuman Khandual wrote: > __hw_perf_event_init() already calls armpmu->map_event() callback, and also > returns its error code including -ENOENT, along with a debug callout. Hence > an additional armpmu->map_event() check for -ENOENT is redundant. Hmm; it looks like this has been redundant since commit: e1f431b57ef9e4a6 ("ARM: perf: refactor event mapping") ... and was an oversight on my behalf. This looks fine to me, so FWIW: Acked-by: Mark Rutland Mark. > > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Mark Rutland > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Anshuman Khandual > --- > This applies on v6.1-rc6 > > drivers/perf/arm_pmu.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c > index 6538cec1a601..4be6869005f1 100644 > --- a/drivers/perf/arm_pmu.c > +++ b/drivers/perf/arm_pmu.c > @@ -529,10 +529,6 @@ static int armpmu_event_init(struct perf_event *event) > return -EOPNOTSUPP; > } > } > - > - if (armpmu->map_event(event) == -ENOENT) > - return -ENOENT; > - > return __hw_perf_event_init(event); > } > > -- > 2.25.1 >