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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0FF51C43217 for ; Thu, 1 Dec 2022 12:26:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rcupn5sUSjCF3uWLRhp6FH/jzxHd/76ZzMDd5A/w3WQ=; b=njSS866I4WURYZ xMa93U1mONKjqpWekphApfIbdC3ouRgiZovPK6GFYBXRvzegXEsJKoGwuKbay8NS0OyubLoNfaVYp zxAn8OiodDEG/ocaAhfQ3IwioQUwF+fCUwABTR4KveHFZcEX2KU7IHgmb1K6SXKrk7Hz/auoq9UeM OejVoDsSqUrjXklBiIo+lfkB6mJKnD01AarpVnqvQXDv5AoZnLfyWGclyctKQlOv4Y9Vt7/+DIzZT WI7O1CfZSGKMtjL2RtAH/G8mengly8Ziwtx1CKCfyl54YgImWrTGDS07AJ5lacofEE2/wJ5zGe30u CiGZ3bYdfW6wRac8cW8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0icd-007Ihl-Mp; Thu, 01 Dec 2022 12:24:59 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0ica-007IfC-Ln for linux-arm-kernel@lists.infradead.org; Thu, 01 Dec 2022 12:24:58 +0000 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-Disposition: inline In-Reply-To: <20221130083350.264583-1-anshuman.khandual@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221201_042456_784041_B2D1C5B8 X-CRM114-Status: GOOD ( 15.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel