drivers/perf: hisi: Remove redundant initialized of pmu->name
authorJunhao He <hejunhao3@huawei.com>
Mon, 3 Apr 2023 08:14:22 +0000 (16:14 +0800)
committerWill Deacon <will@kernel.org>
Mon, 17 Apr 2023 12:14:10 +0000 (13:14 +0100)
"pmu->name" is initialized by perf_pmu_register() function, so remove
the redundant initialized in hisi_pmu_init().

Signed-off-by: Junhao He <hejunhao3@huawei.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20230403081423.62460-2-hejunhao3@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/hisilicon/hisi_uncore_cpa_pmu.c
drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c
drivers/perf/hisilicon/hisi_uncore_hha_pmu.c
drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c
drivers/perf/hisilicon/hisi_uncore_pa_pmu.c
drivers/perf/hisilicon/hisi_uncore_pmu.c
drivers/perf/hisilicon/hisi_uncore_pmu.h
drivers/perf/hisilicon/hisi_uncore_sllc_pmu.c

index 4c67d57217a7aeb909a1df0b52b16cc557a546fc..40f1bc9f9b9136df89f2af54ad76fcaafb57b99f 100644 (file)
@@ -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);
index 8c3ffcbfd4c0e2c8fde2b9fabf7a92e58a34d227..8a3d74ddcd6dd92ef848f52baa25bcb842220ab1 100644 (file)
@@ -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) {
index 806698b9eabfc865bf9a7b320a1afd6f5b80d97d..5701a84edb0ee5c99f078bad4527225a0eb89004 100644 (file)
@@ -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) {
index 5b2c35f1658a19d1aeb86e069805ff3795a8f9fd..68596b56634439b03dfc49a1985d4d87f3bed344 100644 (file)
@@ -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) {
index afe3419f3f6d34d200930d3df7521e0e416efaf2..71b6687d669606b8f34876d91d0d147f71b75711 100644 (file)
@@ -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);
index f1b0f5e1a28f11f4cbbb618a8d3a7c4044387ff4..2823f381930daf885e1e4cde96e430b9d6129b05 100644 (file)
@@ -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;
index f8e3cc6903d7193bf35779773eece1c7e763cd3c..07890a8e96ca75ef001259ae2188181df36521d1 100644 (file)
@@ -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__ */
index 1e354433776a4475b22c9934f69c181ce0d2606b..6fe534a665eda3cd37989e2ff25f24e1a7db1dc5 100644 (file)
@@ -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) {