Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp471461rwb; Thu, 1 Dec 2022 04:42:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf6s8v7DNJnJNWWxJwRntvEOrLWmwnTlhCgRb3fciKEXA+p+EVYycbMPbuWOGrzXEJU/46wO X-Received: by 2002:a17:902:bd04:b0:189:38a1:30fe with SMTP id p4-20020a170902bd0400b0018938a130femr44246142pls.47.1669898561585; Thu, 01 Dec 2022 04:42:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669898561; cv=none; d=google.com; s=arc-20160816; b=I/SjP6k48AEOQd/Gp82+q/ZmMOjoji7BBXzupmB37q//B0Yfb2s28SfkkNo68LxCtF VVK0dmovac+zafWOIZpH+zLvZ2MgNbrXhYhzhInJ0YsOxR55nHsA1fG3oeUo2ECuS4DG YbNC8Nb7QJ5ij5h7ti+ABFgQEbALN9XOp7kZDj7LaDSZtwdZHjiIeonX5KAPdeOOWf1e B1GgRYdJDgTWrvdLH0zfa9uO8MPhN5SrmHcroz43oxhuiw839sSHZjabdUoM+VuRxsNU G4/RtQKDVNFQKdA30OMf4IOBGk3gLuBoclf5v+rpIC7nRA+dtUNoazEgzMvuCnmZpEJK P+NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=mM/HF9PifYCWFR6WB6I2nfWzw9dzfmxM/gr6ec/11L8=; b=Bp6ktf+yGk1LaudqEv2YrOS0ret5oBkx7rEWSCO6q0YyLiYyctm2kfciw3ktQjLZKL G2VgdkznlPr4tgCHJJkY/ASM4SZnsSHoz0mKdHX0bkVOT/nd06ZoQmAGz4c2TVR/glda Y7HY+3SQN6AEPH/HIJPv+lBAlNd9gFOOxi4frSnLkQ3vESu/0LaXEZf5k20n6nUJDYj1 6PVG8FFsVjrzUXfdZLxd7mQfLgKa/OjjNveqDfu2ednI++3QuTbF1LSVcDK55BIgq3A4 CADNXeet+kQbhBVf4+dI7f2Ps0prmQK+MF4KFmQNTIAZdP3nXqAO7ulL7QahnTgBkCJY XSlQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bd4-20020a170902830400b0018956e3ff71si3816115plb.473.2022.12.01.04.42.29; Thu, 01 Dec 2022 04:42:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230471AbiLAMYp (ORCPT + 82 others); 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> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 >