Re: [PATCH] staging: fix style in lustre_import.h
On Fri, Aug 22, 2014 at 07:57:40PM -0400, Spencer Baugh wrote: > This patch fixes style errors and warnings reported by > scripts/checkpatch.pl Which errors and warnings does it fix? Please always be specific. And only do one type of "fix" per patch, you do a few different ones here, right? Can you redo it and resend please? thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] staging: fix style in lustre_import.h
On Fri, Aug 22, 2014 at 07:57:40PM -0400, Spencer Baugh wrote: This patch fixes style errors and warnings reported by scripts/checkpatch.pl Which errors and warnings does it fix? Please always be specific. And only do one type of fix per patch, you do a few different ones here, right? Can you redo it and resend please? thanks, greg k-h -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[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_lock); at->at_current = val; at->at_worst_ever = val; at->at_worst_time = get_seconds(); spin_unlock(>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_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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[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 sba...@andrew.cmu.edu --- .../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[] = { UNKNOWN, 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 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/