Skip to content

Commit fdb2dd7

Browse files
geertuglaubitz
authored andcommitted
sh: traps: Make is_dsp_inst() static
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 <[email protected]> Reviewed-by: John Paul Adrian Glaubitz <[email protected]> Link: https://lore.kernel.org/r/8525fe446e7f24649a83b8cd6ca8b736ab746b80.1709579038.git.geert+renesas@glider.be Signed-off-by: John Paul Adrian Glaubitz <[email protected]>
1 parent fcd9a89 commit fdb2dd7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/sh/kernel/traps_32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ asmlinkage void do_address_error(struct pt_regs *regs,
569569
/*
570570
* SH-DSP support [email protected].
571571
*/
572-
int is_dsp_inst(struct pt_regs *regs)
572+
static int is_dsp_inst(struct pt_regs *regs)
573573
{
574574
unsigned short inst = 0;
575575

@@ -591,7 +591,7 @@ int is_dsp_inst(struct pt_regs *regs)
591591
return 0;
592592
}
593593
#else
594-
#define is_dsp_inst(regs) (0)
594+
static inline int is_dsp_inst(struct pt_regs *regs) { return 0; }
595595
#endif /* CONFIG_SH_DSP */
596596

597597
#ifdef CONFIG_CPU_SH2A

0 commit comments

Comments
 (0)