[PATCH] lustre: ptlrpc: add "ptlrpc_internal.h" to sec_gc.c
ptlrpc_internal.h contains the prototypes for sptlrpc_gc_init() and sptlrpc_gc_fini(), which are defined in sec_gc.c. This removes the following sparse warnings: drivers/staging/lustre/lustre/ptlrpc/sec_gc.c:217:5: warning: symbol 'sptlrpc_gc_init' was not declared. Should it be static? drivers/staging/lustre/lustre/ptlrpc/sec_gc.c:241:6: warning: symbol 'sptlrpc_gc_fini' was not declared. Should it be static? Signed-off-by: Spencer Baugh --- drivers/staging/lustre/lustre/ptlrpc/sec_gc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c b/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c index c500aff..81de68e 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c @@ -47,6 +47,8 @@ #include "../include/lustre_net.h" #include "../include/lustre_sec.h" +#include "ptlrpc_internal.h" + #define SEC_GC_INTERVAL (30 * 60) -- 2.1.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/3] staging: lustre: fix function definition style
Fix errors reported by checkpatch of this kind: ERROR: open brace '{' following function declarations go on the next line Signed-off-by: Spencer Baugh --- drivers/staging/lustre/lustre/include/lustre_import.h | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_import.h b/drivers/staging/lustre/lustre/include/lustre_import.h index 8304a55..feb4291 100644 --- a/drivers/staging/lustre/lustre/include/lustre_import.h +++ b/drivers/staging/lustre/lustre/include/lustre_import.h @@ -346,21 +346,24 @@ static inline unsigned int at_timeout2est(unsigned int val) return (max((val << 2) / 5, 5U) - 4); } -static inline void at_reset(struct adaptive_timeout *at, int val) { +static inline void at_reset(struct adaptive_timeout *at, int val) +{ spin_lock(&at->at_lock); at->at_current = val; at->at_worst_ever = val; at->at_worst_time = get_seconds(); spin_unlock(&at->at_lock); } -static inline void at_init(struct adaptive_timeout *at, int val, int flags) { +static inline void at_init(struct adaptive_timeout *at, int val, int flags) +{ memset(at, 0, sizeof(*at)); spin_lock_init(&at->at_lock); at->at_flags = flags; at_reset(at, val); } extern unsigned int at_min; -static inline int at_get(struct adaptive_timeout *at) { +static inline int at_get(struct adaptive_timeout *at) +{ return (at->at_current > at_min) ? at->at_current : at_min; } int at_measured(struct adaptive_timeout *at, unsigned int val); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/3] staging: lustre: fix pointer whitespace style
Fix errors reported by checkpatch of this kind: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Spencer Baugh --- drivers/staging/lustre/lustre/include/lustre_import.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_import.h b/drivers/staging/lustre/lustre/include/lustre_import.h index feb4291..b71877b 100644 --- a/drivers/staging/lustre/lustre/include/lustre_import.h +++ b/drivers/staging/lustre/lustre/include/lustre_import.h @@ -103,9 +103,9 @@ enum lustre_imp_state { }; /** Returns test string representation of numeric import state \a state */ -static inline char * ptlrpc_import_state_name(enum lustre_imp_state state) +static inline char *ptlrpc_import_state_name(enum lustre_imp_state state) { - static char* import_state_names[] = { + static char *import_state_names[] = { "", "CLOSED", "NEW", "DISCONN", "CONNECTING", "REPLAY", "REPLAY_LOCKS", "REPLAY_WAIT", "RECOVER", "FULL", "EVICTED", -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/3] staging: lustre: remove trailing whitespace
Fix errors reported by checkpatch of this kind: ERROR: trailing whitespace Signed-off-by: Spencer Baugh --- drivers/staging/lustre/lustre/include/lustre_import.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_import.h b/drivers/staging/lustre/lustre/include/lustre_import.h index b71877b..51f3e98 100644 --- a/drivers/staging/lustre/lustre/include/lustre_import.h +++ b/drivers/staging/lustre/lustre/include/lustre_import.h @@ -346,7 +346,7 @@ static inline unsigned int at_timeout2est(unsigned int val) return (max((val << 2) / 5, 5U) - 4); } -static inline void at_reset(struct adaptive_timeout *at, int val) +static inline void at_reset(struct adaptive_timeout *at, int val) { spin_lock(&at->at_lock); at->at_current = val; @@ -354,7 +354,7 @@ static inline void at_reset(struct adaptive_timeout *at, int val) at->at_worst_time = get_seconds(); spin_unlock(&at->at_lock); } -static inline void at_init(struct adaptive_timeout *at, int val, int flags) +static inline void at_init(struct adaptive_timeout *at, int val, int flags) { memset(at, 0, sizeof(*at)); spin_lock_init(&at->at_lock); @@ -362,7 +362,7 @@ static inline void at_init(struct adaptive_timeout *at, int val, int flags) at_reset(at, val); } extern unsigned int at_min; -static inline int at_get(struct adaptive_timeout *at) +static inline int at_get(struct adaptive_timeout *at) { return (at->at_current > at_min) ? at->at_current : at_min; } -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] staging: lustre: fix function definition style
Fix errors reported by checkpatch of this kind: ERROR: open brace '{' following function declarations go on the next line Signed-off-by: Spencer Baugh --- drivers/staging/lustre/lustre/include/lustre_import.h | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_import.h b/drivers/staging/lustre/lustre/include/lustre_import.h index 8304a55..7bf82e0 100644 --- a/drivers/staging/lustre/lustre/include/lustre_import.h +++ b/drivers/staging/lustre/lustre/include/lustre_import.h @@ -346,21 +346,24 @@ static inline unsigned int at_timeout2est(unsigned int val) return (max((val << 2) / 5, 5U) - 4); } -static inline void at_reset(struct adaptive_timeout *at, int val) { +static inline void at_reset(struct adaptive_timeout *at, int val) +{ spin_lock(&at->at_lock); at->at_current = val; at->at_worst_ever = val; at->at_worst_time = get_seconds(); spin_unlock(&at->at_lock); } -static inline void at_init(struct adaptive_timeout *at, int val, int flags) { +static inline void at_init(struct adaptive_timeout *at, int val, int flags) +{ memset(at, 0, sizeof(*at)); spin_lock_init(&at->at_lock); at->at_flags = flags; at_reset(at, val); } extern unsigned int at_min; -static inline int at_get(struct adaptive_timeout *at) { +static inline int at_get(struct adaptive_timeout *at) +{ return (at->at_current > at_min) ? at->at_current : at_min; } int at_measured(struct adaptive_timeout *at, unsigned int val); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] staging: lustre: fix pointer whitespace style
Fix errors reported by checkpatch of this kind: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Spencer Baugh --- drivers/staging/lustre/lustre/include/lustre_import.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_import.h b/drivers/staging/lustre/lustre/include/lustre_import.h index 7bf82e0..51f3e98 100644 --- a/drivers/staging/lustre/lustre/include/lustre_import.h +++ b/drivers/staging/lustre/lustre/include/lustre_import.h @@ -103,9 +103,9 @@ enum lustre_imp_state { }; /** Returns test string representation of numeric import state \a state */ -static inline char * ptlrpc_import_state_name(enum lustre_imp_state state) +static inline char *ptlrpc_import_state_name(enum lustre_imp_state state) { - static char* import_state_names[] = { + static char *import_state_names[] = { "", "CLOSED", "NEW", "DISCONN", "CONNECTING", "REPLAY", "REPLAY_LOCKS", "REPLAY_WAIT", "RECOVER", "FULL", "EVICTED", -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: fix style in lustre_import.h
This patch fixes style errors and warnings reported by scripts/checkpatch.pl Signed-off-by: Spencer Baugh --- .../staging/lustre/lustre/include/lustre_import.h | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_import.h b/drivers/staging/lustre/lustre/include/lustre_import.h index 8304a55..b39b283 100644 --- a/drivers/staging/lustre/lustre/include/lustre_import.h +++ b/drivers/staging/lustre/lustre/include/lustre_import.h @@ -103,15 +103,15 @@ enum lustre_imp_state { }; /** Returns test string representation of numeric import state \a state */ -static inline char * ptlrpc_import_state_name(enum lustre_imp_state state) +static inline char *ptlrpc_import_state_name(enum lustre_imp_state state) { - static char* import_state_names[] = { + static char *import_state_names[] = { "", "CLOSED", "NEW", "DISCONN", "CONNECTING", "REPLAY", "REPLAY_LOCKS", "REPLAY_WAIT", "RECOVER", "FULL", "EVICTED", }; - LASSERT (state <= LUSTRE_IMP_EVICTED); + LASSERT(state <= LUSTRE_IMP_EVICTED); return import_state_names[state]; } @@ -302,12 +302,12 @@ struct obd_import { intimp_connect_error; __u32imp_msg_magic; - __u32imp_msghdr_flags; /* adjusted based on server capability */ + __u32imp_msghdr_flags; /* adjusted based on server capability */ - struct ptlrpc_request_pool *imp_rq_pool; /* emergency request pool */ + struct ptlrpc_request_pool *imp_rq_pool; /* emergency request pool */ struct imp_atimp_at; /* adaptive timeout data */ - time_t imp_last_reply_time;/* for health check */ + time_t imp_last_reply_time; /* for health check */ }; typedef void (*obd_import_callback)(struct obd_import *imp, void *closure, @@ -346,21 +346,24 @@ static inline unsigned int at_timeout2est(unsigned int val) return (max((val << 2) / 5, 5U) - 4); } -static inline void at_reset(struct adaptive_timeout *at, int val) { +static inline void at_reset(struct adaptive_timeout *at, int val) +{ spin_lock(&at->at_lock); at->at_current = val; at->at_worst_ever = val; at->at_worst_time = get_seconds(); spin_unlock(&at->at_lock); } -static inline void at_init(struct adaptive_timeout *at, int val, int flags) { +static inline void at_init(struct adaptive_timeout *at, int val, int flags) +{ memset(at, 0, sizeof(*at)); spin_lock_init(&at->at_lock); at->at_flags = flags; at_reset(at, val); } extern unsigned int at_min; -static inline int at_get(struct adaptive_timeout *at) { +static inline int at_get(struct adaptive_timeout *at) +{ return (at->at_current > at_min) ? at->at_current : at_min; } int at_measured(struct adaptive_timeout *at, unsigned int val); -- 2.0.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel