Skip to content

Commit ffe74a6

Browse files
author
Greg Ungerer
committed
m68knommu: fix ucsimm sparse warnings
Sparse reports the following warnings: arch/m68k/68000/ucsimm.c:19:15: sparse: sparse: symbol 'cs8900a_hwaddr' was not declared. Should it be static? arch/m68k/68000/ucsimm.c:22:1: sparse: sparse: symbol 'getserialnum' was not declared. Should it be static? arch/m68k/68000/ucsimm.c:23:1: sparse: sparse: symbol 'gethwaddr' was not declared. Should it be static? arch/m68k/68000/ucsimm.c:24:1: sparse: sparse: symbol 'getbenv' was not declared. Should it be static? 'cs8900a_hwaddr' is not used anywhere else in the kernel, so it can be removed. All of 'getserialnum', 'gethwaddr' and 'getbenv' are only used in this file, so they can all be made static. It turns out that these also cause compiler warnings like this too: arch/m68k/68000/ucsimm.c:22:15: warning: no previous prototype for 'getserialnum' [-Wmissing-prototypes] Also fixed by making them all static. Signed-off-by: Greg Ungerer <[email protected]> Reported-by: kernel test robot <[email protected]>
1 parent 5fb4d46 commit ffe74a6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

arch/m68k/68000/ucsimm.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,18 @@
1616

1717
#include "m68328.h"
1818

19-
unsigned char *cs8900a_hwaddr;
2019
static int errno;
2120

22-
_bsc0(char *, getserialnum)
23-
_bsc1(unsigned char *, gethwaddr, int, a)
24-
_bsc1(char *, getbenv, char *, a)
21+
static _bsc0(char *, getserialnum)
22+
static _bsc1(unsigned char *, gethwaddr, int, a)
23+
static _bsc1(char *, getbenv, char *, a)
2524

2625
void __init init_ucsimm(char *command, int size)
2726
{
2827
char *p;
2928

3029
pr_info("uCsimm/uCdimm serial string [%s]\n", getserialnum());
31-
p = cs8900a_hwaddr = gethwaddr(0);
30+
p = gethwaddr(0);
3231
pr_info("uCsimm/uCdimm hwaddr %pM\n", p);
3332
p = getbenv("APPEND");
3433
if (p)

0 commit comments

Comments
 (0)