include/getcpu.h: Fixed kernel test robot warning
PATCH 1/1 include/getcpu.h: Fixed kernel test robot warning
Kernel test robot generates below warning ->
Quoted 2 lines
Quoted 2 lines
arch/s390/kernel/vdso64/getcpu.c:8:5: warning: no previous prototype for function '__s390_vdso_getcpu' [-Wmissing-prototypes]
int __s390_vdso_getcpu(unsigned *cpu, unsigned *node, structgetcpu_cache *unused)
^
arch/s390/kernel/vdso64/getcpu.c:8:1: note: declare 'static' if the
function is not intended to be used outside of this translation unit
int __s390_vdso_getcpu(unsigned *cpu, unsigned *node, structgetcpu_cache *unused)
^
static
1 warning generated.
vim +/__s390_vdso_getcpu +8 arch/s390/kernel/vdso64/getcpu.c
7
Quoted 2 lines
8 int
__s390_vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused)
It is fixed by adding a prototype.
--- include/linux/getcpu.h | 1 + 1 file changed, 1 insertion(+)
include/linux/getcpu.h +1 -0
@@ -16,4 +16,5 @@ struct getcpu_cache { unsigned long blob[128 / sizeof(long)]; }; +int __s390_vdso_getcpu (unsigned *cpu,unsigned *node,struct getcpu_cache *unused);#endif
Signature · 1 line
1.9.1
Quoted 34 lines · Souptick Joarder
Kernel test robot generates below warning ->
Quoted 2 lines
Quoted 2 lines
arch/s390/kernel/vdso64/getcpu.c:8:5: warning: no previous prototype for function '__s390_vdso_getcpu' [-Wmissing-prototypes]int __s390_vdso_getcpu(unsigned *cpu, unsigned *node, struct
getcpu_cache*unused)^
arch/s390/kernel/vdso64/getcpu.c:8:1: note: declare 'static' if the
function is not intended to be used outside of this translation unit
int __s390_vdso_getcpu(unsigned *cpu, unsigned *node, structgetcpu_cache*unused)
^
static
1 warning generated.vim +/__s390_vdso_getcpu +8
arch/s390/kernel/vdso64/getcpu.c7Quoted 2 lines
8 int
__s390_vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused)It is fixed by adding a prototype.
Reported-by kernel test robot <[email protected]>Signed-off-by Souptick Joarder <[email protected]>--- include/linux/getcpu.h | 1 + 1 file changed, 1 insertion(+)include/linux/getcpu.h +0
-0
include/linux/getcpu.h struct getcpu_cache { · line 19
Quoted 4 lines
include/linux/getcpu.h +1
-0@@ -16,4 +16,5 @@ struct getcpu_cache {unsigned long blob[128 /sizeof (long )]; }; +int __s390_vdso_getcpu (unsigned *cpu,unsigned *node,struct getcpu_cache *unused);
Sorry, no. We won't add s390 specific prototypes to common code header files. Anyway, I solved this differently and the "fix" should be in linux-next soon.