]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
sh: traps: Make is_dsp_inst() static
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 4 Mar 2024 19:10:44 +0000 (20:10 +0100)
committerJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Thu, 2 May 2024 10:01:31 +0000 (12:01 +0200)
If CONFIG_SH_DSP=y (e.g. se7343_defconfig):

    arch/sh/kernel/traps_32.c:572:5: warning: no previous prototype for ‘is_dsp_inst’ [-Wmissing-prototypes]

There are no users outside this file, so make it static.

While at it, convert the dummy for the CONFIG_SH_DSP=n case from a macro
to a static inline function, to increase type-safety.

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/8525fe446e7f24649a83b8cd6ca8b736ab746b80.1709579038.git.geert+renesas@glider.be
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
arch/sh/kernel/traps_32.c

index 8cd4b05df75c3e07d24b63b2f696839977ff77dc..1271b839a107ef28013ab10f342c64a835a52047 100644 (file)
@@ -569,7 +569,7 @@ uspace_segv:
 /*
  *     SH-DSP support gerg@snapgear.com.
  */
-int is_dsp_inst(struct pt_regs *regs)
+static int is_dsp_inst(struct pt_regs *regs)
 {
        unsigned short inst = 0;
 
@@ -591,7 +591,7 @@ int is_dsp_inst(struct pt_regs *regs)
        return 0;
 }
 #else
-#define is_dsp_inst(regs)      (0)
+static inline int is_dsp_inst(struct pt_regs *regs) { return 0; }
 #endif /* CONFIG_SH_DSP */
 
 #ifdef CONFIG_CPU_SH2A