Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2014432rwb; Wed, 30 Nov 2022 00:46:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf6V9AUtpZBf5BXIQzr3V70Ea7DmDmhMtG1i6hZwDTFe6rGdntOHZo/PSAExD7XOOV/vSaEk X-Received: by 2002:a17:90b:30c6:b0:219:11ae:265f with SMTP id hi6-20020a17090b30c600b0021911ae265fmr24861885pjb.194.1669798011902; Wed, 30 Nov 2022 00:46:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669798011; cv=none; d=google.com; s=arc-20160816; b=StIO8jYH5iH3dRPTOaJ1sQFroTD6CiBrZJbg1p1RNidaGScT5EJKHLwNn7xO6nuP10 C7mQKqh2xpPvLG0r/Z/jeVFQGyNZgImRuxx56LeyTbGXDv4+l6Sx2zgV2xoiXDehoVpF 883h1c8PVkgRuhJOsv+vr2tzAznAgojiaEjBRGBoGQCBArq5ZE7D4QU2t1PdfQ1MVJX4 yfLabUrS34lg7Jzlp9CZ3BQ048Ym6kV8PZPVvp1ao+7YJhvDo8WUB6s88qs1e0CETC/3 xXtL6Lv5aTg+5H9crC8h3Pt+KVXEbhMOqB5CPAbdkU7JL04rrl97BL8luVZ9oRveEEXe x3sg== 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 :message-id:date:subject:cc:to:from; bh=/JuH+/tJXVJ+zZwKEeRo//FH7T+DCeh38kkw3mfAZjc=; b=EPYH4Vmdk4lgPZiMdIGdeCphQ3aO180bUH07sy0eUZkJMaFxxMQMnxcuJM5QxvVJcv bnNMKqAfHdiCFyciRhn19adjVacwGxsLfWY0ShXY9lX9+Kei7oQM8AzgQbZIKKLWtBKo 3qp1+iMA+/lN8mcbNzElHk8KOLHNbftQrf6OA3XMKOq4pkgnQArrIL+moU8fpbvLFG7H qwGEIUn8T0Uv0qD3hOdoitiF8AFNOsaCrJcW9NaQLar2TBGWKn9k2hnBb554H6yxVeSv GE0gxh/YM9PjUqOSNM8KQKOfb5eH+TCTz5JkUIArfoCYP043RNl3u0Ym80sUNobEq/0d EqMA== 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 v185-20020a6389c2000000b004780d4430f6si768909pgd.10.2022.11.30.00.46.41; Wed, 30 Nov 2022 00:46:51 -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 S235419AbiK3Ifi (ORCPT + 84 others); Wed, 30 Nov 2022 03:35:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235335AbiK3IfG (ORCPT ); Wed, 30 Nov 2022 03:35:06 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AF36A1FF94 for ; Wed, 30 Nov 2022 00:33:59 -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 046FFD6E; Wed, 30 Nov 2022 00:34:06 -0800 (PST) Received: from a077893.blr.arm.com (unknown [10.162.43.8]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E749C3F73B; Wed, 30 Nov 2022 00:33:56 -0800 (PST) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org, mark.rutland@arm.com Cc: Anshuman Khandual , Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org Subject: [PATCH] arm_pmu: Drop redundant armpmu->map_event() in armpmu_event_init() Date: Wed, 30 Nov 2022 14:03:50 +0530 Message-Id: <20221130083350.264583-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 __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. 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