OSDN Git Service

powerpc/perf: Make symbol 'isa207_pmu_format_attr' static
authorBixuan Cui <cuibixuan@huawei.com>
Fri, 9 Apr 2021 09:01:19 +0000 (17:01 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 14 Apr 2021 13:04:17 +0000 (23:04 +1000)
The sparse tool complains as follows:

arch/powerpc/perf/isa207-common.c:24:18: warning:
 symbol 'isa207_pmu_format_attr' was not declared. Should it be static?

This symbol is not used outside of isa207-common.c, so this
commit marks it static.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210409090119.59444-1-cuibixuan@huawei.com
arch/powerpc/perf/isa207-common.c

index 8b5eeb6..48b2d9a 100644 (file)
@@ -21,7 +21,7 @@ PMU_FORMAT_ATTR(thresh_stop,  "config:32-35");
 PMU_FORMAT_ATTR(thresh_start,  "config:36-39");
 PMU_FORMAT_ATTR(thresh_cmp,    "config:40-49");
 
-struct attribute *isa207_pmu_format_attr[] = {
+static struct attribute *isa207_pmu_format_attr[] = {
        &format_attr_event.attr,
        &format_attr_pmcxsel.attr,
        &format_attr_mark.attr,