Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4369839rwl; Mon, 3 Apr 2023 04:08:26 -0700 (PDT) X-Google-Smtp-Source: AKy350ZfP3exwtEebJPXNFdRTEArsyi123IiyuV63ZmUNg2wmxHfAt5DGSU1NcWeilvsoj6Aun+T X-Received: by 2002:a17:902:da81:b0:1a2:8c7e:f301 with SMTP id j1-20020a170902da8100b001a28c7ef301mr18632058plx.45.1680520106516; Mon, 03 Apr 2023 04:08:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680520106; cv=none; d=google.com; s=arc-20160816; b=b3VqBu5n9yEzrqypBpsYzUMz7gYoIhMcYj3XqnlTlePZ1K09KjQE+wf574aohW+4ed zhilBj5oJDBuhPdMGC4tP8FDQRYKWbE23ECg0P29VwooROn7p96M4+UW0jtmZbOn7zPG gnEhsDnB6caO2lSfZcSmH57BA11IbTQnS/HZ98H1/Q6ifqgiRDEe//vVKaHxmVtsPdrr lExgTfOoySlXqcsdDPjOFCk6A+zQH7PKV0YGmksklMwZksLtcTRz3PkIANJECZH/Fuf3 7sQZrp+GTEo9B+j8+WU0l+5cqKVKkTcOJSrlS+cabdZ8drsbYdhd46AAGB0RESpB9Htt JWoA== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=e+akyrKoNfTQgO3WwBrTC3WQRtGxTfLbHFHGfgJvRHw=; b=I1Q71z2L2hXscQ0N/n1KC9J75Yt0fN6uvpapbNH2bcUjzkCt3trOxuJdq7NcF+oTZX XNJDeiw8274JdWgY7+rv4Vrf/1O1A2qr5YPwgPsUNZ9cukMHXn7gm9qXTxmbDI1IhHht lNNsKm66CizbEkw6rT96qfBoQ2i9xH/H4ekZnXVodQO0zkOpqcQ8Srcm5D4dAX0MMhe1 o/kK/B15dVE0gcPa0y3gigmQ3cSIOUKT/Pd3JcXT2mgbJ4xty0PAHbEXZUjg9wqqEIje ZGovtvdGl6lD4d2uHt0TgohfiQ5vGr7y7XvID0t/TYwg7bF9NjGSL7S+d1i0QEBSzNk1 90HQ== 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv62-20020a632e41000000b00502f344050csi7733543pgb.313.2023.04.03.04.08.15; Mon, 03 Apr 2023 04:08:26 -0700 (PDT) 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229752AbjDCLDQ (ORCPT + 99 others); Mon, 3 Apr 2023 07:03:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231248AbjDCLDP (ORCPT ); Mon, 3 Apr 2023 07:03:15 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3157F11EB0 for ; Mon, 3 Apr 2023 04:02:55 -0700 (PDT) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Pqnxk5RLnz6J6q1; Mon, 3 Apr 2023 19:00:58 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 3 Apr 2023 12:02:52 +0100 Date: Mon, 3 Apr 2023 12:02:51 +0100 From: Jonathan Cameron To: Junhao He CC: , , , , , , , , , , Subject: Re: [PATCH 1/2] drivers/perf: hisi: Remove redundant initialized of pmu->name Message-ID: <20230403120251.00003fd7@Huawei.com> In-Reply-To: <20230403081423.62460-2-hejunhao3@huawei.com> References: <20230403081423.62460-1-hejunhao3@huawei.com> <20230403081423.62460-2-hejunhao3@huawei.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml500002.china.huawei.com (7.191.160.78) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Mon, 3 Apr 2023 16:14:22 +0800 Junhao He wrote: > "pmu->name" is initialized by perf_pmu_register() function, so remove > the redundant initialized in hisi_pmu_init(). > > Signed-off-by: Junhao He LGTM Reviewed-by: Jonathan Cameron > --- > drivers/perf/hisilicon/hisi_uncore_cpa_pmu.c | 2 +- > drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 2 +- > drivers/perf/hisilicon/hisi_uncore_hha_pmu.c | 2 +- > drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 2 +- > drivers/perf/hisilicon/hisi_uncore_pa_pmu.c | 2 +- > drivers/perf/hisilicon/hisi_uncore_pmu.c | 4 +--- > drivers/perf/hisilicon/hisi_uncore_pmu.h | 3 +-- > drivers/perf/hisilicon/hisi_uncore_sllc_pmu.c | 2 +- > 8 files changed, 8 insertions(+), 11 deletions(-) > > diff --git a/drivers/perf/hisilicon/hisi_uncore_cpa_pmu.c b/drivers/perf/hisilicon/hisi_uncore_cpa_pmu.c > index 4c67d57217a7..40f1bc9f9b91 100644 > --- a/drivers/perf/hisilicon/hisi_uncore_cpa_pmu.c > +++ b/drivers/perf/hisilicon/hisi_uncore_cpa_pmu.c > @@ -316,7 +316,7 @@ static int hisi_cpa_pmu_probe(struct platform_device *pdev) > if (!name) > return -ENOMEM; > > - hisi_pmu_init(cpa_pmu, name, THIS_MODULE); > + hisi_pmu_init(cpa_pmu, THIS_MODULE); > > /* Power Management should be disabled before using CPA PMU. */ > hisi_cpa_pmu_disable_pm(cpa_pmu); > diff --git a/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c b/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c > index 8c3ffcbfd4c0..8a3d74ddcd6d 100644 > --- a/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c > +++ b/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c > @@ -516,7 +516,7 @@ static int hisi_ddrc_pmu_probe(struct platform_device *pdev) > "hisi_sccl%u_ddrc%u", ddrc_pmu->sccl_id, > ddrc_pmu->index_id); > > - hisi_pmu_init(ddrc_pmu, name, THIS_MODULE); > + hisi_pmu_init(ddrc_pmu, THIS_MODULE); > > ret = perf_pmu_register(&ddrc_pmu->pmu, name, -1); > if (ret) { > diff --git a/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c b/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c > index 806698b9eabf..5701a84edb0e 100644 > --- a/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c > +++ b/drivers/perf/hisilicon/hisi_uncore_hha_pmu.c > @@ -519,7 +519,7 @@ static int hisi_hha_pmu_probe(struct platform_device *pdev) > > name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "hisi_sccl%u_hha%u", > hha_pmu->sccl_id, hha_pmu->index_id); > - hisi_pmu_init(hha_pmu, name, THIS_MODULE); > + hisi_pmu_init(hha_pmu, THIS_MODULE); > > ret = perf_pmu_register(&hha_pmu->pmu, name, -1); > if (ret) { > diff --git a/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c b/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c > index 5b2c35f1658a..68596b566344 100644 > --- a/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c > +++ b/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c > @@ -557,7 +557,7 @@ static int hisi_l3c_pmu_probe(struct platform_device *pdev) > */ > name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "hisi_sccl%u_l3c%u", > l3c_pmu->sccl_id, l3c_pmu->ccl_id); > - hisi_pmu_init(l3c_pmu, name, THIS_MODULE); > + hisi_pmu_init(l3c_pmu, THIS_MODULE); > > ret = perf_pmu_register(&l3c_pmu->pmu, name, -1); > if (ret) { > diff --git a/drivers/perf/hisilicon/hisi_uncore_pa_pmu.c b/drivers/perf/hisilicon/hisi_uncore_pa_pmu.c > index afe3419f3f6d..71b6687d6696 100644 > --- a/drivers/perf/hisilicon/hisi_uncore_pa_pmu.c > +++ b/drivers/perf/hisilicon/hisi_uncore_pa_pmu.c > @@ -412,7 +412,7 @@ static int hisi_pa_pmu_probe(struct platform_device *pdev) > return ret; > } > > - hisi_pmu_init(pa_pmu, name, THIS_MODULE); > + hisi_pmu_init(pa_pmu, THIS_MODULE); > ret = perf_pmu_register(&pa_pmu->pmu, name, -1); > if (ret) { > dev_err(pa_pmu->dev, "PMU register failed, ret = %d\n", ret); > diff --git a/drivers/perf/hisilicon/hisi_uncore_pmu.c b/drivers/perf/hisilicon/hisi_uncore_pmu.c > index f1b0f5e1a28f..2823f381930d 100644 > --- a/drivers/perf/hisilicon/hisi_uncore_pmu.c > +++ b/drivers/perf/hisilicon/hisi_uncore_pmu.c > @@ -531,12 +531,10 @@ int hisi_uncore_pmu_offline_cpu(unsigned int cpu, struct hlist_node *node) > } > EXPORT_SYMBOL_GPL(hisi_uncore_pmu_offline_cpu); > > -void hisi_pmu_init(struct hisi_pmu *hisi_pmu, const char *name, > - struct module *module) > +void hisi_pmu_init(struct hisi_pmu *hisi_pmu, struct module *module) > { > struct pmu *pmu = &hisi_pmu->pmu; > > - pmu->name = name; > pmu->module = module; > pmu->task_ctx_nr = perf_invalid_context; > pmu->event_init = hisi_uncore_pmu_event_init; > diff --git a/drivers/perf/hisilicon/hisi_uncore_pmu.h b/drivers/perf/hisilicon/hisi_uncore_pmu.h > index f8e3cc6903d7..07890a8e96ca 100644 > --- a/drivers/perf/hisilicon/hisi_uncore_pmu.h > +++ b/drivers/perf/hisilicon/hisi_uncore_pmu.h > @@ -121,6 +121,5 @@ ssize_t hisi_uncore_pmu_identifier_attr_show(struct device *dev, > int hisi_uncore_pmu_init_irq(struct hisi_pmu *hisi_pmu, > struct platform_device *pdev); > > -void hisi_pmu_init(struct hisi_pmu *hisi_pmu, const char *name, > - struct module *module); > +void hisi_pmu_init(struct hisi_pmu *hisi_pmu, struct module *module); > #endif /* __HISI_UNCORE_PMU_H__ */ > diff --git a/drivers/perf/hisilicon/hisi_uncore_sllc_pmu.c b/drivers/perf/hisilicon/hisi_uncore_sllc_pmu.c > index 1e354433776a..6fe534a665ed 100644 > --- a/drivers/perf/hisilicon/hisi_uncore_sllc_pmu.c > +++ b/drivers/perf/hisilicon/hisi_uncore_sllc_pmu.c > @@ -445,7 +445,7 @@ static int hisi_sllc_pmu_probe(struct platform_device *pdev) > return ret; > } > > - hisi_pmu_init(sllc_pmu, name, THIS_MODULE); > + hisi_pmu_init(sllc_pmu, THIS_MODULE); > > ret = perf_pmu_register(&sllc_pmu->pmu, name, -1); > if (ret) {