linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] powerpc/perf: Make symbol 'isa207_pmu_format_attr' static
@ 2021-04-09  9:01 Bixuan Cui
  2021-04-12 14:17 ` kajoljain
  2021-04-19  3:59 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: Bixuan Cui @ 2021-04-09  9:01 UTC (permalink / raw)
  To: cuibixuan, Michael Ellerman, Athira Rajeev, Madhavan Srinivasan,
	Kajol Jain
  Cc: linuxppc-dev, linux-kernel, kernel-janitors

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>
---
 arch/powerpc/perf/isa207-common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/perf/isa207-common.c b/arch/powerpc/perf/isa207-common.c
index e4f577da33d8..487f9e914b5c 100644
--- a/arch/powerpc/perf/isa207-common.c
+++ b/arch/powerpc/perf/isa207-common.c
@@ -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,


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] powerpc/perf: Make symbol 'isa207_pmu_format_attr' static
  2021-04-09  9:01 [PATCH -next] powerpc/perf: Make symbol 'isa207_pmu_format_attr' static Bixuan Cui
@ 2021-04-12 14:17 ` kajoljain
  2021-04-19  3:59 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: kajoljain @ 2021-04-12 14:17 UTC (permalink / raw)
  To: Bixuan Cui, Michael Ellerman, Athira Rajeev, Madhavan Srinivasan
  Cc: linuxppc-dev, linux-kernel, kernel-janitors



On 4/9/21 2:31 PM, Bixuan Cui wrote:
> 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.

Patch looks good to me.

Reviewed-by: Kajol Jain<kjain@linux.ibm.com>

Thanks,
Kajol Jain
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
> ---
>  arch/powerpc/perf/isa207-common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/perf/isa207-common.c b/arch/powerpc/perf/isa207-common.c
> index e4f577da33d8..487f9e914b5c 100644
> --- a/arch/powerpc/perf/isa207-common.c
> +++ b/arch/powerpc/perf/isa207-common.c
> @@ -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,
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] powerpc/perf: Make symbol 'isa207_pmu_format_attr' static
  2021-04-09  9:01 [PATCH -next] powerpc/perf: Make symbol 'isa207_pmu_format_attr' static Bixuan Cui
  2021-04-12 14:17 ` kajoljain
@ 2021-04-19  3:59 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2021-04-19  3:59 UTC (permalink / raw)
  To: Madhavan Srinivasan, Bixuan Cui, Michael Ellerman, Kajol Jain,
	Athira Rajeev
  Cc: kernel-janitors, linuxppc-dev, linux-kernel

On Fri, 9 Apr 2021 17:01:19 +0800, Bixuan Cui wrote:
> 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.

Applied to powerpc/next.

[1/1] powerpc/perf: Make symbol 'isa207_pmu_format_attr' static
      https://git.kernel.org/powerpc/c/107dadb046178173dea18e0a78ff8ea3cc27c213

cheers

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-19  4:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09  9:01 [PATCH -next] powerpc/perf: Make symbol 'isa207_pmu_format_attr' static Bixuan Cui
2021-04-12 14:17 ` kajoljain
2021-04-19  3:59 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).