staging: lustre: linux-prim.c: fix sparse warnings about static declaration
PATCH v2 1/1 staging: lustre: linux-prim.c: fix sparse warnings about static declaration
Fixes the following sparse warnings:
drivers/staging/lustre/lustre/libcfs/linux/linux-prim.c:198:1: warning: symbol 'libcfs_arch_init' was not declared. Should it be static? drivers/staging/lustre/lustre/libcfs/linux/linux-prim.c:204:1: warning: symbol 'libcfs_arch_cleanup' was not declared. Should it be static?
---
v2: Don't break the build, and fix the warnings by defining the functions in libcfs.h.
drivers/staging/lustre/include/linux/libcfs/libcfs.h | 3 +++ drivers/staging/lustre/lustre/libcfs/module.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/staging/lustre/include/linux/libcfs/libcfs.h +3 -0
@@ -85,6 +85,9 @@ static inline int __is_po2(unsigned long long val)#include <linux/list.h> +int libcfs_arch_init (void ); +void libcfs_arch_cleanup (void ); +/* libcfs tcpip */ int libcfs_ipif_query (char *name,int *up,__u32 *ip,__u32 *mask);int libcfs_ipif_enumerate (char ***names);
drivers/staging/lustre/lustre/libcfs/module.c +0 -2
@@ -334,8 +334,6 @@ extern struct mutex cfs_trace_thread_mutex;extern struct cfs_wi_sched *cfs_sched_rehash;extern void libcfs_init_nidstrings (void ); -extern int libcfs_arch_init (void ); -extern void libcfs_arch_cleanup (void );static int init_libcfs_module (void ) {
Signature · 1 line
1.9.3
Quoted 4 lines · Serguey Parkhomovsky
Fixes the following sparse warnings:
drivers/staging/lustre/lustre/libcfs/linux/linux-prim.c:198:1: warning: symbol 'libcfs_arch_init' was not declared. Should it be static?drivers/staging/lustre/lustre/libcfs/linux/linux-prim.c:204:1: warning: symbol 'libcfs_arch_cleanup' was not declared. Should it be static?
This lines are way too long. You should break the commit message line around 72nd column so that it looks nice when emailed.
You can also omit the filename from the topic line as this is already in the diff.
Thanks,
Konrad
Quoted 41 lines
Signed-off-by Serguey Parkhomovsky <[email protected]>---
v2: Don't break the build, and fix the warnings by defining the functions inlibcfs.h.drivers/staging/lustre/include/linux/libcfs/libcfs.h | 3 +++ drivers/staging/lustre/lustre/libcfs/module.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-)drivers/staging/lustre/include/linux/libcfs/libcfs.h +3
-0@@ -85,6 +85,9 @@ static inline int __is_po2(unsigned long long val)#include <linux/list.h> +int libcfs_arch_init (void ); +void libcfs_arch_cleanup (void ); +/* libcfs tcpip */ int libcfs_ipif_query (char *name,int *up,__u32 *ip,__u32 *mask);int libcfs_ipif_enumerate (char ***names);drivers/staging/lustre/lustre/libcfs/module.c +0
-2@@ -334,8 +334,6 @@ extern struct mutex cfs_trace_thread_mutex;extern struct cfs_wi_sched *cfs_sched_rehash;extern void libcfs_init_nidstrings (void ); -extern int libcfs_arch_init (void ); -extern void libcfs_arch_cleanup (void );static int init_libcfs_module (void ) {Signature · 6 lines
1.9.3 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Quoted 5 lines · Konrad Zapalowicz
This lines are way too long. You should break the commit message line around 72nd column so that it looks nice when emailed.
You can also omit the filename from the topic line as this is already in the diff.
Thanks for the feedback; I'll send an updated patch that fixes these issues.
Serguey