Skip to content

Commit 25d8c25

Browse files
Junhao Hewilldeacon
authored andcommitted
drivers/perf: hisi: Remove redundant initialized of pmu->name
"pmu->name" is initialized by perf_pmu_register() function, so remove the redundant initialized in hisi_pmu_init(). Signed-off-by: Junhao He <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 2ad91e4 commit 25d8c25

File tree

8 files changed

+8
-11
lines changed

8 files changed

+8
-11
lines changed

drivers/perf/hisilicon/hisi_uncore_cpa_pmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ static int hisi_cpa_pmu_probe(struct platform_device *pdev)
316316
if (!name)
317317
return -ENOMEM;
318318

319-
hisi_pmu_init(cpa_pmu, name, THIS_MODULE);
319+
hisi_pmu_init(cpa_pmu, THIS_MODULE);
320320

321321
/* Power Management should be disabled before using CPA PMU. */
322322
hisi_cpa_pmu_disable_pm(cpa_pmu);

drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ static int hisi_ddrc_pmu_probe(struct platform_device *pdev)
516516
"hisi_sccl%u_ddrc%u", ddrc_pmu->sccl_id,
517517
ddrc_pmu->index_id);
518518

519-
hisi_pmu_init(ddrc_pmu, name, THIS_MODULE);
519+
hisi_pmu_init(ddrc_pmu, THIS_MODULE);
520520

521521
ret = perf_pmu_register(&ddrc_pmu->pmu, name, -1);
522522
if (ret) {

drivers/perf/hisilicon/hisi_uncore_hha_pmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ static int hisi_hha_pmu_probe(struct platform_device *pdev)
519519

520520
name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "hisi_sccl%u_hha%u",
521521
hha_pmu->sccl_id, hha_pmu->index_id);
522-
hisi_pmu_init(hha_pmu, name, THIS_MODULE);
522+
hisi_pmu_init(hha_pmu, THIS_MODULE);
523523

524524
ret = perf_pmu_register(&hha_pmu->pmu, name, -1);
525525
if (ret) {

drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ static int hisi_l3c_pmu_probe(struct platform_device *pdev)
557557
*/
558558
name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "hisi_sccl%u_l3c%u",
559559
l3c_pmu->sccl_id, l3c_pmu->ccl_id);
560-
hisi_pmu_init(l3c_pmu, name, THIS_MODULE);
560+
hisi_pmu_init(l3c_pmu, THIS_MODULE);
561561

562562
ret = perf_pmu_register(&l3c_pmu->pmu, name, -1);
563563
if (ret) {

drivers/perf/hisilicon/hisi_uncore_pa_pmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ static int hisi_pa_pmu_probe(struct platform_device *pdev)
412412
return ret;
413413
}
414414

415-
hisi_pmu_init(pa_pmu, name, THIS_MODULE);
415+
hisi_pmu_init(pa_pmu, THIS_MODULE);
416416
ret = perf_pmu_register(&pa_pmu->pmu, name, -1);
417417
if (ret) {
418418
dev_err(pa_pmu->dev, "PMU register failed, ret = %d\n", ret);

drivers/perf/hisilicon/hisi_uncore_pmu.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,12 +531,10 @@ int hisi_uncore_pmu_offline_cpu(unsigned int cpu, struct hlist_node *node)
531531
}
532532
EXPORT_SYMBOL_GPL(hisi_uncore_pmu_offline_cpu);
533533

534-
void hisi_pmu_init(struct hisi_pmu *hisi_pmu, const char *name,
535-
struct module *module)
534+
void hisi_pmu_init(struct hisi_pmu *hisi_pmu, struct module *module)
536535
{
537536
struct pmu *pmu = &hisi_pmu->pmu;
538537

539-
pmu->name = name;
540538
pmu->module = module;
541539
pmu->task_ctx_nr = perf_invalid_context;
542540
pmu->event_init = hisi_uncore_pmu_event_init;

drivers/perf/hisilicon/hisi_uncore_pmu.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,5 @@ ssize_t hisi_uncore_pmu_identifier_attr_show(struct device *dev,
121121
int hisi_uncore_pmu_init_irq(struct hisi_pmu *hisi_pmu,
122122
struct platform_device *pdev);
123123

124-
void hisi_pmu_init(struct hisi_pmu *hisi_pmu, const char *name,
125-
struct module *module);
124+
void hisi_pmu_init(struct hisi_pmu *hisi_pmu, struct module *module);
126125
#endif /* __HISI_UNCORE_PMU_H__ */

drivers/perf/hisilicon/hisi_uncore_sllc_pmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ static int hisi_sllc_pmu_probe(struct platform_device *pdev)
445445
return ret;
446446
}
447447

448-
hisi_pmu_init(sllc_pmu, name, THIS_MODULE);
448+
hisi_pmu_init(sllc_pmu, THIS_MODULE);
449449

450450
ret = perf_pmu_register(&sllc_pmu->pmu, name, -1);
451451
if (ret) {

0 commit comments

Comments
 (0)