Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1676312rdb; Sun, 8 Oct 2023 21:12:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFSN/h6HQYtx3erDadaNiertvnHpkNAB+eg2bfMDLbuc5AVu8yh0HBlB25cn5PxYpZnuwSt X-Received: by 2002:a05:6870:14c1:b0:1b0:89e0:114f with SMTP id l1-20020a05687014c100b001b089e0114fmr17526658oab.31.1696824744878; Sun, 08 Oct 2023 21:12:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696824744; cv=none; d=google.com; s=arc-20160816; b=e93Tm8+16llq2dPUrVaYySG4Mi1tO5NOhkewH5SQAfptkmIv3A0C3o9KWggMCZTGAC aWrhkDbixsN7hOBuReERoDNiVjOw4yBPywCUcWupJ8pD9ddLsWuui9WxqKjNEin+pvaU V0e5N+STye+u96nhMUcOujdtlcPbEOjREH1eqxhc6Z/17sZU2vsRkPq30XHjXpW5NSbd /xmQ1Gc9dLTWA6OUYff7GibQ/EAX8ZHlDvlnSvbNQ5MLPaA+L2YxSmr5StSM4qbpzTOx 5Ja1/EYUwbOrUQ+KLGxAzu/w+dTuxbW+sElUwB9z4TX6+cERZVulE5X4iN+J88VeLKQP MSSw== 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=n4sLM3iVltsy8BQAmGgCXcvB9Oyt9icjJqxDwsQUlxo=; fh=s03SIMIeJHh4tNM3mw7pRMBjGeQiA04Y7AfUJ3pCpAI=; b=MeItV1YtGhD/alPfSVVpTa5lIHYKM/k2UpciuY+SKDIgHuApPfOh2pllmRCZExycuY 6Mg3UWTN1/4HaRBhdvSn9VQZG9yo1HGNIicDzfBV1hiOs+nP4DEjiid8lAufsfED+pfl 8jRvS9DhIHZ4JxOzKkM6Bnrk+6T+652HHtpvxjsmjT7IXWnpy0DFTn5yokahLh9tGZoP M+Xva7evRfCNzzu7P56V5TruaqqXswuCcYBLg+d5IRwh9DNnH90hkelenj3OQnLRKJ8C 9gu7MEoSvb1cOWYJeHOsI2z6imCUyZOJDScTv5lbrmKoBnAFglAQbKBqseEmaARy4HRN JBVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id l71-20020a63884a000000b00573fc6de956si8940269pgd.223.2023.10.08.21.12.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Oct 2023 21:12:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id E254E80AF241; Sun, 8 Oct 2023 21:12:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345030AbjJID4w (ORCPT + 99 others); Sun, 8 Oct 2023 23:56:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344883AbjJID4v (ORCPT ); Sun, 8 Oct 2023 23:56:51 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 12DB0A3 for ; Sun, 8 Oct 2023 20:56:50 -0700 (PDT) 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 B43831FB; Sun, 8 Oct 2023 20:57:29 -0700 (PDT) Received: from a077893.blr.arm.com (a077893.blr.arm.com [10.162.41.8]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 779503F7A6; Sun, 8 Oct 2023 20:56:47 -0700 (PDT) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org Cc: Anshuman Khandual , Will Deacon , Mark Rutland , linux-kernel@vger.kernel.org Subject: [PATCH] driver: perf: arm_pmu: Drop some unused arguments from armv8_pmu_init() Date: Mon, 9 Oct 2023 09:26:38 +0530 Message-Id: <20231009035638.165270-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=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sun, 08 Oct 2023 21:12:22 -0700 (PDT) X-Spam-Level: ** There is just a single call site remaining for armv8_pmu_init(), passing on NULL pointers for all custom 'struct attribute_group'. These arguments are not really getting used and hence can just be dropped off, thus simplifying the code further. 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.6-rc5. drivers/perf/arm_pmuv3.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/perf/arm_pmuv3.c b/drivers/perf/arm_pmuv3.c index 8fcaa26f0f8a..fe4db1831662 100644 --- a/drivers/perf/arm_pmuv3.c +++ b/drivers/perf/arm_pmuv3.c @@ -1187,10 +1187,7 @@ static void armv8_pmu_register_sysctl_table(void) } static int armv8_pmu_init(struct arm_pmu *cpu_pmu, char *name, - int (*map_event)(struct perf_event *event), - const struct attribute_group *events, - const struct attribute_group *format, - const struct attribute_group *caps) + int (*map_event)(struct perf_event *event)) { int ret = armv8pmu_probe_pmu(cpu_pmu); if (ret) @@ -1212,13 +1209,9 @@ static int armv8_pmu_init(struct arm_pmu *cpu_pmu, char *name, cpu_pmu->name = name; cpu_pmu->map_event = map_event; - cpu_pmu->attr_groups[ARMPMU_ATTR_GROUP_EVENTS] = events ? - events : &armv8_pmuv3_events_attr_group; - cpu_pmu->attr_groups[ARMPMU_ATTR_GROUP_FORMATS] = format ? - format : &armv8_pmuv3_format_attr_group; - cpu_pmu->attr_groups[ARMPMU_ATTR_GROUP_CAPS] = caps ? - caps : &armv8_pmuv3_caps_attr_group; - + cpu_pmu->attr_groups[ARMPMU_ATTR_GROUP_EVENTS] = &armv8_pmuv3_events_attr_group; + cpu_pmu->attr_groups[ARMPMU_ATTR_GROUP_FORMATS] = &armv8_pmuv3_format_attr_group; + cpu_pmu->attr_groups[ARMPMU_ATTR_GROUP_CAPS] = &armv8_pmuv3_caps_attr_group; armv8_pmu_register_sysctl_table(); return 0; } @@ -1226,7 +1219,7 @@ static int armv8_pmu_init(struct arm_pmu *cpu_pmu, char *name, static int armv8_pmu_init_nogroups(struct arm_pmu *cpu_pmu, char *name, int (*map_event)(struct perf_event *event)) { - return armv8_pmu_init(cpu_pmu, name, map_event, NULL, NULL, NULL); + return armv8_pmu_init(cpu_pmu, name, map_event); } #define PMUV3_INIT_SIMPLE(name) \ -- 2.25.1