All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 -next] powerpc/spufs: Fix build warning when CONFIG_PROC_FS=n
@ 2022-03-08 10:09 ` YueHaibing
  0 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2022-03-08 10:09 UTC (permalink / raw)
  To: jk, arnd, mpe, benh, paulus, yuehaibing, christophe.leroy
  Cc: linuxppc-dev, linux-kernel

arch/powerpc/platforms/cell/spufs/sched.c:1055:12: warning: ‘show_spu_loadavg’ defined but not used [-Wunused-function]
 static int show_spu_loadavg(struct seq_file *s, void *private)
            ^~~~~~~~~~~~~~~~

Move it into #ifdef block to fix this, also remove unneeded semicolon.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
v2: use #ifdef instead of __maybe_unused
---
 arch/powerpc/platforms/cell/spufs/sched.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index d058f6233e66..99bd027a7f7c 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -1052,6 +1052,7 @@ void spuctx_switch_state(struct spu_context *ctx,
 	}
 }
 
+#ifdef CONFIG_PROC_FS
 static int show_spu_loadavg(struct seq_file *s, void *private)
 {
 	int a, b, c;
@@ -1073,7 +1074,8 @@ static int show_spu_loadavg(struct seq_file *s, void *private)
 		atomic_read(&nr_spu_contexts),
 		idr_get_cursor(&task_active_pid_ns(current)->idr) - 1);
 	return 0;
-};
+}
+#endif
 
 int __init spu_sched_init(void)
 {
-- 
2.17.1


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

* [PATCH v2 -next] powerpc/spufs: Fix build warning when CONFIG_PROC_FS=n
@ 2022-03-08 10:09 ` YueHaibing
  0 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2022-03-08 10:09 UTC (permalink / raw)
  To: jk, arnd, mpe, benh, paulus, yuehaibing, christophe.leroy
  Cc: linuxppc-dev, linux-kernel

arch/powerpc/platforms/cell/spufs/sched.c:1055:12: warning: ‘show_spu_loadavg’ defined but not used [-Wunused-function]
 static int show_spu_loadavg(struct seq_file *s, void *private)
            ^~~~~~~~~~~~~~~~

Move it into #ifdef block to fix this, also remove unneeded semicolon.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
v2: use #ifdef instead of __maybe_unused
---
 arch/powerpc/platforms/cell/spufs/sched.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index d058f6233e66..99bd027a7f7c 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -1052,6 +1052,7 @@ void spuctx_switch_state(struct spu_context *ctx,
 	}
 }
 
+#ifdef CONFIG_PROC_FS
 static int show_spu_loadavg(struct seq_file *s, void *private)
 {
 	int a, b, c;
@@ -1073,7 +1074,8 @@ static int show_spu_loadavg(struct seq_file *s, void *private)
 		atomic_read(&nr_spu_contexts),
 		idr_get_cursor(&task_active_pid_ns(current)->idr) - 1);
 	return 0;
-};
+}
+#endif
 
 int __init spu_sched_init(void)
 {
-- 
2.17.1


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

* Re: [PATCH v2 -next] powerpc/spufs: Fix build warning when CONFIG_PROC_FS=n
  2022-03-08 10:09 ` YueHaibing
  (?)
@ 2022-03-08 10:17 ` Christophe Leroy
  -1 siblings, 0 replies; 4+ messages in thread
From: Christophe Leroy @ 2022-03-08 10:17 UTC (permalink / raw)
  To: YueHaibing, jk, arnd, mpe, benh, paulus; +Cc: linuxppc-dev, linux-kernel



Le 08/03/2022 à 11:09, YueHaibing a écrit :
> arch/powerpc/platforms/cell/spufs/sched.c:1055:12: warning: ‘show_spu_loadavg’ defined but not used [-Wunused-function]
>   static int show_spu_loadavg(struct seq_file *s, void *private)
>              ^~~~~~~~~~~~~~~~
> 
> Move it into #ifdef block to fix this, also remove unneeded semicolon.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>

> ---
> v2: use #ifdef instead of __maybe_unused
> ---
>   arch/powerpc/platforms/cell/spufs/sched.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
> index d058f6233e66..99bd027a7f7c 100644
> --- a/arch/powerpc/platforms/cell/spufs/sched.c
> +++ b/arch/powerpc/platforms/cell/spufs/sched.c
> @@ -1052,6 +1052,7 @@ void spuctx_switch_state(struct spu_context *ctx,
>   	}
>   }
>   
> +#ifdef CONFIG_PROC_FS
>   static int show_spu_loadavg(struct seq_file *s, void *private)
>   {
>   	int a, b, c;
> @@ -1073,7 +1074,8 @@ static int show_spu_loadavg(struct seq_file *s, void *private)
>   		atomic_read(&nr_spu_contexts),
>   		idr_get_cursor(&task_active_pid_ns(current)->idr) - 1);
>   	return 0;
> -};
> +}
> +#endif
>   
>   int __init spu_sched_init(void)
>   {

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

* Re: [PATCH v2 -next] powerpc/spufs: Fix build warning when CONFIG_PROC_FS=n
  2022-03-08 10:09 ` YueHaibing
  (?)
  (?)
@ 2022-03-12 10:29 ` Michael Ellerman
  -1 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2022-03-12 10:29 UTC (permalink / raw)
  To: paulus, benh, arnd, christophe.leroy, jk, YueHaibing, mpe
  Cc: linuxppc-dev, linux-kernel

On Tue, 8 Mar 2022 18:09:28 +0800, YueHaibing wrote:
> arch/powerpc/platforms/cell/spufs/sched.c:1055:12: warning: ‘show_spu_loadavg’ defined but not used [-Wunused-function]
>  static int show_spu_loadavg(struct seq_file *s, void *private)
>             ^~~~~~~~~~~~~~~~
> 
> Move it into #ifdef block to fix this, also remove unneeded semicolon.
> 
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/spufs: Fix build warning when CONFIG_PROC_FS=n
      https://git.kernel.org/powerpc/c/5986f6b6575ac830ede9648cfb64353c58067a9f

cheers

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

end of thread, other threads:[~2022-03-12 10:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-08 10:09 [PATCH v2 -next] powerpc/spufs: Fix build warning when CONFIG_PROC_FS=n YueHaibing
2022-03-08 10:09 ` YueHaibing
2022-03-08 10:17 ` Christophe Leroy
2022-03-12 10:29 ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.