Skip to content

Commit

Permalink
openrisc/traps: Declare file scope symbols as static
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
stffrdhrn committed May 23, 2022
1 parent fe47623 commit f4b26b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/openrisc/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
#include <asm/unwinder.h>
#include <asm/sections.h>

int kstack_depth_to_print = 0x180;
static int kstack_depth_to_print = 0x180;
int lwa_flag;
unsigned long __user *lwa_addr;
static unsigned long __user *lwa_addr;

void print_trace(void *data, unsigned long addr, int reliable)
static void print_trace(void *data, unsigned long addr, int reliable)
{
const char *loglvl = data;

Expand Down

0 comments on commit f4b26b1

Please sign in to comment.