Skip to content

Commit f4b26b1

Browse files
committed
openrisc/traps: Declare file scope symbols as static
Sparse was reporting the following warnings: arch/openrisc/kernel/traps.c:37:5: warning: symbol 'kstack_depth_to_print' was not declared. Should it be static? arch/openrisc/kernel/traps.c:39:22: warning: symbol 'lwa_addr' was not declared. Should it be static? arch/openrisc/kernel/traps.c:41:6: warning: symbol 'print_trace' was not declared. Should it be static? The function print_trace and local variables kstack_depth_to_print and lwa_addr are not used outside of this file. This patch marks them as static. Signed-off-by: Stafford Horne <[email protected]>
1 parent fe47623 commit f4b26b1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/openrisc/kernel/traps.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
#include <asm/unwinder.h>
3535
#include <asm/sections.h>
3636

37-
int kstack_depth_to_print = 0x180;
37+
static int kstack_depth_to_print = 0x180;
3838
int lwa_flag;
39-
unsigned long __user *lwa_addr;
39+
static unsigned long __user *lwa_addr;
4040

41-
void print_trace(void *data, unsigned long addr, int reliable)
41+
static void print_trace(void *data, unsigned long addr, int reliable)
4242
{
4343
const char *loglvl = data;
4444

0 commit comments

Comments
 (0)