sh: smp: Protect setup_profiling_timer() by CONFIG_PROFILING
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 13 May 2024 13:20:54 +0000 (15:20 +0200)
committerJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Mon, 13 May 2024 13:37:11 +0000 (15:37 +0200)
arch/sh/kernel/smp.c:326:5: warning: no previous prototype for 'setup_profiling_timer' [-Wmissing-prototypes]

The function is unconditionally defined in smp.c, but conditionally
declared in <linux/profile.h>.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Link: https://lore.kernel.org/r/effa5eecbd2389c6661974e91bb834db210989ea.1715606232.git.geert+renesas@glider.be
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
arch/sh/kernel/smp.c

index b3ea50aabba3d7f282303145e9780a2a313d70c2..108d808767fa9984931cfd5c2d7c97c56fbedc95 100644 (file)
@@ -322,11 +322,13 @@ void smp_message_recv(unsigned int msg)
        }
 }
 
+#ifdef CONFIG_PROFILING
 /* Not really SMP stuff ... */
 int setup_profiling_timer(unsigned int multiplier)
 {
        return 0;
 }
+#endif
 
 #ifdef CONFIG_MMU