staging: lustre: fix some trivial checpatck.pl errors
cover staging: lustre: fix some trivial checpatck.pl errors
Hi,
These patches fix some trivial checkpatch.pl errors, like spacing, identation etc.
Mike Rapoport (5):
staging: lustre: fix whitespace errors reported by checkpatch.pl
staging: lustre: fix CODE_INDENT checkpatch.pl errors
staging: lustre: fix GLOBAL_INITIALISERS checkpatch.pl errors
staging: lustre: fix SWITCH_CASE_INDENT_LEVEL checkpatch.pl errors
staging: lustre: fix OPEN_BRACE checkpatch.pl errors
.../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 6 +- .../lustre/lnet/klnds/socklnd/socklnd_lib.c | 6 +- drivers/staging/lustre/lnet/selftest/conrpc.h | 4 +- drivers/staging/lustre/lnet/selftest/console.c | 16 +-- drivers/staging/lustre/lnet/selftest/selftest.h | 22 +-- drivers/staging/lustre/lustre/include/cl_object.h | 14 +- .../staging/lustre/lustre/include/lprocfs_status.h | 3 +- drivers/staging/lustre/lustre/include/lu_object.h | 16 +-- .../lustre/lustre/include/lustre/lustre_idl.h | 12 +- .../lustre/lustre/include/lustre/lustre_user.h | 7 +- .../staging/lustre/lustre/include/lustre_capa.h | 2 +- .../staging/lustre/lustre/include/lustre_disk.h | 2 +- drivers/staging/lustre/lustre/include/lustre_dlm.h | 6 +- .../lustre/lustre/include/lustre_dlm_flags.h | 152 ++++++++++----------- drivers/staging/lustre/lustre/include/lustre_lib.h | 6 +- drivers/staging/lustre/lustre/include/lustre_net.h | 2 +- drivers/staging/lustre/lustre/include/obd.h | 2 +- .../staging/lustre/lustre/include/obd_support.h | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 4 +- drivers/staging/lustre/lustre/libcfs/fail.c | 4 +- .../lustre/lustre/libcfs/linux/linux-tracefile.c | 22 ++- drivers/staging/lustre/lustre/libcfs/tracefile.c | 4 +- drivers/staging/lustre/lustre/llite/file.c | 4 +- .../staging/lustre/lustre/llite/llite_internal.h | 2 +- drivers/staging/lustre/lustre/llite/lproc_llite.c | 2 +- drivers/staging/lustre/lustre/llite/rw.c | 6 +- drivers/staging/lustre/lustre/llite/statahead.c | 4 +- drivers/staging/lustre/lustre/llite/vvp_io.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 4 +- drivers/staging/lustre/lustre/obdclass/capa.c | 2 +- drivers/staging/lustre/lustre/obdclass/cl_io.c | 10 +- drivers/staging/lustre/lustre/obdclass/cl_lock.c | 6 +- drivers/staging/lustre/lustre/obdclass/cl_object.c | 5 +- drivers/staging/lustre/lustre/obdclass/class_obd.c | 12 +- drivers/staging/lustre/lustre/obdclass/genops.c | 6 +- drivers/staging/lustre/lustre/obdclass/llog.c | 4 +- .../lustre/lustre/obdclass/lprocfs_counters.c | 2 +- drivers/staging/lustre/lustre/obdclass/lu_object.c | 4 +- .../staging/lustre/lustre/obdclass/obd_config.c | 6 +- drivers/staging/lustre/lustre/osc/osc_request.c | 6 +- .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- 42 files changed, 203 insertions(+), 202 deletions(-)
Signature · 1 line
2.1.0
PATCH 1/5 staging: lustre: fix whitespace errors reported by checkpatch.pl
Added/removed spaces and replaced '+1' with '1' in several places to eliminate SPACING and POINTER_LOCATION errors reported by checkpatch.pl
--- .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 4 +- drivers/staging/lustre/lnet/selftest/conrpc.h | 4 +- drivers/staging/lustre/lnet/selftest/console.c | 16 +-- drivers/staging/lustre/lnet/selftest/selftest.h | 2 +- drivers/staging/lustre/lustre/include/cl_object.h | 14 +- drivers/staging/lustre/lustre/include/lu_object.h | 16 +-- .../lustre/lustre/include/lustre/lustre_idl.h | 12 +- .../lustre/lustre/include/lustre/lustre_user.h | 4 +- .../staging/lustre/lustre/include/lustre_capa.h | 2 +- .../staging/lustre/lustre/include/lustre_disk.h | 2 +- drivers/staging/lustre/lustre/include/lustre_dlm.h | 6 +- .../lustre/lustre/include/lustre_dlm_flags.h | 152 ++++++++++----------- drivers/staging/lustre/lustre/include/lustre_lib.h | 6 +- drivers/staging/lustre/lustre/include/lustre_net.h | 2 +- drivers/staging/lustre/lustre/include/obd.h | 2 +- .../staging/lustre/lustre/include/obd_support.h | 2 +- drivers/staging/lustre/lustre/libcfs/tracefile.c | 4 +- drivers/staging/lustre/lustre/llite/file.c | 4 +- .../staging/lustre/lustre/llite/llite_internal.h | 2 +- drivers/staging/lustre/lustre/llite/lproc_llite.c | 2 +- drivers/staging/lustre/lustre/llite/rw.c | 6 +- drivers/staging/lustre/lustre/llite/statahead.c | 4 +- drivers/staging/lustre/lustre/llite/vvp_io.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 4 +- drivers/staging/lustre/lustre/obdclass/cl_io.c | 10 +- drivers/staging/lustre/lustre/obdclass/cl_lock.c | 6 +- drivers/staging/lustre/lustre/obdclass/cl_object.c | 2 +- drivers/staging/lustre/lustre/obdclass/class_obd.c | 4 +- drivers/staging/lustre/lustre/obdclass/genops.c | 6 +- drivers/staging/lustre/lustre/obdclass/llog.c | 4 +- .../staging/lustre/lustre/obdclass/obd_config.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 6 +- .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- 34 files changed, 159 insertions(+), 159 deletions(-)
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c +2 -2
@@ -714,7 +714,7 @@ ksocknal_queue_tx_locked (ksock_tx_t *tx, ksock_conn_t *conn)LASSERT (tx->tx_resid == tx->tx_nob);CDEBUG (D_NET ,"Packet %p type %d, nob %d niov %d nkiov %d\n" , - tx, (tx->tx_lnetmsg !=NULL ) ? tx->tx_lnetmsg->msg_hdr.type: + tx, (tx->tx_lnetmsg !=NULL ) ? tx->tx_lnetmsg->msg_hdr.type :KSOCK_MSG_NOOP , tx->tx_nob, tx->tx_niov, tx->tx_nkiov);
@@ -1092,7 +1092,7 @@ ksocknal_new_packet (ksock_conn_t *conn, int nob_to_skip) conn->ksnc_rx_iov[niov].iov_len = nob; niov++; skipped += nob; - nob_to_skip -=nob; + nob_to_skip -= nob; }while (nob_to_skip !=0 &&/* mustn't overflow conn's rx iov */ niov <sizeof (conn->ksnc_rx_iov_space) /sizeof (struct iovec ));
drivers/staging/lustre/lnet/selftest/conrpc.h +2 -2
@@ -105,8 +105,8 @@ typedef struct lstcon_rpc_trans {#define LST_TRANS_STATQRY 0x21 -typedef int (*lstcon_rpc_cond_func_t )(int ,struct lstcon_node *,void *); -typedef int (*lstcon_rpc_readent_func_t )(int ,srpc_msg_t *,lstcon_rpc_ent_t *); +typedef int (*lstcon_rpc_cond_func_t )(int ,struct lstcon_node *,void *); +typedef int (*lstcon_rpc_readent_func_t )(int ,srpc_msg_t *,lstcon_rpc_ent_t *);int lstcon_sesrpc_prep (struct lstcon_node *nd,int transop,unsigned version,lstcon_rpc_t **crpc);
drivers/staging/lustre/lnet/selftest/console.c +8 -8
@@ -308,7 +308,7 @@ lstcon_group_ndlink_release(lstcon_group_t *grp, lstcon_ndlink_t *ndl) {list_del_init (&ndl->ndl_link);lstcon_ndlink_release (ndl); - grp->grp_nnode --; + grp->grp_nnode--; } static void
@@ -320,7 +320,7 @@ lstcon_group_ndlink_move(lstcon_group_t *old,list_del (&ndl->ndl_hlink);list_del (&ndl->ndl_link); - old->grp_nnode --; + old->grp_nnode--;list_add_tail (&ndl->ndl_hlink, &new->grp_ndl_hash[idx]);list_add_tail (&ndl->ndl_link, &new->grp_ndl_list);
@@ -527,7 +527,7 @@ lstcon_group_add(char *name)lstcon_group_t *grp;int rc; - rc = (lstcon_group_find (name, &grp) ==0 )? -EEXIST :0 ; + rc = (lstcon_group_find (name, &grp) ==0 ) ? -EEXIST :0 ;if (rc !=0 ) {/* find a group with same name */ lstcon_group_put (grp);
@@ -816,7 +816,7 @@ lstcon_group_info(char *name, lstcon_ndlist_ent_t *gents_p,LST_NODE_STATE_COUNTER (ndl->ndl_node, gentp); rc =copy_to_user (gents_p, gentp, -sizeof (lstcon_ndlist_ent_t)) ? -EFAULT :0 ; +sizeof (lstcon_ndlist_ent_t)) ? -EFAULT :0 ;LIBCFS_FREE (gentp,sizeof (lstcon_ndlist_ent_t));
@@ -847,7 +847,7 @@ lstcon_batch_add(char *name)int i;int rc; - rc = (lstcon_batch_find (name, &bat) ==0 )? -EEXIST :0 ; + rc = (lstcon_batch_find (name, &bat) ==0 ) ? -EEXIST :0 ;if (rc !=0 ) {CDEBUG (D_NET ,"Batch %s already exists\n" , name);return rc;
@@ -911,7 +911,7 @@ lstcon_batch_list(int index, int len, char *name_up)list_for_each_entry (bat, &console_session.ses_bat_list, bat_link) {if (index-- ==0 ) {return copy_to_user (name_up, bat->bat_name, len) ? - -EFAULT :0 ; + -EFAULT :0 ; } }
@@ -956,7 +956,7 @@ lstcon_batch_info(char *name, lstcon_test_batch_ent_t *ent_up, int server, &test->tes_dst_grp->grp_ndl_list;if (dents_up !=NULL ) { - rc =lstcon_nodes_getent ((server ? srvlst: clilst), + rc =lstcon_nodes_getent ((server ? srvlst : clilst), index_p, ndent_p, dents_up);return rc; }
@@ -1683,7 +1683,7 @@ int lstcon_session_match(lst_sid_t sid) {return (console_session.ses_id.ses_nid == sid.ses_nid && - console_session.ses_id.ses_stamp == sid.ses_stamp) ?1 :0 ; + console_session.ses_id.ses_stamp == sid.ses_stamp) ?1 :0 ; } static void
drivers/staging/lustre/lnet/selftest/selftest.h +1 -1
@@ -562,7 +562,7 @@ static inline const char * swi_state2str (int state) {#define STATE2STR (x) case x: return #x -switch (state) { +switch (state) {default :LBUG ();STATE2STR (SWI_STATE_NEWBORN );
drivers/staging/lustre/lustre/include/cl_object.h +7 -7
@@ -1095,7 +1095,7 @@ do { \ \if (cfs_cdebug_show (mask,DEBUG_SUBSYSTEM )) { \cl_page_print (env, &msgdata, lu_cdebug_printer, page); \ - CDEBUG(mask, format , ## __VA_ARGS__); \ + CDEBUG(mask, format, ## __VA_ARGS__); \ } \ }while (0 )
@@ -1108,7 +1108,7 @@ do { \ \if (cfs_cdebug_show (mask,DEBUG_SUBSYSTEM )) { \cl_page_header_print (env, &msgdata, lu_cdebug_printer, page); \ - CDEBUG(mask, format , ## __VA_ARGS__); \ + CDEBUG(mask, format, ## __VA_ARGS__); \ } \ }while (0 )
@@ -1475,13 +1475,13 @@ enum cl_lock_flags {* lock has been cancelled. This flag is never cleared once set (by * cl_lock_cancel0()). */ -CLF_CANCELLED =1 <<0 , +CLF_CANCELLED =1 <<0 ,/** cancellation is pending for this lock. */ -CLF_CANCELPEND =1 <<1 , +CLF_CANCELPEND =1 <<1 ,/** destruction is pending for this lock. */ -CLF_DOOMED =1 <<2 , +CLF_DOOMED =1 <<2 ,/** from enqueue RPC reply upcall. */ - CLF_FROM_UPCALL= 1 << 3, + CLF_FROM_UPCALL = 1 << 3, };/**
@@ -1833,7 +1833,7 @@ do { \ \if (cfs_cdebug_show (mask,DEBUG_SUBSYSTEM )) { \cl_lock_print (env, &msgdata, lu_cdebug_printer, lock); \ - CDEBUG(mask, format , ## __VA_ARGS__); \ + CDEBUG(mask, format, ## __VA_ARGS__); \ } \ }while (0 )
drivers/staging/lustre/lustre/include/lu_object.h +8 -8
@@ -790,7 +790,7 @@ do { \ \if (cfs_cdebug_show (mask,DEBUG_SUBSYSTEM )) { \lu_object_print (env, &msgdata, lu_cdebug_printer, object);\ - CDEBUG(mask, format , ## __VA_ARGS__); \ + CDEBUG(mask, format, ## __VA_ARGS__); \ } \ }while (0 )
@@ -805,7 +805,7 @@ do { \lu_object_header_print (env, &msgdata, lu_cdebug_printer,\ (object)->lo_header); \lu_cdebug_printer (env, &msgdata,"\n" ); \ - CDEBUG(mask, format , ## __VA_ARGS__); \ + CDEBUG(mask, format, ## __VA_ARGS__); \ } \ }while (0 )
@@ -1131,7 +1131,7 @@ struct lu_context_key { \return value; \ } \ - struct __##mod##__dummy_init {;} /* semicolon catcher */ + struct __##mod##__dummy_init {; } /* semicolon catcher */#define LU_KEY_FINI (mod, type) \ static void mod##_key_fini(const struct lu_context *ctx, \
@@ -1141,7 +1141,7 @@ struct lu_context_key { \OBD_FREE_PTR (info); \ } \ - struct __##mod##__dummy_fini {;} /* semicolon catcher */ + struct __##mod##__dummy_fini {; } /* semicolon catcher */#define LU_KEY_INIT_FINI (mod, type) \ LU_KEY_INIT(mod, type); \
@@ -1193,28 +1193,28 @@ void lu_context_key_revive (struct lu_context_key *key); mod##_key_init_generic(__VA_ARGS__, NULL); \return lu_context_key_register_many (__VA_ARGS__,NULL ); \ } \ - struct __##mod##_dummy_type_init {;} + struct __##mod##_dummy_type_init {; }#define LU_TYPE_FINI (mod, ...) \ static void mod##_type_fini(struct lu_device_type *t) \ { \ lu_context_key_degister_many(__VA_ARGS__, NULL); \ } \ - struct __##mod##_dummy_type_fini {;} + struct __##mod##_dummy_type_fini {; }#define LU_TYPE_START (mod, ...) \ static void mod##_type_start(struct lu_device_type *t) \ { \ lu_context_key_revive_many(__VA_ARGS__, NULL); \ } \ - struct __##mod##_dummy_type_start {;} + struct __##mod##_dummy_type_start {; }#define LU_TYPE_STOP (mod, ...) \ static void mod##_type_stop(struct lu_device_type *t) \ { \ lu_context_key_quiesce_many(__VA_ARGS__, NULL); \ } \ - struct __##mod##_dummy_type_stop {;} + struct __##mod##_dummy_type_stop {; }
drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +6 -6
@@ -827,7 +827,7 @@ static inline int lu_fid_eq(const struct lu_fid *f0, const struct lu_fid *f1)typeof (val0) __val0 = (val0); \typeof (val1) __val1 = (val1); \ \ - (__val0 == __val1 ?0 : __val0 > __val1 ?+1 :-1 ); \ + (__val0 == __val1 ?0 : __val0 > __val1 ?1 :-1 ); \ }) static inline int lu_fid_cmp(const struct lu_fid *f0,
@@ -1404,9 +1404,9 @@ void lustre_swab_connect(struct obd_connect_data *ocd);* algorithm and also the OBD_FL_CKSUM* flags. */ typedef enum { -OBD_CKSUM_CRC32 =0x00000001 , -OBD_CKSUM_ADLER =0x00000002 , -OBD_CKSUM_CRC32C =0x00000004 , +OBD_CKSUM_CRC32 =0x00000001 , +OBD_CKSUM_ADLER =0x00000002 , +OBD_CKSUM_CRC32C =0x00000004 , }cksum_type_t ;/*
@@ -1444,7 +1444,7 @@ enum obdo_flags {OBD_FL_DELORPHAN =0x00000004 ,/* if set in o_flags delete orphans */ OBD_FL_NORPC =0x00000008 ,/* set in o_flags do in OSC not OST */ OBD_FL_IDONLY =0x00000010 ,/* set in o_flags only adjust obj id*/ -OBD_FL_RECREATE_OBJS =0x00000020 ,/* recreate missing obj */ +OBD_FL_RECREATE_OBJS =0x00000020 ,/* recreate missing obj */ OBD_FL_DEBUG_CHECK =0x00000040 ,/* echo client/server debug check */ OBD_FL_NO_USRQUOTA =0x00000100 ,/* the object's owner is over quota */ OBD_FL_NO_GRPQUOTA = 0x00000200, /* the object's group is over quota */
@@ -3574,7 +3574,7 @@ struct link_ea_entry {unsigned char lee_reclen[2 ];unsigned char lee_parent_fid[sizeof (struct lu_fid )];char lee_name[0 ]; -}__attribute__((packed)); +} __attribute__((packed));/** fid2path request/reply structure */ struct getinfo_fid2path {
drivers/staging/lustre/lustre/include/lustre/lustre_user.h +2 -2
@@ -798,14 +798,14 @@ struct changelog_ext_rec {static inline int changelog_rec_size (struct changelog_rec *rec) { -return CHANGELOG_REC_EXTENDED (rec) ?sizeof (struct changelog_ext_rec ): +return CHANGELOG_REC_EXTENDED (rec) ?sizeof (struct changelog_ext_rec ) :sizeof (*rec); }static inline char *changelog_rec_name (struct changelog_rec *rec) {return CHANGELOG_REC_EXTENDED (rec) ? - ((struct changelog_ext_rec *)rec)->cr_name: rec->cr_name; + ((struct changelog_ext_rec *)rec)->cr_name : rec->cr_name; }static inline int changelog_rec_snamelen (struct changelog_ext_rec *rec)
drivers/staging/lustre/lustre/include/lustre_capa.h +1 -1
@@ -171,7 +171,7 @@ CDEBUG(level, fmt " capability key@%p seq %llu keyid %u\n", \ ##args, k, capa_key_seq(k), capa_key_keyid(k)); \ } while (0) -typedef int (*renew_capa_cb_t )(struct obd_capa *,struct lustre_capa *); +typedef int (*renew_capa_cb_t )(struct obd_capa *,struct lustre_capa *);/* obdclass/capa.c */ extern struct list_head capa_list[];
drivers/staging/lustre/lustre/include/lustre_disk.h +1 -1
@@ -365,7 +365,7 @@ static inline void check_lcd(char *obd_name, int index, struct lsd_client_data *lcd) {int length =sizeof (lcd->lcd_uuid); -if (strnlen ((char *)lcd->lcd_uuid, length) == length) { +if (strnlen ((char *)lcd->lcd_uuid, length) == length) { lcd->lcd_uuid[length -1 ] ='\0' ; LCONSOLE_ERROR("the client UUID (%s) on %s for exports stored in last_rcvd(index = %d) is bad!\n",
drivers/staging/lustre/lustre/include/lustre_dlm.h +3 -3
@@ -1025,7 +1025,7 @@ char *ldlm_it2str(int it);* with a debugging message that is ldlm-related */ #define LDLM_DEBUG_NOLOCK(format, a...) \ - CDEBUG(D_DLMTRACE, "### " format "\n" , ##a) + CDEBUG(D_DLMTRACE, "### " format "\n", ##a)/** * Support function for lock information printing into debug logs.
@@ -1051,7 +1051,7 @@ void _ldlm_lock_debug(struct ldlm_lock *lock, #define LDLM_DEBUG_LIMIT(mask, lock, fmt, a...) do { \ static struct cfs_debug_limit_state _ldlm_cdls; \ LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, mask, &_ldlm_cdls); \ - ldlm_lock_debug(&msgdata, mask, &_ldlm_cdls, lock, "### " fmt , ##a);\ + ldlm_lock_debug(&msgdata, mask, &_ldlm_cdls, lock, "### " fmt, ##a);\ } while (0) #define LDLM_ERROR(lock, fmt, a...) LDLM_DEBUG_LIMIT(D_ERROR, lock, fmt, ## a)
@@ -1062,7 +1062,7 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,if (likely (lock !=NULL )) { \LIBCFS_DEBUG_MSG_DATA_DECL (msgdata,D_DLMTRACE ,NULL ); \ ldlm_lock_debug(&msgdata, D_DLMTRACE, NULL, lock, \ - "### " fmt , ##a); \ + "### " fmt, ##a); \ } else { \ LDLM_DEBUG_NOLOCK("no dlm lock: " fmt, ##a); \ } \
drivers/staging/lustre/lustre/include/lustre_dlm_flags.h +76 -76
345 lines not on this page · raw message
drivers/staging/lustre/lustre/include/lustre_lib.h +3 -3
@@ -313,7 +313,7 @@ static inline void obd_ioctl_freedata(char *buf, int len)#define OBD_IOC_CLIENT_RECOVER _IOW ('f', 133, OBD_IOC_DATA_TYPE)#define OBD_IOC_PING_TARGET _IOW ('f', 136, OBD_IOC_DATA_TYPE) -#define OBD_IOC_DEC_FS_USE_COUNT _IO ('f', 139 ) +#define OBD_IOC_DEC_FS_USE_COUNT _IO ('f', 139)#define OBD_IOC_NO_TRANSNO _IOW ('f', 140, OBD_IOC_DATA_TYPE)#define OBD_IOC_SET_READONLY _IOW ('f', 141, OBD_IOC_DATA_TYPE)#define OBD_IOC_ABORT_RECOVERY _IOR ('f', 142, OBD_IOC_DATA_TYPE)
@@ -557,9 +557,9 @@ do { \if (__timeout ==0 ) { \schedule (); \ }else { \ -long interval = info->lwi_interval? \ +long interval = info->lwi_interval ? \min_t (long, \ - info->lwi_interval,__timeout):\ + info->lwi_interval, __timeout) : \ __timeout; \long remaining =schedule_timeout (interval);\ __timeout = cfs_time_sub(__timeout, \
drivers/staging/lustre/lustre/include/lustre_net.h +1 -1
@@ -2065,7 +2065,7 @@ struct ptlrpc_service_part {* rqbd list and incoming requests waiting for preprocess, * threads starting & stopping are also protected by this lock. */ - spinlock_t scp_lock __cfs_cacheline_aligned; + spinlock_t scp_lock __cfs_cacheline_aligned;/** total # req buffer descs allocated */ int scp_nrqbds_total;/** # posted request buffers for receiving */
drivers/staging/lustre/lustre/include/obd.h +1 -1
@@ -1300,7 +1300,7 @@ struct md_ops { const struct lu_fid *, struct ptlrpc_request **);int (*m_setattr)(struct obd_export *,struct md_op_data *,void *, -int ,void *,int ,struct ptlrpc_request **, +int ,void *,int ,struct ptlrpc_request **,struct md_open_data **mod);int (*m_sync)(struct obd_export *,const struct lu_fid *,struct obd_capa *,struct ptlrpc_request **);
drivers/staging/lustre/lustre/include/obd_support.h +1 -1
@@ -585,7 +585,7 @@ do { \ (!HAS_FAIL_ALLOC_FLAG || obd_alloc_fail_rate == 0 || \ !obd_alloc_fail(ptr, #ptr, "km", size, \ __FILE__, __LINE__) || \ - OBD_FREE_RTN0(ptr)))){ \ + OBD_FREE_RTN0(ptr)))) { \ OBD_ALLOC_POST(ptr, size, "kmalloced"); \ } \ } while (0)
drivers/staging/lustre/lustre/libcfs/tracefile.c +2 -2
@@ -124,7 +124,7 @@ int cfs_trace_refill_stock(struct cfs_trace_cpu_data *tcd, gfp_t gfp,* from here: this will lead to infinite recursion. */ -for (i =0 ; i + tcd->tcd_cur_stock_pages <TCD_STOCK_PAGES ; ++ i) { +for (i =0 ; i + tcd->tcd_cur_stock_pages <TCD_STOCK_PAGES ; ++i) {struct cfs_trace_page *tage; tage =cfs_tage_alloc (gfp);
@@ -370,7 +370,7 @@ int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata,/* indent message according to the nesting level */ while (depth-- >0 ) { *(debug_buf++) ='.' ; - ++ tage->used; + ++tage->used; }strcpy (debug_buf, file);
drivers/staging/lustre/lustre/llite/file.c +2 -2
@@ -270,7 +270,7 @@ static int ll_md_close(struct obd_export *md_exp, struct inode *inode,int lockmode;__u64 flags =LDLM_FL_BLOCK_GRANTED |LDLM_FL_TEST_LOCK ;struct lustre_handle lockh; -ldlm_policy_data_t policy = {.l_inodebits = {MDS_INODELOCK_OPEN }}; +ldlm_policy_data_t policy = { .l_inodebits = {MDS_INODELOCK_OPEN } };int rc =0 ;/* clear group lock, if present */
@@ -2670,7 +2670,7 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) };struct md_op_data *op_data;struct lustre_handle lockh = {0 }; -ldlm_policy_data_t flock = {{0 }}; +ldlm_policy_data_t flock = { {0 } };__u64 flags =0 ;int rc;int rc2 =0 ;
drivers/staging/lustre/lustre/llite/llite_internal.h +1 -1
@@ -71,7 +71,7 @@ struct ll_dentry_data {struct rcu_head lld_rcu_head; }; -#define ll_d2d (de) ((struct ll_dentry_data*)((de)->d_fsdata)) +#define ll_d2d (de) ((struct ll_dentry_data *)((de)->d_fsdata))#define LLI_INODE_MAGIC 0x111d0de5#define LLI_INODE_DEAD 0xdeadd00d
drivers/staging/lustre/lustre/llite/lproc_llite.c +1 -1
@@ -1325,7 +1325,7 @@ void ll_rw_stats_tally(struct ll_sb_info *sbi, pid_t pid,lprocfs_oh_clear (&io_extents->pp_extents[cur].pp_w_hist); } -for (i =0 ; (count >= (1 <<LL_HIST_START << i)) && +for (i =0 ; (count >= (1 <<LL_HIST_START << i)) && (i < (LL_HIST_MAX -1 )); i++);if (rw ==0 ) { io_extents->pp_extents[cur].pp_r_hist.oh_buckets[i]++;
drivers/staging/lustre/lustre/llite/rw.c +3 -3
@@ -656,7 +656,7 @@ static int ll_read_ahead_pages(const struct lu_env *env, page_idx, mapping);if (rc ==1 ) { (*reserved_pages)--; - count ++; + count++; }else if (rc == -ENOLCK )break ; }else if (stride_ria) {
@@ -890,7 +890,7 @@ static void ras_update_stride_detector(struct ll_readahead_state *ras,if (!stride_io_mode (ras) && (stride_gap !=0 || ras->ras_consecutive_stride_requests ==0 )) { ras->ras_stride_pages = ras->ras_consecutive_pages; - ras->ras_stride_length = stride_gap +ras->ras_consecutive_pages; + ras->ras_stride_length = stride_gap+ras->ras_consecutive_pages; }LASSERT (ras->ras_request_index ==0 );LASSERT (ras->ras_consecutive_stride_requests ==0 );
@@ -902,7 +902,7 @@ static void ras_update_stride_detector(struct ll_readahead_state *ras, } ras->ras_stride_pages = ras->ras_consecutive_pages; - ras->ras_stride_length = stride_gap +ras->ras_consecutive_pages; + ras->ras_stride_length = stride_gap+ras->ras_consecutive_pages;RAS_CDEBUG (ras);return ;
drivers/staging/lustre/lustre/llite/statahead.c +2 -2
@@ -659,7 +659,7 @@ static void ll_post_statahead(struct ll_statahead_info *sai)* revalidate. */ /* unlinked and re-created with the same name */ -if (unlikely (!lu_fid_eq (&minfo->mi_data.op_fid2, &body->fid1))){ +if (unlikely (!lu_fid_eq (&minfo->mi_data.op_fid2, &body->fid1))) { entry->se_inode =NULL ;iput (child); child =NULL ;
@@ -1215,7 +1215,7 @@ do_it:while (1 ) {l_wait_event (thread->t_ctl_waitq, !sa_received_empty (sai) || - sai->sai_sent == sai->sai_replied|| + sai->sai_sent == sai->sai_replied || !thread_is_running (thread), &lwi);
drivers/staging/lustre/lustre/llite/vvp_io.c +1 -1
@@ -698,7 +698,7 @@ static int vvp_io_fault_start(const struct lu_env *env,/* return +1 to stop cl_io_loop() and ll_fault() will catch * and retry. */ - result =+1 ; + result =1 ; goto out; }
drivers/staging/lustre/lustre/lmv/lmv_obd.c +1 -1
@@ -1849,7 +1849,7 @@ static int lmv_early_cancel(struct obd_export *exp, struct md_op_data *op_data,struct obd_device *obd = exp->exp_obd;struct lmv_obd *lmv = &obd->u.lmv;struct lmv_tgt_desc *tgt; -ldlm_policy_data_t policy = {{0 }}; +ldlm_policy_data_t policy = { {0 } };int rc =0 ;if (!fid_is_sane (fid))
drivers/staging/lustre/lustre/lov/lov_obd.c +2 -2
@@ -1672,7 +1672,7 @@ static int fiemap_calc_last_stripe(struct lov_stripe_md *lsm, u64 fm_start,break ; } *stripe_count = j; - last_stripe = (start_stripe + j -1 ) %lsm->lsm_stripe_count; + last_stripe = (start_stripe + j -1 ) % lsm->lsm_stripe_count; }return last_stripe;
@@ -1862,7 +1862,7 @@ static int lov_fiemap(struct lov_obd *lov, __u32 keylen, void *key, fm_local->fm_start = lun_start; fm_local->fm_flags &= ~FIEMAP_FLAG_DEVICE_ORDER ;memcpy (&fm_key->fiemap, fm_local,sizeof (*fm_local)); - *vallen=fiemap_count_to_size (fm_local->fm_extent_count); + *vallen =fiemap_count_to_size (fm_local->fm_extent_count); rc =obd_get_info (NULL , lov->lov_tgts[ost_index]->ltd_exp, keylen, key, vallen, fm_local, lsm);
drivers/staging/lustre/lustre/obdclass/cl_io.c +5 -5
@@ -307,7 +307,7 @@ static void cl_io_locks_sort(struct cl_io *io)*/ default :LBUG (); -case +1 : +case 1 :list_move_tail (&curr->cill_linkage, &prev->cill_linkage); done =0 ;
@@ -335,7 +335,7 @@ int cl_queue_match(const struct list_head *queue,list_for_each_entry (scan, queue, cill_linkage) {if (cl_lock_descr_match (&scan->cill_descr, need)) -return +1 ; +return 1 ; }return 0 ; }
@@ -353,7 +353,7 @@ static int cl_queue_merge(const struct list_head *queue,CDEBUG (D_VFSTRACE ,"lock: %d: [%lu, %lu]\n" , scan->cill_descr.cld_mode, scan->cill_descr.cld_start, scan->cill_descr.cld_end); -return +1 ; +return 1 ; }return 0 ;
@@ -600,7 +600,7 @@ int cl_io_lock_add(const struct lu_env *env, struct cl_io *io,int result;if (cl_lockset_merge (&io->ci_lockset, &link->cill_descr)) - result =+1 ; + result =1 ;else {list_add (&link->cill_linkage, &io->ci_lockset.cls_todo); result =0 ;
@@ -918,7 +918,7 @@ int cl_io_submit_sync(const struct lu_env *env, struct cl_io *io,*/ cl_page_list_for_each (pg, &queue->c2_qin) { pg->cp_sync_io =NULL ; -cl_sync_io_note (anchor,+1 ); +cl_sync_io_note (anchor,1 ); }/* wait for the IO to be finished. */
drivers/staging/lustre/lustre/obdclass/cl_lock.c +3 -3
@@ -2027,7 +2027,7 @@ static struct cl_lock *cl_lock_hold_mutex(const struct lu_env *env,cl_lock_mutex_get (env, lock);if (lock->cll_state <CLS_FREEING && !(lock->cll_flags &CLF_CANCELLED )) { -cl_lock_hold_mod (env, lock,+1 ); +cl_lock_hold_mod (env, lock,1 );lu_ref_add (&lock->cll_holders, scope, source);lu_ref_add (&lock->cll_reference, scope, source);break ;
@@ -2115,7 +2115,7 @@ void cl_lock_hold_add(const struct lu_env *env, struct cl_lock *lock,LINVRNT (cl_lock_invariant (env, lock));LASSERT (lock->cll_state !=CLS_FREEING ); -cl_lock_hold_mod (env, lock,+1 ); +cl_lock_hold_mod (env, lock,1 );cl_lock_get (lock);lu_ref_add (&lock->cll_holders, scope, source);lu_ref_add (&lock->cll_reference, scope, source);
@@ -2157,7 +2157,7 @@ void cl_lock_user_add(const struct lu_env *env, struct cl_lock *lock)LINVRNT (cl_lock_is_mutexed (lock));LINVRNT (cl_lock_invariant (env, lock)); -cl_lock_used_mod (env, lock,+1 ); +cl_lock_used_mod (env, lock,1 ); }EXPORT_SYMBOL (cl_lock_user_add);
drivers/staging/lustre/lustre/obdclass/cl_object.c +1 -1
@@ -661,7 +661,7 @@ static int cl_env_store_init(void) {CFS_HASH_MAX_THETA , &cl_env_hops, CFS_HASH_RW_BKTLOCK); -return cl_env_hash !=NULL ?0 :-ENOMEM ; +return cl_env_hash !=NULL ?0 : -ENOMEM ; }static void cl_env_store_fini (void )
drivers/staging/lustre/lustre/obdclass/class_obd.c +2 -2
@@ -138,7 +138,7 @@ int obd_alloc_fail(const void *ptr, const char *name, const char *type,if (ptr ==NULL || (cfs_rand () &OBD_ALLOC_FAIL_MASK ) < obd_alloc_fail_rate) {CERROR ("%s%salloc of %s (%llu bytes) failed at %s:%d\n" , - ptr ?"force " :"" , type, name, (__u64 )size, file, + ptr ?"force " :"" , type, name, (__u64 )size, file, line); CERROR("%llu total bytes and %llu total pages" " (%llu bytes) allocated by Lustre\n",
@@ -470,7 +470,7 @@ int obd_init_checks(void)return -EOVERFLOW ; }if (do_div (div64val,256 ) != (u64val &255 )) { -CERROR ("do_div(%#llx,256) != %llu\n" , u64val, u64val &255 ); +CERROR ("do_div(%#llx,256) != %llu\n" , u64val, u64val &255 );return -EOVERFLOW ; }if (u64val >>8 != div64val) {
drivers/staging/lustre/lustre/obdclass/genops.c +3 -3
@@ -545,7 +545,7 @@ struct obd_device *class_find_client_obd(struct obd_uuid *tgt_uuid, strlen(typ_name)) == 0)) {if (obd_uuid_equals (tgt_uuid, &obd->u.cli.cl_target_uuid) && - ((grp_uuid)?obd_uuid_equals (grp_uuid, + ((grp_uuid) ?obd_uuid_equals (grp_uuid, &obd->obd_uuid) :1 )) {read_unlock (&obd_dev_lock);return obd;
@@ -1078,7 +1078,7 @@ void __class_export_add_lock_ref(struct obd_export *exp, struct ldlm_lock *lock)LCONSOLE_WARN ("setting export %p for lock %p which already has export %p\n" , exp, lock, lock->l_exp_refs_target); } -if ((lock->l_exp_refs_nr ++) ==0 ) { +if ((lock->l_exp_refs_nr++) ==0 ) {list_add (&lock->l_exp_refs_link, &exp->exp_locks_list); lock->l_exp_refs_target = exp; }
@@ -1488,7 +1488,7 @@ int obd_export_evict_by_uuid(struct obd_device *obd, const char *uuid)EXPORT_SYMBOL (obd_export_evict_by_uuid);#if LUSTRE_TRACKS_LOCK_EXP_REFS -void (*class_export_dump_hook)(struct obd_export *) =NULL ; +void (*class_export_dump_hook)(struct obd_export *) =NULL ;EXPORT_SYMBOL (class_export_dump_hook);#endif
drivers/staging/lustre/lustre/obdclass/llog.c +2 -2
@@ -326,7 +326,7 @@ repeat:* swabbing is done at the beginning of the loop. */ for (rec = (struct llog_rec_hdr *)buf; (char *)rec < buf +LLOG_CHUNK_SIZE ; - rec = (struct llog_rec_hdr *)((char *)rec + rec->lrh_len)){ + rec = (struct llog_rec_hdr *)((char *)rec + rec->lrh_len)) {CDEBUG (D_OTHER ,"processing rec 0x%p type %#x\n" , rec, rec->lrh_type);
@@ -522,7 +522,7 @@ int llog_reverse_process(const struct lu_env *env, rec = (void *)rec + rec->lrh_len;if (LLOG_REC_HDR_NEEDS_SWABBING (rec))lustre_swab_llog_rec (rec); - idx ++; + idx++; }LASSERT (idx == index); tail = (void *)rec + rec->lrh_len -sizeof (*tail);
drivers/staging/lustre/lustre/obdclass/obd_config.c +1 -1
@@ -1451,7 +1451,7 @@ int class_config_llog_handler(const struct lu_env *env,lustre_cfg_bufs_init (&bufs, lcfg);if (clli && clli->cfg_instance && -LUSTRE_CFG_BUFLEN (lcfg,0 ) >0 ){ +LUSTRE_CFG_BUFLEN (lcfg,0 ) >0 ) { inst =1 ; inst_len =LUSTRE_CFG_BUFLEN (lcfg,0 ) +sizeof (clli->cfg_instance) *2 +4 ;
drivers/staging/lustre/lustre/osc/osc_request.c +3 -3
@@ -1586,7 +1586,7 @@ static int osc_brw_fini_request(struct ptlrpc_request *req, int rc)char *router;cksum_type_t cksum_type; - cksum_type =cksum_type_unpack (body->oa.o_valid &OBD_MD_FLFLAGS ? + cksum_type =cksum_type_unpack (body->oa.o_valid&OBD_MD_FLFLAGS ? body->oa.o_flags :0 ); client_cksum = osc_checksum_bulk(rc, aa->aa_page_count, aa->aa_ppga, OST_READ,
@@ -1654,7 +1654,7 @@ static int osc_brw_redo_request(struct ptlrpc_request *request, "redo for recoverable error %d", rc); rc = osc_brw_prep_request(lustre_msg_get_opc(request->rq_reqmsg) == - OST_WRITE ? OBD_BRW_WRITE :OBD_BRW_READ, + OST_WRITE ? OBD_BRW_WRITE : OBD_BRW_READ, aa->aa_cli, aa->aa_oa, NULL /* lsm unused by osc currently */, aa->aa_page_count, aa->aa_ppga,
@@ -3101,7 +3101,7 @@ static int osc_import_event(struct obd_device *obd,/* See bug 7198 */ if (ocd->ocd_connect_flags &OBD_CONNECT_REQPORTAL ) - imp->imp_client->cli_request_portal =OST_REQUEST_PORTAL ; + imp->imp_client->cli_request_portal =OST_REQUEST_PORTAL ; rc =obd_notify_observer (obd, obd,OBD_NOTIFY_OCD ,NULL );break ;
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +1 -1
@@ -54,7 +54,7 @@ static struct ll_rpc_opcode { { OST_SETATTR, "ost_setattr" }, { OST_READ, "ost_read" }, { OST_WRITE, "ost_write" }, - { OST_CREATE , "ost_create" }, + { OST_CREATE, "ost_create" }, { OST_DESTROY, "ost_destroy" }, { OST_GET_INFO, "ost_get_info" }, { OST_CONNECT, "ost_connect" },
Signature · 1 line
2.1.0
Re: [PATCH 1/5] staging: lustre: fix whitespace errors reported by checkpatch.pl
Quoted 4 lines · Mike Rapoport
Added/removed spaces and replaced '+1' with '1' in several places to eliminate SPACING and
POINTER_LOCATIONerrors reported by checkpatch.plSigned-off-by Mike Rapoport <[email protected]>
Does not apply to my tree :(
Re: [PATCH 1/5] staging: lustre: fix whitespace errors reported by checkpatch.pl
Quoted 7 lines · Greg Kroah-Hartman
Quoted 4 lines · Mike Rapoport
Added/removed spaces and replaced '+1' with '1' in several places to eliminate SPACING and
POINTER_LOCATIONerrors reported by checkpatch.plSigned-off-by Mike Rapoport <[email protected]>Does not apply to my tree :(
Rebased against current staging-testing.
Quoted 1 line
From
4f4cdc89b94aec9a72cec4cec171d049f6f65a2aMon Sep 17 00:00:00 2001
From: Mike Rapoport <[email protected]>
Date: Sat, 22 Aug 2015 17:17:19 +0300
Subject: [PATCH] staging: lustre: fix whitespace errors reported by
checkpatch.pl
Added/removed spaces and replaced '+1' with '1' in several places to eliminate SPACING and POINTER_LOCATION errors reported by checkpatch.pl
--- .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 4 +- drivers/staging/lustre/lnet/selftest/conrpc.h | 4 +- drivers/staging/lustre/lnet/selftest/console.c | 16 +-- drivers/staging/lustre/lnet/selftest/selftest.h | 2 +- drivers/staging/lustre/lustre/include/cl_object.h | 14 +- drivers/staging/lustre/lustre/include/lu_object.h | 16 +-- .../lustre/lustre/include/lustre/lustre_idl.h | 12 +- .../lustre/lustre/include/lustre/lustre_user.h | 4 +- .../staging/lustre/lustre/include/lustre_capa.h | 2 +- .../staging/lustre/lustre/include/lustre_disk.h | 2 +- drivers/staging/lustre/lustre/include/lustre_dlm.h | 6 +- .../lustre/lustre/include/lustre_dlm_flags.h | 152 ++++++++++----------- drivers/staging/lustre/lustre/include/lustre_lib.h | 6 +- drivers/staging/lustre/lustre/include/lustre_net.h | 2 +- drivers/staging/lustre/lustre/include/obd.h | 2 +- .../staging/lustre/lustre/include/obd_support.h | 2 +- drivers/staging/lustre/lustre/libcfs/tracefile.c | 4 +- .../staging/lustre/lustre/llite/llite_internal.h | 2 +- drivers/staging/lustre/lustre/llite/lproc_llite.c | 2 +- drivers/staging/lustre/lustre/llite/rw.c | 6 +- drivers/staging/lustre/lustre/llite/statahead.c | 4 +- drivers/staging/lustre/lustre/llite/vvp_io.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 4 +- drivers/staging/lustre/lustre/obdclass/cl_io.c | 10 +- drivers/staging/lustre/lustre/obdclass/cl_lock.c | 6 +- drivers/staging/lustre/lustre/obdclass/cl_object.c | 2 +- drivers/staging/lustre/lustre/obdclass/class_obd.c | 4 +- drivers/staging/lustre/lustre/obdclass/genops.c | 6 +- drivers/staging/lustre/lustre/obdclass/llog.c | 4 +- .../staging/lustre/lustre/obdclass/obd_config.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 6 +- .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- 33 files changed, 157 insertions(+), 157 deletions(-)
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c +2 -2
@@ -714,7 +714,7 @@ ksocknal_queue_tx_locked (ksock_tx_t *tx, ksock_conn_t *conn)LASSERT (tx->tx_resid == tx->tx_nob);CDEBUG (D_NET ,"Packet %p type %d, nob %d niov %d nkiov %d\n" , - tx, (tx->tx_lnetmsg !=NULL ) ? tx->tx_lnetmsg->msg_hdr.type: + tx, (tx->tx_lnetmsg !=NULL ) ? tx->tx_lnetmsg->msg_hdr.type :KSOCK_MSG_NOOP , tx->tx_nob, tx->tx_niov, tx->tx_nkiov);
@@ -1092,7 +1092,7 @@ ksocknal_new_packet (ksock_conn_t *conn, int nob_to_skip) conn->ksnc_rx_iov[niov].iov_len = nob; niov++; skipped += nob; - nob_to_skip -=nob; + nob_to_skip -= nob; }while (nob_to_skip !=0 &&/* mustn't overflow conn's rx iov */ niov <sizeof (conn->ksnc_rx_iov_space) /sizeof (struct iovec ));
drivers/staging/lustre/lnet/selftest/conrpc.h +2 -2
@@ -105,8 +105,8 @@ typedef struct lstcon_rpc_trans {#define LST_TRANS_STATQRY 0x21 -typedef int (*lstcon_rpc_cond_func_t )(int ,struct lstcon_node *,void *); -typedef int (*lstcon_rpc_readent_func_t )(int ,srpc_msg_t *,lstcon_rpc_ent_t *); +typedef int (*lstcon_rpc_cond_func_t )(int ,struct lstcon_node *,void *); +typedef int (*lstcon_rpc_readent_func_t )(int ,srpc_msg_t *,lstcon_rpc_ent_t *);int lstcon_sesrpc_prep (struct lstcon_node *nd,int transop,unsigned version,lstcon_rpc_t **crpc);
drivers/staging/lustre/lnet/selftest/console.c +8 -8
@@ -308,7 +308,7 @@ lstcon_group_ndlink_release(lstcon_group_t *grp, lstcon_ndlink_t *ndl) {list_del_init (&ndl->ndl_link);lstcon_ndlink_release (ndl); - grp->grp_nnode --; + grp->grp_nnode--; } static void
@@ -320,7 +320,7 @@ lstcon_group_ndlink_move(lstcon_group_t *old,list_del (&ndl->ndl_hlink);list_del (&ndl->ndl_link); - old->grp_nnode --; + old->grp_nnode--;list_add_tail (&ndl->ndl_hlink, &new->grp_ndl_hash[idx]);list_add_tail (&ndl->ndl_link, &new->grp_ndl_list);
@@ -527,7 +527,7 @@ lstcon_group_add(char *name)lstcon_group_t *grp;int rc; - rc = (lstcon_group_find (name, &grp) ==0 )? -EEXIST :0 ; + rc = (lstcon_group_find (name, &grp) ==0 ) ? -EEXIST :0 ;if (rc !=0 ) {/* find a group with same name */ lstcon_group_put (grp);
@@ -816,7 +816,7 @@ lstcon_group_info(char *name, lstcon_ndlist_ent_t *gents_p,LST_NODE_STATE_COUNTER (ndl->ndl_node, gentp); rc =copy_to_user (gents_p, gentp, -sizeof (lstcon_ndlist_ent_t)) ? -EFAULT :0 ; +sizeof (lstcon_ndlist_ent_t)) ? -EFAULT :0 ;LIBCFS_FREE (gentp,sizeof (lstcon_ndlist_ent_t));
@@ -847,7 +847,7 @@ lstcon_batch_add(char *name)int i;int rc; - rc = (lstcon_batch_find (name, &bat) ==0 )? -EEXIST :0 ; + rc = (lstcon_batch_find (name, &bat) ==0 ) ? -EEXIST :0 ;if (rc !=0 ) {CDEBUG (D_NET ,"Batch %s already exists\n" , name);return rc;
@@ -911,7 +911,7 @@ lstcon_batch_list(int index, int len, char *name_up)list_for_each_entry (bat, &console_session.ses_bat_list, bat_link) {if (index-- ==0 ) {return copy_to_user (name_up, bat->bat_name, len) ? - -EFAULT :0 ; + -EFAULT :0 ; } }
@@ -956,7 +956,7 @@ lstcon_batch_info(char *name, lstcon_test_batch_ent_t *ent_up, int server, &test->tes_dst_grp->grp_ndl_list;if (dents_up !=NULL ) { - rc =lstcon_nodes_getent ((server ? srvlst: clilst), + rc =lstcon_nodes_getent ((server ? srvlst : clilst), index_p, ndent_p, dents_up);return rc; }
@@ -1683,7 +1683,7 @@ int lstcon_session_match(lst_sid_t sid) {return (console_session.ses_id.ses_nid == sid.ses_nid && - console_session.ses_id.ses_stamp == sid.ses_stamp) ?1 :0 ; + console_session.ses_id.ses_stamp == sid.ses_stamp) ?1 :0 ; } static void
drivers/staging/lustre/lnet/selftest/selftest.h +1 -1
@@ -562,7 +562,7 @@ static inline const char * swi_state2str (int state) {#define STATE2STR (x) case x: return #x -switch (state) { +switch (state) {default :LBUG ();STATE2STR (SWI_STATE_NEWBORN );
drivers/staging/lustre/lustre/include/cl_object.h +7 -7
@@ -1095,7 +1095,7 @@ do { \ \if (cfs_cdebug_show (mask,DEBUG_SUBSYSTEM )) { \cl_page_print (env, &msgdata, lu_cdebug_printer, page); \ - CDEBUG(mask, format , ## __VA_ARGS__); \ + CDEBUG(mask, format, ## __VA_ARGS__); \ } \ }while (0 )
@@ -1108,7 +1108,7 @@ do { \ \if (cfs_cdebug_show (mask,DEBUG_SUBSYSTEM )) { \cl_page_header_print (env, &msgdata, lu_cdebug_printer, page); \ - CDEBUG(mask, format , ## __VA_ARGS__); \ + CDEBUG(mask, format, ## __VA_ARGS__); \ } \ }while (0 )
@@ -1475,13 +1475,13 @@ enum cl_lock_flags {* lock has been cancelled. This flag is never cleared once set (by * cl_lock_cancel0()). */ -CLF_CANCELLED =1 <<0 , +CLF_CANCELLED =1 <<0 ,/** cancellation is pending for this lock. */ -CLF_CANCELPEND =1 <<1 , +CLF_CANCELPEND =1 <<1 ,/** destruction is pending for this lock. */ -CLF_DOOMED =1 <<2 , +CLF_DOOMED =1 <<2 ,/** from enqueue RPC reply upcall. */ - CLF_FROM_UPCALL= 1 << 3, + CLF_FROM_UPCALL = 1 << 3, };/**
@@ -1833,7 +1833,7 @@ do { \ \if (cfs_cdebug_show (mask,DEBUG_SUBSYSTEM )) { \cl_lock_print (env, &msgdata, lu_cdebug_printer, lock); \ - CDEBUG(mask, format , ## __VA_ARGS__); \ + CDEBUG(mask, format, ## __VA_ARGS__); \ } \ }while (0 )
drivers/staging/lustre/lustre/include/lu_object.h +8 -8
@@ -790,7 +790,7 @@ do { \ \if (cfs_cdebug_show (mask,DEBUG_SUBSYSTEM )) { \lu_object_print (env, &msgdata, lu_cdebug_printer, object);\ - CDEBUG(mask, format , ## __VA_ARGS__); \ + CDEBUG(mask, format, ## __VA_ARGS__); \ } \ }while (0 )
@@ -805,7 +805,7 @@ do { \lu_object_header_print (env, &msgdata, lu_cdebug_printer,\ (object)->lo_header); \lu_cdebug_printer (env, &msgdata,"\n" ); \ - CDEBUG(mask, format , ## __VA_ARGS__); \ + CDEBUG(mask, format, ## __VA_ARGS__); \ } \ }while (0 )
@@ -1131,7 +1131,7 @@ struct lu_context_key { \return value; \ } \ - struct __##mod##__dummy_init {;} /* semicolon catcher */ + struct __##mod##__dummy_init {; } /* semicolon catcher */#define LU_KEY_FINI (mod, type) \ static void mod##_key_fini(const struct lu_context *ctx, \
@@ -1141,7 +1141,7 @@ struct lu_context_key { \OBD_FREE_PTR (info); \ } \ - struct __##mod##__dummy_fini {;} /* semicolon catcher */ + struct __##mod##__dummy_fini {; } /* semicolon catcher */#define LU_KEY_INIT_FINI (mod, type) \ LU_KEY_INIT(mod, type); \
@@ -1193,28 +1193,28 @@ void lu_context_key_revive (struct lu_context_key *key); mod##_key_init_generic(__VA_ARGS__, NULL); \return lu_context_key_register_many (__VA_ARGS__,NULL ); \ } \ - struct __##mod##_dummy_type_init {;} + struct __##mod##_dummy_type_init {; }#define LU_TYPE_FINI (mod, ...) \ static void mod##_type_fini(struct lu_device_type *t) \ { \ lu_context_key_degister_many(__VA_ARGS__, NULL); \ } \ - struct __##mod##_dummy_type_fini {;} + struct __##mod##_dummy_type_fini {; }#define LU_TYPE_START (mod, ...) \ static void mod##_type_start(struct lu_device_type *t) \ { \ lu_context_key_revive_many(__VA_ARGS__, NULL); \ } \ - struct __##mod##_dummy_type_start {;} + struct __##mod##_dummy_type_start {; }#define LU_TYPE_STOP (mod, ...) \ static void mod##_type_stop(struct lu_device_type *t) \ { \ lu_context_key_quiesce_many(__VA_ARGS__, NULL); \ } \ - struct __##mod##_dummy_type_stop {;} + struct __##mod##_dummy_type_stop {; }
drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +6 -6
@@ -827,7 +827,7 @@ static inline int lu_fid_eq(const struct lu_fid *f0, const struct lu_fid *f1)typeof (val0) __val0 = (val0); \typeof (val1) __val1 = (val1); \ \ - (__val0 == __val1 ?0 : __val0 > __val1 ?+1 :-1 ); \ + (__val0 == __val1 ?0 : __val0 > __val1 ?1 :-1 ); \ }) static inline int lu_fid_cmp(const struct lu_fid *f0,
@@ -1404,9 +1404,9 @@ void lustre_swab_connect(struct obd_connect_data *ocd);* algorithm and also the OBD_FL_CKSUM* flags. */ typedef enum { -OBD_CKSUM_CRC32 =0x00000001 , -OBD_CKSUM_ADLER =0x00000002 , -OBD_CKSUM_CRC32C =0x00000004 , +OBD_CKSUM_CRC32 =0x00000001 , +OBD_CKSUM_ADLER =0x00000002 , +OBD_CKSUM_CRC32C =0x00000004 , }cksum_type_t ;/*
@@ -1444,7 +1444,7 @@ enum obdo_flags {OBD_FL_DELORPHAN =0x00000004 ,/* if set in o_flags delete orphans */ OBD_FL_NORPC =0x00000008 ,/* set in o_flags do in OSC not OST */ OBD_FL_IDONLY =0x00000010 ,/* set in o_flags only adjust obj id*/ -OBD_FL_RECREATE_OBJS =0x00000020 ,/* recreate missing obj */ +OBD_FL_RECREATE_OBJS =0x00000020 ,/* recreate missing obj */ OBD_FL_DEBUG_CHECK =0x00000040 ,/* echo client/server debug check */ OBD_FL_NO_USRQUOTA =0x00000100 ,/* the object's owner is over quota */ OBD_FL_NO_GRPQUOTA = 0x00000200, /* the object's group is over quota */
@@ -3574,7 +3574,7 @@ struct link_ea_entry {unsigned char lee_reclen[2 ];unsigned char lee_parent_fid[sizeof (struct lu_fid )];char lee_name[0 ]; -}__attribute__((packed)); +} __attribute__((packed));/** fid2path request/reply structure */ struct getinfo_fid2path {
drivers/staging/lustre/lustre/include/lustre/lustre_user.h +2 -2
@@ -799,14 +799,14 @@ struct changelog_ext_rec {static inline int changelog_rec_size (struct changelog_rec *rec) { -return CHANGELOG_REC_EXTENDED (rec) ?sizeof (struct changelog_ext_rec ): +return CHANGELOG_REC_EXTENDED (rec) ?sizeof (struct changelog_ext_rec ) :sizeof (*rec); }static inline char *changelog_rec_name (struct changelog_rec *rec) {return CHANGELOG_REC_EXTENDED (rec) ? - ((struct changelog_ext_rec *)rec)->cr_name: rec->cr_name; + ((struct changelog_ext_rec *)rec)->cr_name : rec->cr_name; }static inline int changelog_rec_snamelen (struct changelog_ext_rec *rec)
drivers/staging/lustre/lustre/include/lustre_capa.h +1 -1
@@ -171,7 +171,7 @@ CDEBUG(level, fmt " capability key@%p seq %llu keyid %u\n", \ ##args, k, capa_key_seq(k), capa_key_keyid(k)); \ } while (0) -typedef int (*renew_capa_cb_t )(struct obd_capa *,struct lustre_capa *); +typedef int (*renew_capa_cb_t )(struct obd_capa *,struct lustre_capa *);/* obdclass/capa.c */ extern struct list_head capa_list[];
drivers/staging/lustre/lustre/include/lustre_disk.h +1 -1
@@ -365,7 +365,7 @@ static inline void check_lcd(char *obd_name, int index, struct lsd_client_data *lcd) {int length =sizeof (lcd->lcd_uuid); -if (strnlen ((char *)lcd->lcd_uuid, length) == length) { +if (strnlen ((char *)lcd->lcd_uuid, length) == length) { lcd->lcd_uuid[length -1 ] ='\0' ; LCONSOLE_ERROR("the client UUID (%s) on %s for exports stored in last_rcvd(index = %d) is bad!\n",
drivers/staging/lustre/lustre/include/lustre_dlm.h +3 -3
@@ -1025,7 +1025,7 @@ char *ldlm_it2str(int it);* with a debugging message that is ldlm-related */ #define LDLM_DEBUG_NOLOCK(format, a...) \ - CDEBUG(D_DLMTRACE, "### " format "\n" , ##a) + CDEBUG(D_DLMTRACE, "### " format "\n", ##a)/** * Support function for lock information printing into debug logs.
@@ -1051,7 +1051,7 @@ void _ldlm_lock_debug(struct ldlm_lock *lock, #define LDLM_DEBUG_LIMIT(mask, lock, fmt, a...) do { \ static struct cfs_debug_limit_state _ldlm_cdls; \ LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, mask, &_ldlm_cdls); \ - ldlm_lock_debug(&msgdata, mask, &_ldlm_cdls, lock, "### " fmt , ##a);\ + ldlm_lock_debug(&msgdata, mask, &_ldlm_cdls, lock, "### " fmt, ##a);\ } while (0) #define LDLM_ERROR(lock, fmt, a...) LDLM_DEBUG_LIMIT(D_ERROR, lock, fmt, ## a)
@@ -1062,7 +1062,7 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,if (likely (lock !=NULL )) { \LIBCFS_DEBUG_MSG_DATA_DECL (msgdata,D_DLMTRACE ,NULL ); \ ldlm_lock_debug(&msgdata, D_DLMTRACE, NULL, lock, \ - "### " fmt , ##a); \ + "### " fmt, ##a); \ } else { \ LDLM_DEBUG_NOLOCK("no dlm lock: " fmt, ##a); \ } \
drivers/staging/lustre/lustre/include/lustre_dlm_flags.h +76 -76
345 lines not on this page · raw message
drivers/staging/lustre/lustre/include/lustre_lib.h +3 -3
@@ -313,7 +313,7 @@ static inline void obd_ioctl_freedata(char *buf, int len)#define OBD_IOC_CLIENT_RECOVER _IOW ('f', 133, OBD_IOC_DATA_TYPE)#define OBD_IOC_PING_TARGET _IOW ('f', 136, OBD_IOC_DATA_TYPE) -#define OBD_IOC_DEC_FS_USE_COUNT _IO ('f', 139 ) +#define OBD_IOC_DEC_FS_USE_COUNT _IO ('f', 139)#define OBD_IOC_NO_TRANSNO _IOW ('f', 140, OBD_IOC_DATA_TYPE)#define OBD_IOC_SET_READONLY _IOW ('f', 141, OBD_IOC_DATA_TYPE)#define OBD_IOC_ABORT_RECOVERY _IOR ('f', 142, OBD_IOC_DATA_TYPE)
@@ -557,9 +557,9 @@ do { \if (__timeout ==0 ) { \schedule (); \ }else { \ -long interval = info->lwi_interval? \ +long interval = info->lwi_interval ? \min_t (long, \ - info->lwi_interval,__timeout):\ + info->lwi_interval, __timeout) : \ __timeout; \long remaining =schedule_timeout (interval);\ __timeout = cfs_time_sub(__timeout, \
drivers/staging/lustre/lustre/include/lustre_net.h +1 -1
@@ -2065,7 +2065,7 @@ struct ptlrpc_service_part {* rqbd list and incoming requests waiting for preprocess, * threads starting & stopping are also protected by this lock. */ - spinlock_t scp_lock __cfs_cacheline_aligned; + spinlock_t scp_lock __cfs_cacheline_aligned;/** total # req buffer descs allocated */ int scp_nrqbds_total;/** # posted request buffers for receiving */
drivers/staging/lustre/lustre/include/obd.h +1 -1
@@ -1300,7 +1300,7 @@ struct md_ops { const struct lu_fid *, struct ptlrpc_request **);int (*m_setattr)(struct obd_export *,struct md_op_data *,void *, -int ,void *,int ,struct ptlrpc_request **, +int ,void *,int ,struct ptlrpc_request **,struct md_open_data **mod);int (*m_sync)(struct obd_export *,const struct lu_fid *,struct obd_capa *,struct ptlrpc_request **);
drivers/staging/lustre/lustre/include/obd_support.h +1 -1
@@ -585,7 +585,7 @@ do { \ (!HAS_FAIL_ALLOC_FLAG || obd_alloc_fail_rate == 0 || \ !obd_alloc_fail(ptr, #ptr, "km", size, \ __FILE__, __LINE__) || \ - OBD_FREE_RTN0(ptr)))){ \ + OBD_FREE_RTN0(ptr)))) { \ OBD_ALLOC_POST(ptr, size, "kmalloced"); \ } \ } while (0)
drivers/staging/lustre/lustre/libcfs/tracefile.c +2 -2
@@ -124,7 +124,7 @@ int cfs_trace_refill_stock(struct cfs_trace_cpu_data *tcd, gfp_t gfp,* from here: this will lead to infinite recursion. */ -for (i =0 ; i + tcd->tcd_cur_stock_pages <TCD_STOCK_PAGES ; ++ i) { +for (i =0 ; i + tcd->tcd_cur_stock_pages <TCD_STOCK_PAGES ; ++i) {struct cfs_trace_page *tage; tage =cfs_tage_alloc (gfp);
@@ -370,7 +370,7 @@ int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata,/* indent message according to the nesting level */ while (depth-- >0 ) { *(debug_buf++) ='.' ; - ++ tage->used; + ++tage->used; }strcpy (debug_buf, file);
drivers/staging/lustre/lustre/llite/llite_internal.h +1 -1
@@ -71,7 +71,7 @@ struct ll_dentry_data {struct rcu_head lld_rcu_head; }; -#define ll_d2d (de) ((struct ll_dentry_data*)((de)->d_fsdata)) +#define ll_d2d (de) ((struct ll_dentry_data *)((de)->d_fsdata))#define LLI_INODE_MAGIC 0x111d0de5#define LLI_INODE_DEAD 0xdeadd00d
drivers/staging/lustre/lustre/llite/lproc_llite.c +1 -1
@@ -1325,7 +1325,7 @@ void ll_rw_stats_tally(struct ll_sb_info *sbi, pid_t pid,lprocfs_oh_clear (&io_extents->pp_extents[cur].pp_w_hist); } -for (i =0 ; (count >= (1 <<LL_HIST_START << i)) && +for (i =0 ; (count >= (1 <<LL_HIST_START << i)) && (i < (LL_HIST_MAX -1 )); i++);if (rw ==0 ) { io_extents->pp_extents[cur].pp_r_hist.oh_buckets[i]++;
drivers/staging/lustre/lustre/llite/rw.c +3 -3
@@ -656,7 +656,7 @@ static int ll_read_ahead_pages(const struct lu_env *env, page_idx, mapping);if (rc ==1 ) { (*reserved_pages)--; - count ++; + count++; }else if (rc == -ENOLCK )break ; }else if (stride_ria) {
@@ -890,7 +890,7 @@ static void ras_update_stride_detector(struct ll_readahead_state *ras,if (!stride_io_mode (ras) && (stride_gap !=0 || ras->ras_consecutive_stride_requests ==0 )) { ras->ras_stride_pages = ras->ras_consecutive_pages; - ras->ras_stride_length = stride_gap +ras->ras_consecutive_pages; + ras->ras_stride_length = stride_gap+ras->ras_consecutive_pages; }LASSERT (ras->ras_request_index ==0 );LASSERT (ras->ras_consecutive_stride_requests ==0 );
@@ -902,7 +902,7 @@ static void ras_update_stride_detector(struct ll_readahead_state *ras, } ras->ras_stride_pages = ras->ras_consecutive_pages; - ras->ras_stride_length = stride_gap +ras->ras_consecutive_pages; + ras->ras_stride_length = stride_gap+ras->ras_consecutive_pages;RAS_CDEBUG (ras);return ;
drivers/staging/lustre/lustre/llite/statahead.c +2 -2
@@ -659,7 +659,7 @@ static void ll_post_statahead(struct ll_statahead_info *sai)* revalidate. */ /* unlinked and re-created with the same name */ -if (unlikely (!lu_fid_eq (&minfo->mi_data.op_fid2, &body->fid1))){ +if (unlikely (!lu_fid_eq (&minfo->mi_data.op_fid2, &body->fid1))) { entry->se_inode =NULL ;iput (child); child =NULL ;
@@ -1215,7 +1215,7 @@ do_it:while (1 ) {l_wait_event (thread->t_ctl_waitq, !sa_received_empty (sai) || - sai->sai_sent == sai->sai_replied|| + sai->sai_sent == sai->sai_replied || !thread_is_running (thread), &lwi);
drivers/staging/lustre/lustre/llite/vvp_io.c +1 -1
@@ -698,7 +698,7 @@ static int vvp_io_fault_start(const struct lu_env *env,/* return +1 to stop cl_io_loop() and ll_fault() will catch * and retry. */ - result =+1 ; + result =1 ; goto out; }
drivers/staging/lustre/lustre/lmv/lmv_obd.c +1 -1
@@ -1849,7 +1849,7 @@ static int lmv_early_cancel(struct obd_export *exp, struct md_op_data *op_data,struct obd_device *obd = exp->exp_obd;struct lmv_obd *lmv = &obd->u.lmv;struct lmv_tgt_desc *tgt; -ldlm_policy_data_t policy = {{0 }}; +ldlm_policy_data_t policy = { {0 } };int rc =0 ;if (!fid_is_sane (fid))
drivers/staging/lustre/lustre/lov/lov_obd.c +2 -2
@@ -1672,7 +1672,7 @@ static int fiemap_calc_last_stripe(struct lov_stripe_md *lsm, u64 fm_start,break ; } *stripe_count = j; - last_stripe = (start_stripe + j -1 ) %lsm->lsm_stripe_count; + last_stripe = (start_stripe + j -1 ) % lsm->lsm_stripe_count; }return last_stripe;
@@ -1862,7 +1862,7 @@ static int lov_fiemap(struct lov_obd *lov, __u32 keylen, void *key, fm_local->fm_start = lun_start; fm_local->fm_flags &= ~FIEMAP_FLAG_DEVICE_ORDER ;memcpy (&fm_key->fiemap, fm_local,sizeof (*fm_local)); - *vallen=fiemap_count_to_size (fm_local->fm_extent_count); + *vallen =fiemap_count_to_size (fm_local->fm_extent_count); rc =obd_get_info (NULL , lov->lov_tgts[ost_index]->ltd_exp, keylen, key, vallen, fm_local, lsm);
drivers/staging/lustre/lustre/obdclass/cl_io.c +5 -5
@@ -307,7 +307,7 @@ static void cl_io_locks_sort(struct cl_io *io)*/ default :LBUG (); -case +1 : +case 1 :list_move_tail (&curr->cill_linkage, &prev->cill_linkage); done =0 ;
@@ -335,7 +335,7 @@ int cl_queue_match(const struct list_head *queue,list_for_each_entry (scan, queue, cill_linkage) {if (cl_lock_descr_match (&scan->cill_descr, need)) -return +1 ; +return 1 ; }return 0 ; }
@@ -353,7 +353,7 @@ static int cl_queue_merge(const struct list_head *queue,CDEBUG (D_VFSTRACE ,"lock: %d: [%lu, %lu]\n" , scan->cill_descr.cld_mode, scan->cill_descr.cld_start, scan->cill_descr.cld_end); -return +1 ; +return 1 ; }return 0 ;
@@ -600,7 +600,7 @@ int cl_io_lock_add(const struct lu_env *env, struct cl_io *io,int result;if (cl_lockset_merge (&io->ci_lockset, &link->cill_descr)) - result =+1 ; + result =1 ;else {list_add (&link->cill_linkage, &io->ci_lockset.cls_todo); result =0 ;
@@ -918,7 +918,7 @@ int cl_io_submit_sync(const struct lu_env *env, struct cl_io *io,*/ cl_page_list_for_each (pg, &queue->c2_qin) { pg->cp_sync_io =NULL ; -cl_sync_io_note (anchor,+1 ); +cl_sync_io_note (anchor,1 ); }/* wait for the IO to be finished. */
drivers/staging/lustre/lustre/obdclass/cl_lock.c +3 -3
@@ -2027,7 +2027,7 @@ static struct cl_lock *cl_lock_hold_mutex(const struct lu_env *env,cl_lock_mutex_get (env, lock);if (lock->cll_state <CLS_FREEING && !(lock->cll_flags &CLF_CANCELLED )) { -cl_lock_hold_mod (env, lock,+1 ); +cl_lock_hold_mod (env, lock,1 );lu_ref_add (&lock->cll_holders, scope, source);lu_ref_add (&lock->cll_reference, scope, source);break ;
@@ -2115,7 +2115,7 @@ void cl_lock_hold_add(const struct lu_env *env, struct cl_lock *lock,LINVRNT (cl_lock_invariant (env, lock));LASSERT (lock->cll_state !=CLS_FREEING ); -cl_lock_hold_mod (env, lock,+1 ); +cl_lock_hold_mod (env, lock,1 );cl_lock_get (lock);lu_ref_add (&lock->cll_holders, scope, source);lu_ref_add (&lock->cll_reference, scope, source);
@@ -2157,7 +2157,7 @@ void cl_lock_user_add(const struct lu_env *env, struct cl_lock *lock)LINVRNT (cl_lock_is_mutexed (lock));LINVRNT (cl_lock_invariant (env, lock)); -cl_lock_used_mod (env, lock,+1 ); +cl_lock_used_mod (env, lock,1 ); }EXPORT_SYMBOL (cl_lock_user_add);
drivers/staging/lustre/lustre/obdclass/cl_object.c +1 -1
@@ -662,7 +662,7 @@ static int cl_env_store_init(void)CFS_HASH_MAX_THETA , &cl_env_hops, CFS_HASH_RW_BKTLOCK); -return cl_env_hash !=NULL ?0 :-ENOMEM ; +return cl_env_hash !=NULL ?0 : -ENOMEM ; }static void cl_env_store_fini (void )
drivers/staging/lustre/lustre/obdclass/class_obd.c +2 -2
@@ -138,7 +138,7 @@ int obd_alloc_fail(const void *ptr, const char *name, const char *type,if (ptr ==NULL || (cfs_rand () &OBD_ALLOC_FAIL_MASK ) < obd_alloc_fail_rate) {CERROR ("%s%salloc of %s (%llu bytes) failed at %s:%d\n" , - ptr ?"force " :"" , type, name, (__u64 )size, file, + ptr ?"force " :"" , type, name, (__u64 )size, file, line); CERROR("%llu total bytes and %llu total pages" " (%llu bytes) allocated by Lustre\n",
@@ -470,7 +470,7 @@ int obd_init_checks(void)return -EOVERFLOW ; }if (do_div (div64val,256 ) != (u64val &255 )) { -CERROR ("do_div(%#llx,256) != %llu\n" , u64val, u64val &255 ); +CERROR ("do_div(%#llx,256) != %llu\n" , u64val, u64val &255 );return -EOVERFLOW ; }if (u64val >>8 != div64val) {
drivers/staging/lustre/lustre/obdclass/genops.c +3 -3
@@ -545,7 +545,7 @@ struct obd_device *class_find_client_obd(struct obd_uuid *tgt_uuid, strlen(typ_name)) == 0)) {if (obd_uuid_equals (tgt_uuid, &obd->u.cli.cl_target_uuid) && - ((grp_uuid)?obd_uuid_equals (grp_uuid, + ((grp_uuid) ?obd_uuid_equals (grp_uuid, &obd->obd_uuid) :1 )) {read_unlock (&obd_dev_lock);return obd;
@@ -1078,7 +1078,7 @@ void __class_export_add_lock_ref(struct obd_export *exp, struct ldlm_lock *lock)LCONSOLE_WARN ("setting export %p for lock %p which already has export %p\n" , exp, lock, lock->l_exp_refs_target); } -if ((lock->l_exp_refs_nr ++) ==0 ) { +if ((lock->l_exp_refs_nr++) ==0 ) {list_add (&lock->l_exp_refs_link, &exp->exp_locks_list); lock->l_exp_refs_target = exp; }
@@ -1488,7 +1488,7 @@ int obd_export_evict_by_uuid(struct obd_device *obd, const char *uuid)EXPORT_SYMBOL (obd_export_evict_by_uuid);#if LUSTRE_TRACKS_LOCK_EXP_REFS -void (*class_export_dump_hook)(struct obd_export *) =NULL ; +void (*class_export_dump_hook)(struct obd_export *) =NULL ;EXPORT_SYMBOL (class_export_dump_hook);#endif
drivers/staging/lustre/lustre/obdclass/llog.c +2 -2
@@ -326,7 +326,7 @@ repeat:* swabbing is done at the beginning of the loop. */ for (rec = (struct llog_rec_hdr *)buf; (char *)rec < buf +LLOG_CHUNK_SIZE ; - rec = (struct llog_rec_hdr *)((char *)rec + rec->lrh_len)){ + rec = (struct llog_rec_hdr *)((char *)rec + rec->lrh_len)) {CDEBUG (D_OTHER ,"processing rec 0x%p type %#x\n" , rec, rec->lrh_type);
@@ -522,7 +522,7 @@ int llog_reverse_process(const struct lu_env *env, rec = (void *)rec + rec->lrh_len;if (LLOG_REC_HDR_NEEDS_SWABBING (rec))lustre_swab_llog_rec (rec); - idx ++; + idx++; }LASSERT (idx == index); tail = (void *)rec + rec->lrh_len -sizeof (*tail);
drivers/staging/lustre/lustre/obdclass/obd_config.c +1 -1
@@ -1451,7 +1451,7 @@ int class_config_llog_handler(const struct lu_env *env,lustre_cfg_bufs_init (&bufs, lcfg);if (clli && clli->cfg_instance && -LUSTRE_CFG_BUFLEN (lcfg,0 ) >0 ){ +LUSTRE_CFG_BUFLEN (lcfg,0 ) >0 ) { inst =1 ; inst_len =LUSTRE_CFG_BUFLEN (lcfg,0 ) +sizeof (clli->cfg_instance) *2 +4 ;
drivers/staging/lustre/lustre/osc/osc_request.c +3 -3
@@ -1586,7 +1586,7 @@ static int osc_brw_fini_request(struct ptlrpc_request *req, int rc)char *router;cksum_type_t cksum_type; - cksum_type =cksum_type_unpack (body->oa.o_valid &OBD_MD_FLFLAGS ? + cksum_type =cksum_type_unpack (body->oa.o_valid&OBD_MD_FLFLAGS ? body->oa.o_flags :0 ); client_cksum = osc_checksum_bulk(rc, aa->aa_page_count, aa->aa_ppga, OST_READ,
@@ -1654,7 +1654,7 @@ static int osc_brw_redo_request(struct ptlrpc_request *request, "redo for recoverable error %d", rc); rc = osc_brw_prep_request(lustre_msg_get_opc(request->rq_reqmsg) == - OST_WRITE ? OBD_BRW_WRITE :OBD_BRW_READ, + OST_WRITE ? OBD_BRW_WRITE : OBD_BRW_READ, aa->aa_cli, aa->aa_oa, NULL /* lsm unused by osc currently */, aa->aa_page_count, aa->aa_ppga,
@@ -3101,7 +3101,7 @@ static int osc_import_event(struct obd_device *obd,/* See bug 7198 */ if (ocd->ocd_connect_flags &OBD_CONNECT_REQPORTAL ) - imp->imp_client->cli_request_portal =OST_REQUEST_PORTAL ; + imp->imp_client->cli_request_portal =OST_REQUEST_PORTAL ; rc =obd_notify_observer (obd, obd,OBD_NOTIFY_OCD ,NULL );break ;
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +1 -1
@@ -54,7 +54,7 @@ static struct ll_rpc_opcode { { OST_SETATTR, "ost_setattr" }, { OST_READ, "ost_read" }, { OST_WRITE, "ost_write" }, - { OST_CREATE , "ost_create" }, + { OST_CREATE, "ost_create" }, { OST_DESTROY, "ost_destroy" }, { OST_GET_INFO, "ost_get_info" }, { OST_CONNECT, "ost_connect" },
Signature · 1 line
2.1.0
Re: [PATCH 1/5] staging: lustre: fix whitespace errors reported by checkpatch.pl
Quoted 9 lines · Mike Rapoport
Quoted 7 lines · Greg Kroah-Hartman
Quoted 4 lines · Mike Rapoport
Added/removed spaces and replaced '+1' with '1' in several places to eliminate SPACING and
POINTER_LOCATIONerrors reported by checkpatch.plSigned-off-by Mike Rapoport <[email protected]>Does not apply to my tree :(
Quoted 8 lines
Rebased against current staging-testing.
Quoted 1 line
From
4f4cdc89b94aec9a72cec4cec171d049f6f65a2aMon Sep 17 00:00:00 2001From: Mike Rapoport <[email protected]>
Date: Sat, 22 Aug 2015 17:17:19 +0300
Subject: [PATCH] staging: lustre: fix whitespace errors reported by
checkpatch.pl
Please resend it in a form that doesn't require me to hand-edit it :(
PATCH 1/1 staging: lustre: fix whitespace errors reported by checkpatch.pl
Added/removed spaces and replaced '+1' with '1' in several places to eliminate SPACING and POINTER_LOCATION errors reported by checkpatch.pl
---
Rebased against current staging-testing.
Greg, sorry for the previous one, forgot to format it as required...
.../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 4 +- drivers/staging/lustre/lnet/selftest/conrpc.h | 4 +- drivers/staging/lustre/lnet/selftest/console.c | 16 +-- drivers/staging/lustre/lnet/selftest/selftest.h | 2 +- drivers/staging/lustre/lustre/include/cl_object.h | 14 +- drivers/staging/lustre/lustre/include/lu_object.h | 16 +-- .../lustre/lustre/include/lustre/lustre_idl.h | 12 +- .../lustre/lustre/include/lustre/lustre_user.h | 4 +- .../staging/lustre/lustre/include/lustre_capa.h | 2 +- .../staging/lustre/lustre/include/lustre_disk.h | 2 +- drivers/staging/lustre/lustre/include/lustre_dlm.h | 6 +- .../lustre/lustre/include/lustre_dlm_flags.h | 152 ++++++++++----------- drivers/staging/lustre/lustre/include/lustre_lib.h | 6 +- drivers/staging/lustre/lustre/include/lustre_net.h | 2 +- drivers/staging/lustre/lustre/include/obd.h | 2 +- .../staging/lustre/lustre/include/obd_support.h | 2 +- drivers/staging/lustre/lustre/libcfs/tracefile.c | 4 +- .../staging/lustre/lustre/llite/llite_internal.h | 2 +- drivers/staging/lustre/lustre/llite/lproc_llite.c | 2 +- drivers/staging/lustre/lustre/llite/rw.c | 6 +- drivers/staging/lustre/lustre/llite/statahead.c | 4 +- drivers/staging/lustre/lustre/llite/vvp_io.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 4 +- drivers/staging/lustre/lustre/obdclass/cl_io.c | 10 +- drivers/staging/lustre/lustre/obdclass/cl_lock.c | 6 +- drivers/staging/lustre/lustre/obdclass/cl_object.c | 2 +- drivers/staging/lustre/lustre/obdclass/class_obd.c | 4 +- drivers/staging/lustre/lustre/obdclass/genops.c | 6 +- drivers/staging/lustre/lustre/obdclass/llog.c | 4 +- .../staging/lustre/lustre/obdclass/obd_config.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 6 +- .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- 33 files changed, 157 insertions(+), 157 deletions(-)
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c +2 -2
@@ -714,7 +714,7 @@ ksocknal_queue_tx_locked (ksock_tx_t *tx, ksock_conn_t *conn)LASSERT (tx->tx_resid == tx->tx_nob);CDEBUG (D_NET ,"Packet %p type %d, nob %d niov %d nkiov %d\n" , - tx, (tx->tx_lnetmsg !=NULL ) ? tx->tx_lnetmsg->msg_hdr.type: + tx, (tx->tx_lnetmsg !=NULL ) ? tx->tx_lnetmsg->msg_hdr.type :KSOCK_MSG_NOOP , tx->tx_nob, tx->tx_niov, tx->tx_nkiov);
@@ -1092,7 +1092,7 @@ ksocknal_new_packet (ksock_conn_t *conn, int nob_to_skip) conn->ksnc_rx_iov[niov].iov_len = nob; niov++; skipped += nob; - nob_to_skip -=nob; + nob_to_skip -= nob; }while (nob_to_skip !=0 &&/* mustn't overflow conn's rx iov */ niov <sizeof (conn->ksnc_rx_iov_space) /sizeof (struct iovec ));
drivers/staging/lustre/lnet/selftest/conrpc.h +2 -2
@@ -105,8 +105,8 @@ typedef struct lstcon_rpc_trans {#define LST_TRANS_STATQRY 0x21 -typedef int (*lstcon_rpc_cond_func_t )(int ,struct lstcon_node *,void *); -typedef int (*lstcon_rpc_readent_func_t )(int ,srpc_msg_t *,lstcon_rpc_ent_t *); +typedef int (*lstcon_rpc_cond_func_t )(int ,struct lstcon_node *,void *); +typedef int (*lstcon_rpc_readent_func_t )(int ,srpc_msg_t *,lstcon_rpc_ent_t *);int lstcon_sesrpc_prep (struct lstcon_node *nd,int transop,unsigned version,lstcon_rpc_t **crpc);
drivers/staging/lustre/lnet/selftest/console.c +8 -8
@@ -308,7 +308,7 @@ lstcon_group_ndlink_release(lstcon_group_t *grp, lstcon_ndlink_t *ndl) {list_del_init (&ndl->ndl_link);lstcon_ndlink_release (ndl); - grp->grp_nnode --; + grp->grp_nnode--; } static void
@@ -320,7 +320,7 @@ lstcon_group_ndlink_move(lstcon_group_t *old,list_del (&ndl->ndl_hlink);list_del (&ndl->ndl_link); - old->grp_nnode --; + old->grp_nnode--;list_add_tail (&ndl->ndl_hlink, &new->grp_ndl_hash[idx]);list_add_tail (&ndl->ndl_link, &new->grp_ndl_list);
@@ -527,7 +527,7 @@ lstcon_group_add(char *name)lstcon_group_t *grp;int rc; - rc = (lstcon_group_find (name, &grp) ==0 )? -EEXIST :0 ; + rc = (lstcon_group_find (name, &grp) ==0 ) ? -EEXIST :0 ;if (rc !=0 ) {/* find a group with same name */ lstcon_group_put (grp);
@@ -816,7 +816,7 @@ lstcon_group_info(char *name, lstcon_ndlist_ent_t *gents_p,LST_NODE_STATE_COUNTER (ndl->ndl_node, gentp); rc =copy_to_user (gents_p, gentp, -sizeof (lstcon_ndlist_ent_t)) ? -EFAULT :0 ; +sizeof (lstcon_ndlist_ent_t)) ? -EFAULT :0 ;LIBCFS_FREE (gentp,sizeof (lstcon_ndlist_ent_t));
@@ -847,7 +847,7 @@ lstcon_batch_add(char *name)int i;int rc; - rc = (lstcon_batch_find (name, &bat) ==0 )? -EEXIST :0 ; + rc = (lstcon_batch_find (name, &bat) ==0 ) ? -EEXIST :0 ;if (rc !=0 ) {CDEBUG (D_NET ,"Batch %s already exists\n" , name);return rc;
@@ -911,7 +911,7 @@ lstcon_batch_list(int index, int len, char *name_up)list_for_each_entry (bat, &console_session.ses_bat_list, bat_link) {if (index-- ==0 ) {return copy_to_user (name_up, bat->bat_name, len) ? - -EFAULT :0 ; + -EFAULT :0 ; } }
@@ -956,7 +956,7 @@ lstcon_batch_info(char *name, lstcon_test_batch_ent_t *ent_up, int server, &test->tes_dst_grp->grp_ndl_list;if (dents_up !=NULL ) { - rc =lstcon_nodes_getent ((server ? srvlst: clilst), + rc =lstcon_nodes_getent ((server ? srvlst : clilst), index_p, ndent_p, dents_up);return rc; }
@@ -1683,7 +1683,7 @@ int lstcon_session_match(lst_sid_t sid) {return (console_session.ses_id.ses_nid == sid.ses_nid && - console_session.ses_id.ses_stamp == sid.ses_stamp) ?1 :0 ; + console_session.ses_id.ses_stamp == sid.ses_stamp) ?1 :0 ; } static void
drivers/staging/lustre/lnet/selftest/selftest.h +1 -1
@@ -562,7 +562,7 @@ static inline const char * swi_state2str (int state) {#define STATE2STR (x) case x: return #x -switch (state) { +switch (state) {default :LBUG ();STATE2STR (SWI_STATE_NEWBORN );
drivers/staging/lustre/lustre/include/cl_object.h +7 -7
@@ -1095,7 +1095,7 @@ do { \ \if (cfs_cdebug_show (mask,DEBUG_SUBSYSTEM )) { \cl_page_print (env, &msgdata, lu_cdebug_printer, page); \ - CDEBUG(mask, format , ## __VA_ARGS__); \ + CDEBUG(mask, format, ## __VA_ARGS__); \ } \ }while (0 )
@@ -1108,7 +1108,7 @@ do { \ \if (cfs_cdebug_show (mask,DEBUG_SUBSYSTEM )) { \cl_page_header_print (env, &msgdata, lu_cdebug_printer, page); \ - CDEBUG(mask, format , ## __VA_ARGS__); \ + CDEBUG(mask, format, ## __VA_ARGS__); \ } \ }while (0 )
@@ -1475,13 +1475,13 @@ enum cl_lock_flags {* lock has been cancelled. This flag is never cleared once set (by * cl_lock_cancel0()). */ -CLF_CANCELLED =1 <<0 , +CLF_CANCELLED =1 <<0 ,/** cancellation is pending for this lock. */ -CLF_CANCELPEND =1 <<1 , +CLF_CANCELPEND =1 <<1 ,/** destruction is pending for this lock. */ -CLF_DOOMED =1 <<2 , +CLF_DOOMED =1 <<2 ,/** from enqueue RPC reply upcall. */ - CLF_FROM_UPCALL= 1 << 3, + CLF_FROM_UPCALL = 1 << 3, };/**
@@ -1833,7 +1833,7 @@ do { \ \if (cfs_cdebug_show (mask,DEBUG_SUBSYSTEM )) { \cl_lock_print (env, &msgdata, lu_cdebug_printer, lock); \ - CDEBUG(mask, format , ## __VA_ARGS__); \ + CDEBUG(mask, format, ## __VA_ARGS__); \ } \ }while (0 )
drivers/staging/lustre/lustre/include/lu_object.h +8 -8
@@ -790,7 +790,7 @@ do { \ \if (cfs_cdebug_show (mask,DEBUG_SUBSYSTEM )) { \lu_object_print (env, &msgdata, lu_cdebug_printer, object);\ - CDEBUG(mask, format , ## __VA_ARGS__); \ + CDEBUG(mask, format, ## __VA_ARGS__); \ } \ }while (0 )
@@ -805,7 +805,7 @@ do { \lu_object_header_print (env, &msgdata, lu_cdebug_printer,\ (object)->lo_header); \lu_cdebug_printer (env, &msgdata,"\n" ); \ - CDEBUG(mask, format , ## __VA_ARGS__); \ + CDEBUG(mask, format, ## __VA_ARGS__); \ } \ }while (0 )
@@ -1131,7 +1131,7 @@ struct lu_context_key { \return value; \ } \ - struct __##mod##__dummy_init {;} /* semicolon catcher */ + struct __##mod##__dummy_init {; } /* semicolon catcher */#define LU_KEY_FINI (mod, type) \ static void mod##_key_fini(const struct lu_context *ctx, \
@@ -1141,7 +1141,7 @@ struct lu_context_key { \OBD_FREE_PTR (info); \ } \ - struct __##mod##__dummy_fini {;} /* semicolon catcher */ + struct __##mod##__dummy_fini {; } /* semicolon catcher */#define LU_KEY_INIT_FINI (mod, type) \ LU_KEY_INIT(mod, type); \
@@ -1193,28 +1193,28 @@ void lu_context_key_revive (struct lu_context_key *key); mod##_key_init_generic(__VA_ARGS__, NULL); \return lu_context_key_register_many (__VA_ARGS__,NULL ); \ } \ - struct __##mod##_dummy_type_init {;} + struct __##mod##_dummy_type_init {; }#define LU_TYPE_FINI (mod, ...) \ static void mod##_type_fini(struct lu_device_type *t) \ { \ lu_context_key_degister_many(__VA_ARGS__, NULL); \ } \ - struct __##mod##_dummy_type_fini {;} + struct __##mod##_dummy_type_fini {; }#define LU_TYPE_START (mod, ...) \ static void mod##_type_start(struct lu_device_type *t) \ { \ lu_context_key_revive_many(__VA_ARGS__, NULL); \ } \ - struct __##mod##_dummy_type_start {;} + struct __##mod##_dummy_type_start {; }#define LU_TYPE_STOP (mod, ...) \ static void mod##_type_stop(struct lu_device_type *t) \ { \ lu_context_key_quiesce_many(__VA_ARGS__, NULL); \ } \ - struct __##mod##_dummy_type_stop {;} + struct __##mod##_dummy_type_stop {; }
drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +6 -6
@@ -827,7 +827,7 @@ static inline int lu_fid_eq(const struct lu_fid *f0, const struct lu_fid *f1)typeof (val0) __val0 = (val0); \typeof (val1) __val1 = (val1); \ \ - (__val0 == __val1 ?0 : __val0 > __val1 ?+1 :-1 ); \ + (__val0 == __val1 ?0 : __val0 > __val1 ?1 :-1 ); \ }) static inline int lu_fid_cmp(const struct lu_fid *f0,
@@ -1404,9 +1404,9 @@ void lustre_swab_connect(struct obd_connect_data *ocd);* algorithm and also the OBD_FL_CKSUM* flags. */ typedef enum { -OBD_CKSUM_CRC32 =0x00000001 , -OBD_CKSUM_ADLER =0x00000002 , -OBD_CKSUM_CRC32C =0x00000004 , +OBD_CKSUM_CRC32 =0x00000001 , +OBD_CKSUM_ADLER =0x00000002 , +OBD_CKSUM_CRC32C =0x00000004 , }cksum_type_t ;/*
@@ -1444,7 +1444,7 @@ enum obdo_flags {OBD_FL_DELORPHAN =0x00000004 ,/* if set in o_flags delete orphans */ OBD_FL_NORPC =0x00000008 ,/* set in o_flags do in OSC not OST */ OBD_FL_IDONLY =0x00000010 ,/* set in o_flags only adjust obj id*/ -OBD_FL_RECREATE_OBJS =0x00000020 ,/* recreate missing obj */ +OBD_FL_RECREATE_OBJS =0x00000020 ,/* recreate missing obj */ OBD_FL_DEBUG_CHECK =0x00000040 ,/* echo client/server debug check */ OBD_FL_NO_USRQUOTA =0x00000100 ,/* the object's owner is over quota */ OBD_FL_NO_GRPQUOTA = 0x00000200, /* the object's group is over quota */
@@ -3574,7 +3574,7 @@ struct link_ea_entry {unsigned char lee_reclen[2 ];unsigned char lee_parent_fid[sizeof (struct lu_fid )];char lee_name[0 ]; -}__attribute__((packed)); +} __attribute__((packed));/** fid2path request/reply structure */ struct getinfo_fid2path {
drivers/staging/lustre/lustre/include/lustre/lustre_user.h +2 -2
@@ -799,14 +799,14 @@ struct changelog_ext_rec {static inline int changelog_rec_size (struct changelog_rec *rec) { -return CHANGELOG_REC_EXTENDED (rec) ?sizeof (struct changelog_ext_rec ): +return CHANGELOG_REC_EXTENDED (rec) ?sizeof (struct changelog_ext_rec ) :sizeof (*rec); }static inline char *changelog_rec_name (struct changelog_rec *rec) {return CHANGELOG_REC_EXTENDED (rec) ? - ((struct changelog_ext_rec *)rec)->cr_name: rec->cr_name; + ((struct changelog_ext_rec *)rec)->cr_name : rec->cr_name; }static inline int changelog_rec_snamelen (struct changelog_ext_rec *rec)
drivers/staging/lustre/lustre/include/lustre_capa.h +1 -1
@@ -171,7 +171,7 @@ CDEBUG(level, fmt " capability key@%p seq %llu keyid %u\n", \ ##args, k, capa_key_seq(k), capa_key_keyid(k)); \ } while (0) -typedef int (*renew_capa_cb_t )(struct obd_capa *,struct lustre_capa *); +typedef int (*renew_capa_cb_t )(struct obd_capa *,struct lustre_capa *);/* obdclass/capa.c */ extern struct list_head capa_list[];
drivers/staging/lustre/lustre/include/lustre_disk.h +1 -1
@@ -365,7 +365,7 @@ static inline void check_lcd(char *obd_name, int index, struct lsd_client_data *lcd) {int length =sizeof (lcd->lcd_uuid); -if (strnlen ((char *)lcd->lcd_uuid, length) == length) { +if (strnlen ((char *)lcd->lcd_uuid, length) == length) { lcd->lcd_uuid[length -1 ] ='\0' ; LCONSOLE_ERROR("the client UUID (%s) on %s for exports stored in last_rcvd(index = %d) is bad!\n",
drivers/staging/lustre/lustre/include/lustre_dlm.h +3 -3
@@ -1025,7 +1025,7 @@ char *ldlm_it2str(int it);* with a debugging message that is ldlm-related */ #define LDLM_DEBUG_NOLOCK(format, a...) \ - CDEBUG(D_DLMTRACE, "### " format "\n" , ##a) + CDEBUG(D_DLMTRACE, "### " format "\n", ##a)/** * Support function for lock information printing into debug logs.
@@ -1051,7 +1051,7 @@ void _ldlm_lock_debug(struct ldlm_lock *lock, #define LDLM_DEBUG_LIMIT(mask, lock, fmt, a...) do { \ static struct cfs_debug_limit_state _ldlm_cdls; \ LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, mask, &_ldlm_cdls); \ - ldlm_lock_debug(&msgdata, mask, &_ldlm_cdls, lock, "### " fmt , ##a);\ + ldlm_lock_debug(&msgdata, mask, &_ldlm_cdls, lock, "### " fmt, ##a);\ } while (0) #define LDLM_ERROR(lock, fmt, a...) LDLM_DEBUG_LIMIT(D_ERROR, lock, fmt, ## a)
@@ -1062,7 +1062,7 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,if (likely (lock !=NULL )) { \LIBCFS_DEBUG_MSG_DATA_DECL (msgdata,D_DLMTRACE ,NULL ); \ ldlm_lock_debug(&msgdata, D_DLMTRACE, NULL, lock, \ - "### " fmt , ##a); \ + "### " fmt, ##a); \ } else { \ LDLM_DEBUG_NOLOCK("no dlm lock: " fmt, ##a); \ } \
drivers/staging/lustre/lustre/include/lustre_dlm_flags.h +76 -76
345 lines not on this page · raw message
drivers/staging/lustre/lustre/include/lustre_lib.h +3 -3
@@ -313,7 +313,7 @@ static inline void obd_ioctl_freedata(char *buf, int len)#define OBD_IOC_CLIENT_RECOVER _IOW ('f', 133, OBD_IOC_DATA_TYPE)#define OBD_IOC_PING_TARGET _IOW ('f', 136, OBD_IOC_DATA_TYPE) -#define OBD_IOC_DEC_FS_USE_COUNT _IO ('f', 139 ) +#define OBD_IOC_DEC_FS_USE_COUNT _IO ('f', 139)#define OBD_IOC_NO_TRANSNO _IOW ('f', 140, OBD_IOC_DATA_TYPE)#define OBD_IOC_SET_READONLY _IOW ('f', 141, OBD_IOC_DATA_TYPE)#define OBD_IOC_ABORT_RECOVERY _IOR ('f', 142, OBD_IOC_DATA_TYPE)
@@ -557,9 +557,9 @@ do { \if (__timeout ==0 ) { \schedule (); \ }else { \ -long interval = info->lwi_interval? \ +long interval = info->lwi_interval ? \min_t (long, \ - info->lwi_interval,__timeout):\ + info->lwi_interval, __timeout) : \ __timeout; \long remaining =schedule_timeout (interval);\ __timeout = cfs_time_sub(__timeout, \
drivers/staging/lustre/lustre/include/lustre_net.h +1 -1
@@ -2065,7 +2065,7 @@ struct ptlrpc_service_part {* rqbd list and incoming requests waiting for preprocess, * threads starting & stopping are also protected by this lock. */ - spinlock_t scp_lock __cfs_cacheline_aligned; + spinlock_t scp_lock __cfs_cacheline_aligned;/** total # req buffer descs allocated */ int scp_nrqbds_total;/** # posted request buffers for receiving */
drivers/staging/lustre/lustre/include/obd.h +1 -1
@@ -1300,7 +1300,7 @@ struct md_ops { const struct lu_fid *, struct ptlrpc_request **);int (*m_setattr)(struct obd_export *,struct md_op_data *,void *, -int ,void *,int ,struct ptlrpc_request **, +int ,void *,int ,struct ptlrpc_request **,struct md_open_data **mod);int (*m_sync)(struct obd_export *,const struct lu_fid *,struct obd_capa *,struct ptlrpc_request **);
drivers/staging/lustre/lustre/include/obd_support.h +1 -1
@@ -585,7 +585,7 @@ do { \ (!HAS_FAIL_ALLOC_FLAG || obd_alloc_fail_rate == 0 || \ !obd_alloc_fail(ptr, #ptr, "km", size, \ __FILE__, __LINE__) || \ - OBD_FREE_RTN0(ptr)))){ \ + OBD_FREE_RTN0(ptr)))) { \ OBD_ALLOC_POST(ptr, size, "kmalloced"); \ } \ } while (0)
drivers/staging/lustre/lustre/libcfs/tracefile.c +2 -2
@@ -124,7 +124,7 @@ int cfs_trace_refill_stock(struct cfs_trace_cpu_data *tcd, gfp_t gfp,* from here: this will lead to infinite recursion. */ -for (i =0 ; i + tcd->tcd_cur_stock_pages <TCD_STOCK_PAGES ; ++ i) { +for (i =0 ; i + tcd->tcd_cur_stock_pages <TCD_STOCK_PAGES ; ++i) {struct cfs_trace_page *tage; tage =cfs_tage_alloc (gfp);
@@ -370,7 +370,7 @@ int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata,/* indent message according to the nesting level */ while (depth-- >0 ) { *(debug_buf++) ='.' ; - ++ tage->used; + ++tage->used; }strcpy (debug_buf, file);
drivers/staging/lustre/lustre/llite/llite_internal.h +1 -1
@@ -71,7 +71,7 @@ struct ll_dentry_data {struct rcu_head lld_rcu_head; }; -#define ll_d2d (de) ((struct ll_dentry_data*)((de)->d_fsdata)) +#define ll_d2d (de) ((struct ll_dentry_data *)((de)->d_fsdata))#define LLI_INODE_MAGIC 0x111d0de5#define LLI_INODE_DEAD 0xdeadd00d
drivers/staging/lustre/lustre/llite/lproc_llite.c +1 -1
@@ -1325,7 +1325,7 @@ void ll_rw_stats_tally(struct ll_sb_info *sbi, pid_t pid,lprocfs_oh_clear (&io_extents->pp_extents[cur].pp_w_hist); } -for (i =0 ; (count >= (1 <<LL_HIST_START << i)) && +for (i =0 ; (count >= (1 <<LL_HIST_START << i)) && (i < (LL_HIST_MAX -1 )); i++);if (rw ==0 ) { io_extents->pp_extents[cur].pp_r_hist.oh_buckets[i]++;
drivers/staging/lustre/lustre/llite/rw.c +3 -3
@@ -656,7 +656,7 @@ static int ll_read_ahead_pages(const struct lu_env *env, page_idx, mapping);if (rc ==1 ) { (*reserved_pages)--; - count ++; + count++; }else if (rc == -ENOLCK )break ; }else if (stride_ria) {
@@ -890,7 +890,7 @@ static void ras_update_stride_detector(struct ll_readahead_state *ras,if (!stride_io_mode (ras) && (stride_gap !=0 || ras->ras_consecutive_stride_requests ==0 )) { ras->ras_stride_pages = ras->ras_consecutive_pages; - ras->ras_stride_length = stride_gap +ras->ras_consecutive_pages; + ras->ras_stride_length = stride_gap+ras->ras_consecutive_pages; }LASSERT (ras->ras_request_index ==0 );LASSERT (ras->ras_consecutive_stride_requests ==0 );
@@ -902,7 +902,7 @@ static void ras_update_stride_detector(struct ll_readahead_state *ras, } ras->ras_stride_pages = ras->ras_consecutive_pages; - ras->ras_stride_length = stride_gap +ras->ras_consecutive_pages; + ras->ras_stride_length = stride_gap+ras->ras_consecutive_pages;RAS_CDEBUG (ras);return ;
drivers/staging/lustre/lustre/llite/statahead.c +2 -2
@@ -659,7 +659,7 @@ static void ll_post_statahead(struct ll_statahead_info *sai)* revalidate. */ /* unlinked and re-created with the same name */ -if (unlikely (!lu_fid_eq (&minfo->mi_data.op_fid2, &body->fid1))){ +if (unlikely (!lu_fid_eq (&minfo->mi_data.op_fid2, &body->fid1))) { entry->se_inode =NULL ;iput (child); child =NULL ;
@@ -1215,7 +1215,7 @@ do_it:while (1 ) {l_wait_event (thread->t_ctl_waitq, !sa_received_empty (sai) || - sai->sai_sent == sai->sai_replied|| + sai->sai_sent == sai->sai_replied || !thread_is_running (thread), &lwi);
drivers/staging/lustre/lustre/llite/vvp_io.c +1 -1
@@ -698,7 +698,7 @@ static int vvp_io_fault_start(const struct lu_env *env,/* return +1 to stop cl_io_loop() and ll_fault() will catch * and retry. */ - result =+1 ; + result =1 ; goto out; }
drivers/staging/lustre/lustre/lmv/lmv_obd.c +1 -1
@@ -1849,7 +1849,7 @@ static int lmv_early_cancel(struct obd_export *exp, struct md_op_data *op_data,struct obd_device *obd = exp->exp_obd;struct lmv_obd *lmv = &obd->u.lmv;struct lmv_tgt_desc *tgt; -ldlm_policy_data_t policy = {{0 }}; +ldlm_policy_data_t policy = { {0 } };int rc =0 ;if (!fid_is_sane (fid))
drivers/staging/lustre/lustre/lov/lov_obd.c +2 -2
@@ -1672,7 +1672,7 @@ static int fiemap_calc_last_stripe(struct lov_stripe_md *lsm, u64 fm_start,break ; } *stripe_count = j; - last_stripe = (start_stripe + j -1 ) %lsm->lsm_stripe_count; + last_stripe = (start_stripe + j -1 ) % lsm->lsm_stripe_count; }return last_stripe;
@@ -1862,7 +1862,7 @@ static int lov_fiemap(struct lov_obd *lov, __u32 keylen, void *key, fm_local->fm_start = lun_start; fm_local->fm_flags &= ~FIEMAP_FLAG_DEVICE_ORDER ;memcpy (&fm_key->fiemap, fm_local,sizeof (*fm_local)); - *vallen=fiemap_count_to_size (fm_local->fm_extent_count); + *vallen =fiemap_count_to_size (fm_local->fm_extent_count); rc =obd_get_info (NULL , lov->lov_tgts[ost_index]->ltd_exp, keylen, key, vallen, fm_local, lsm);
drivers/staging/lustre/lustre/obdclass/cl_io.c +5 -5
@@ -307,7 +307,7 @@ static void cl_io_locks_sort(struct cl_io *io)*/ default :LBUG (); -case +1 : +case 1 :list_move_tail (&curr->cill_linkage, &prev->cill_linkage); done =0 ;
@@ -335,7 +335,7 @@ int cl_queue_match(const struct list_head *queue,list_for_each_entry (scan, queue, cill_linkage) {if (cl_lock_descr_match (&scan->cill_descr, need)) -return +1 ; +return 1 ; }return 0 ; }
@@ -353,7 +353,7 @@ static int cl_queue_merge(const struct list_head *queue,CDEBUG (D_VFSTRACE ,"lock: %d: [%lu, %lu]\n" , scan->cill_descr.cld_mode, scan->cill_descr.cld_start, scan->cill_descr.cld_end); -return +1 ; +return 1 ; }return 0 ;
@@ -600,7 +600,7 @@ int cl_io_lock_add(const struct lu_env *env, struct cl_io *io,int result;if (cl_lockset_merge (&io->ci_lockset, &link->cill_descr)) - result =+1 ; + result =1 ;else {list_add (&link->cill_linkage, &io->ci_lockset.cls_todo); result =0 ;
@@ -918,7 +918,7 @@ int cl_io_submit_sync(const struct lu_env *env, struct cl_io *io,*/ cl_page_list_for_each (pg, &queue->c2_qin) { pg->cp_sync_io =NULL ; -cl_sync_io_note (anchor,+1 ); +cl_sync_io_note (anchor,1 ); }/* wait for the IO to be finished. */
drivers/staging/lustre/lustre/obdclass/cl_lock.c +3 -3
@@ -2027,7 +2027,7 @@ static struct cl_lock *cl_lock_hold_mutex(const struct lu_env *env,cl_lock_mutex_get (env, lock);if (lock->cll_state <CLS_FREEING && !(lock->cll_flags &CLF_CANCELLED )) { -cl_lock_hold_mod (env, lock,+1 ); +cl_lock_hold_mod (env, lock,1 );lu_ref_add (&lock->cll_holders, scope, source);lu_ref_add (&lock->cll_reference, scope, source);break ;
@@ -2115,7 +2115,7 @@ void cl_lock_hold_add(const struct lu_env *env, struct cl_lock *lock,LINVRNT (cl_lock_invariant (env, lock));LASSERT (lock->cll_state !=CLS_FREEING ); -cl_lock_hold_mod (env, lock,+1 ); +cl_lock_hold_mod (env, lock,1 );cl_lock_get (lock);lu_ref_add (&lock->cll_holders, scope, source);lu_ref_add (&lock->cll_reference, scope, source);
@@ -2157,7 +2157,7 @@ void cl_lock_user_add(const struct lu_env *env, struct cl_lock *lock)LINVRNT (cl_lock_is_mutexed (lock));LINVRNT (cl_lock_invariant (env, lock)); -cl_lock_used_mod (env, lock,+1 ); +cl_lock_used_mod (env, lock,1 ); }EXPORT_SYMBOL (cl_lock_user_add);
drivers/staging/lustre/lustre/obdclass/cl_object.c +1 -1
@@ -662,7 +662,7 @@ static int cl_env_store_init(void)CFS_HASH_MAX_THETA , &cl_env_hops, CFS_HASH_RW_BKTLOCK); -return cl_env_hash !=NULL ?0 :-ENOMEM ; +return cl_env_hash !=NULL ?0 : -ENOMEM ; }static void cl_env_store_fini (void )
drivers/staging/lustre/lustre/obdclass/class_obd.c +2 -2
@@ -138,7 +138,7 @@ int obd_alloc_fail(const void *ptr, const char *name, const char *type,if (ptr ==NULL || (cfs_rand () &OBD_ALLOC_FAIL_MASK ) < obd_alloc_fail_rate) {CERROR ("%s%salloc of %s (%llu bytes) failed at %s:%d\n" , - ptr ?"force " :"" , type, name, (__u64 )size, file, + ptr ?"force " :"" , type, name, (__u64 )size, file, line); CERROR("%llu total bytes and %llu total pages" " (%llu bytes) allocated by Lustre\n",
@@ -470,7 +470,7 @@ int obd_init_checks(void)return -EOVERFLOW ; }if (do_div (div64val,256 ) != (u64val &255 )) { -CERROR ("do_div(%#llx,256) != %llu\n" , u64val, u64val &255 ); +CERROR ("do_div(%#llx,256) != %llu\n" , u64val, u64val &255 );return -EOVERFLOW ; }if (u64val >>8 != div64val) {
drivers/staging/lustre/lustre/obdclass/genops.c +3 -3
@@ -545,7 +545,7 @@ struct obd_device *class_find_client_obd(struct obd_uuid *tgt_uuid, strlen(typ_name)) == 0)) {if (obd_uuid_equals (tgt_uuid, &obd->u.cli.cl_target_uuid) && - ((grp_uuid)?obd_uuid_equals (grp_uuid, + ((grp_uuid) ?obd_uuid_equals (grp_uuid, &obd->obd_uuid) :1 )) {read_unlock (&obd_dev_lock);return obd;
@@ -1078,7 +1078,7 @@ void __class_export_add_lock_ref(struct obd_export *exp, struct ldlm_lock *lock)LCONSOLE_WARN ("setting export %p for lock %p which already has export %p\n" , exp, lock, lock->l_exp_refs_target); } -if ((lock->l_exp_refs_nr ++) ==0 ) { +if ((lock->l_exp_refs_nr++) ==0 ) {list_add (&lock->l_exp_refs_link, &exp->exp_locks_list); lock->l_exp_refs_target = exp; }
@@ -1488,7 +1488,7 @@ int obd_export_evict_by_uuid(struct obd_device *obd, const char *uuid)EXPORT_SYMBOL (obd_export_evict_by_uuid);#if LUSTRE_TRACKS_LOCK_EXP_REFS -void (*class_export_dump_hook)(struct obd_export *) =NULL ; +void (*class_export_dump_hook)(struct obd_export *) =NULL ;EXPORT_SYMBOL (class_export_dump_hook);#endif
drivers/staging/lustre/lustre/obdclass/llog.c +2 -2
@@ -326,7 +326,7 @@ repeat:* swabbing is done at the beginning of the loop. */ for (rec = (struct llog_rec_hdr *)buf; (char *)rec < buf +LLOG_CHUNK_SIZE ; - rec = (struct llog_rec_hdr *)((char *)rec + rec->lrh_len)){ + rec = (struct llog_rec_hdr *)((char *)rec + rec->lrh_len)) {CDEBUG (D_OTHER ,"processing rec 0x%p type %#x\n" , rec, rec->lrh_type);
@@ -522,7 +522,7 @@ int llog_reverse_process(const struct lu_env *env, rec = (void *)rec + rec->lrh_len;if (LLOG_REC_HDR_NEEDS_SWABBING (rec))lustre_swab_llog_rec (rec); - idx ++; + idx++; }LASSERT (idx == index); tail = (void *)rec + rec->lrh_len -sizeof (*tail);
drivers/staging/lustre/lustre/obdclass/obd_config.c +1 -1
@@ -1451,7 +1451,7 @@ int class_config_llog_handler(const struct lu_env *env,lustre_cfg_bufs_init (&bufs, lcfg);if (clli && clli->cfg_instance && -LUSTRE_CFG_BUFLEN (lcfg,0 ) >0 ){ +LUSTRE_CFG_BUFLEN (lcfg,0 ) >0 ) { inst =1 ; inst_len =LUSTRE_CFG_BUFLEN (lcfg,0 ) +sizeof (clli->cfg_instance) *2 +4 ;
drivers/staging/lustre/lustre/osc/osc_request.c +3 -3
@@ -1586,7 +1586,7 @@ static int osc_brw_fini_request(struct ptlrpc_request *req, int rc)char *router;cksum_type_t cksum_type; - cksum_type =cksum_type_unpack (body->oa.o_valid &OBD_MD_FLFLAGS ? + cksum_type =cksum_type_unpack (body->oa.o_valid&OBD_MD_FLFLAGS ? body->oa.o_flags :0 ); client_cksum = osc_checksum_bulk(rc, aa->aa_page_count, aa->aa_ppga, OST_READ,
@@ -1654,7 +1654,7 @@ static int osc_brw_redo_request(struct ptlrpc_request *request, "redo for recoverable error %d", rc); rc = osc_brw_prep_request(lustre_msg_get_opc(request->rq_reqmsg) == - OST_WRITE ? OBD_BRW_WRITE :OBD_BRW_READ, + OST_WRITE ? OBD_BRW_WRITE : OBD_BRW_READ, aa->aa_cli, aa->aa_oa, NULL /* lsm unused by osc currently */, aa->aa_page_count, aa->aa_ppga,
@@ -3101,7 +3101,7 @@ static int osc_import_event(struct obd_device *obd,/* See bug 7198 */ if (ocd->ocd_connect_flags &OBD_CONNECT_REQPORTAL ) - imp->imp_client->cli_request_portal =OST_REQUEST_PORTAL ; + imp->imp_client->cli_request_portal =OST_REQUEST_PORTAL ; rc =obd_notify_observer (obd, obd,OBD_NOTIFY_OCD ,NULL );break ;
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +1 -1
@@ -54,7 +54,7 @@ static struct ll_rpc_opcode { { OST_SETATTR, "ost_setattr" }, { OST_READ, "ost_read" }, { OST_WRITE, "ost_write" }, - { OST_CREATE , "ost_create" }, + { OST_CREATE, "ost_create" }, { OST_DESTROY, "ost_destroy" }, { OST_GET_INFO, "ost_get_info" }, { OST_CONNECT, "ost_connect" },
Signature · 1 line
2.1.0
PATCH 2/5 staging: lustre: fix CODE_INDENT checkpatch.pl errors
In reply to Mike RapoportFix occurencies of the following checkpatch.pl error:
ERROR: code indent should use tabs where possible
--- drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 2 +- drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c +1 -1
@@ -626,7 +626,7 @@ ksocknal_find_conn_locked(ksock_peer_t *peer, ksock_tx_t *tx, int nonblk) list_for_each (tmp, &peer->ksnp_conns) {ksock_conn_t *c =list_entry (tmp, ksock_conn_t, ksnc_list);int nob =atomic_read (&c->ksnc_tx_nob) + - c->ksnc_sock->sk->sk_wmem_queued; + c->ksnc_sock->sk->sk_wmem_queued;int rc;LASSERT (!c->ksnc_closing);
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c +3 -3
@@ -355,9 +355,9 @@ ksocknal_lib_recv_kiov(ksock_conn_t *conn)LASSERT (i < niov);/* Dang! have to kmap again because I have nowhere to -* stash the mapped address. But by doing it while the -* page is still mapped, the kernel just bumps the map -* count and returns me the address it stashed. */ +* stash the mapped address. But by doing it while the +* page is still mapped, the kernel just bumps the map +* count and returns me the address it stashed. */ base =kmap (kiov[i].kiov_page) + kiov[i].kiov_offset; fragnob = kiov[i].kiov_len;if (fragnob > sum)
Signature · 1 line
2.1.0
PATCH 3/5 staging: lustre: fix GLOBAL_INITIALISERS checkpatch.pl errors
In reply to Mike RapoportFix occurencies of the following checkpatch.pl error:
ERROR: do not initialise globals to 0 or NULL
--- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 4 ++-- drivers/staging/lustre/lustre/libcfs/fail.c | 4 ++-- drivers/staging/lustre/lustre/obdclass/capa.c | 2 +- drivers/staging/lustre/lustre/obdclass/class_obd.c | 8 ++++---- drivers/staging/lustre/lustre/obdclass/lprocfs_counters.c | 2 +- drivers/staging/lustre/lustre/obdclass/lu_object.c | 4 ++-- drivers/staging/lustre/lustre/obdclass/obd_config.c | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-)
drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +2 -2
@@ -47,8 +47,8 @@struct kmem_cache *ldlm_resource_slab, *ldlm_lock_slab; -int ldlm_srv_namespace_nr =0 ; -int ldlm_cli_namespace_nr =0 ; +int ldlm_srv_namespace_nr; +int ldlm_cli_namespace_nr;struct mutex ldlm_srv_namespace_lock;LIST_HEAD (ldlm_srv_namespace_list);
drivers/staging/lustre/lustre/libcfs/fail.c +2 -2
@@ -35,10 +35,10 @@#include "../../include/linux/libcfs/libcfs.h" -unsigned long cfs_fail_loc =0 ; +unsigned long cfs_fail_loc;EXPORT_SYMBOL (cfs_fail_loc); -unsigned int cfs_fail_val =0 ; +unsigned int cfs_fail_val;EXPORT_SYMBOL (cfs_fail_val);DECLARE_WAIT_QUEUE_HEAD (cfs_race_waitq);
drivers/staging/lustre/lustre/obdclass/capa.c +1 -1
@@ -58,7 +58,7 @@#define NR_CAPAHASH 32#define CAPA_HASH_SIZE 3000/* for MDS & OSS */ -struct kmem_cache *capa_cachep =NULL ; +struct kmem_cache *capa_cachep;/* lock for capa hash/capa_list/fo_capa_keys */ DEFINE_SPINLOCK (capa_lock);
drivers/staging/lustre/lustre/obdclass/class_obd.c +4 -4
@@ -53,9 +53,9 @@ EXPORT_SYMBOL(obd_devs);struct list_head obd_types;DEFINE_RWLOCK (obd_dev_lock); -__u64 obd_max_pages =0 ; +__u64 obd_max_pages;EXPORT_SYMBOL (obd_max_pages); -__u64 obd_max_alloc =0 ; +__u64 obd_max_alloc;EXPORT_SYMBOL (obd_max_alloc);__u64 obd_alloc;EXPORT_SYMBOL (obd_alloc);
@@ -64,7 +64,7 @@ EXPORT_SYMBOL(obd_pages);static DEFINE_SPINLOCK (obd_updatemax_lock);/* The following are visible and mutable through /proc/sys/lustre/. */ -unsigned int obd_alloc_fail_rate =0 ; +unsigned int obd_alloc_fail_rate;EXPORT_SYMBOL (obd_alloc_fail_rate);unsigned int obd_debug_peer_on_timeout;EXPORT_SYMBOL (obd_debug_peer_on_timeout);
@@ -81,7 +81,7 @@ EXPORT_SYMBOL(obd_timeout);unsigned int obd_timeout_set;EXPORT_SYMBOL (obd_timeout_set);/* Adaptive timeout defs here instead of ptlrpc module for /proc/sys/ access */ -unsigned int at_min =0 ; +unsigned int at_min;EXPORT_SYMBOL (at_min);unsigned int at_max =600 ;EXPORT_SYMBOL (at_max);
drivers/staging/lustre/lustre/obdclass/lprocfs_counters.c +1 -1
@@ -41,7 +41,7 @@#include "../include/lprocfs_status.h" #include "../include/obd_support.h" -struct lprocfs_stats *obd_memory =NULL ; +struct lprocfs_stats *obd_memory;EXPORT_SYMBOL (obd_memory);void lprocfs_counter_add (struct lprocfs_stats *stats,int idx,long amount)
drivers/staging/lustre/lustre/obdclass/lu_object.c +2 -2
@@ -1689,8 +1689,8 @@ EXPORT_SYMBOL(lu_context_refill);* predefined when the lu_device type are registered, during the module probe * phase. */ -__u32 lu_context_tags_default =0 ; -__u32 lu_session_tags_default =0 ; +__u32 lu_context_tags_default; +__u32 lu_session_tags_default;void lu_context_tags_update (__u32 tags) {
drivers/staging/lustre/lustre/obdclass/obd_config.c +2 -2
@@ -931,8 +931,8 @@ static int class_set_global(char *ptr, int val, struct lustre_cfg *lcfg)/* We can't call ll_process_config or lquota_process_config directly because * it lives in a module that must be loaded after this one. */ -static int (*client_process_config)(struct lustre_cfg *lcfg) =NULL ; -static int (*quota_process_config)(struct lustre_cfg *lcfg) =NULL ; +static int (*client_process_config)(struct lustre_cfg *lcfg); +static int (*quota_process_config)(struct lustre_cfg *lcfg);void lustre_register_client_process_config (int (*cpc)(struct lustre_cfg *lcfg)) {
Signature · 1 line
2.1.0
PATCH 4/5 staging: lustre: fix SWITCH_CASE_INDENT_LEVEL checkpatch.pl errors
In reply to Mike RapoportFix occurencies of the following checkpatch.pl error:
ERROR: switch and case should be at the same indent
--- drivers/staging/lustre/lnet/selftest/selftest.h | 20 ++++++++++---------- .../lustre/lustre/libcfs/linux/linux-tracefile.c | 22 ++++++++++------------ 2 files changed, 20 insertions(+), 22 deletions(-)
drivers/staging/lustre/lnet/selftest/selftest.h +10 -10
@@ -563,16 +563,16 @@ swi_state2str (int state) {#define STATE2STR (x) case x: return #xswitch (state) { -default : -LBUG (); -STATE2STR (SWI_STATE_NEWBORN ); -STATE2STR (SWI_STATE_REPLY_SUBMITTED ); -STATE2STR (SWI_STATE_REPLY_SENT ); -STATE2STR (SWI_STATE_REQUEST_SUBMITTED ); -STATE2STR (SWI_STATE_REQUEST_SENT ); -STATE2STR (SWI_STATE_REPLY_RECEIVED ); -STATE2STR (SWI_STATE_BULK_STARTED ); -STATE2STR (SWI_STATE_DONE ); +default : +LBUG (); +STATE2STR (SWI_STATE_NEWBORN ); +STATE2STR (SWI_STATE_REPLY_SUBMITTED ); +STATE2STR (SWI_STATE_REPLY_SENT ); +STATE2STR (SWI_STATE_REQUEST_SUBMITTED ); +STATE2STR (SWI_STATE_REQUEST_SENT ); +STATE2STR (SWI_STATE_REPLY_RECEIVED ); +STATE2STR (SWI_STATE_BULK_STARTED ); +STATE2STR (SWI_STATE_DONE ); }#undef STATE2STR }
drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c +10 -12
@@ -212,12 +212,11 @@ static char * dbghdr_to_err_string(struct ptldebug_header *hdr) {switch (hdr->ph_subsys) { - -case S_LND : -case S_LNET : -return "LNetError" ; -default : -return "LustreError" ; +case S_LND : +case S_LNET : +return "LNetError" ; +default : +return "LustreError" ; } }
@@ -225,12 +224,11 @@ static char * dbghdr_to_info_string(struct ptldebug_header *hdr) {switch (hdr->ph_subsys) { - -case S_LND : -case S_LNET : -return "LNet" ; -default : -return "Lustre" ; +case S_LND : +case S_LNET : +return "LNet" ; +default : +return "Lustre" ; } }
Signature · 1 line
2.1.0
PATCH 5/5 staging: lustre: fix OPEN_BRACE checkpatch.pl errors
In reply to Mike RapoportFix occurencies of the following checkpatch.pl error:
ERROR: open brace '{' following function declarations go on the next line
--- drivers/staging/lustre/lustre/include/lprocfs_status.h | 3 ++- drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 3 ++- drivers/staging/lustre/lustre/obdclass/cl_object.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-)
drivers/staging/lustre/lustre/include/lprocfs_status.h +2 -1
@@ -206,7 +206,8 @@ struct lprocfs_stats {#define OPC_RANGE (seg) (seg ## _LAST_OPC - seg ## _FIRST_OPC)/* Pack all opcodes down into a single monotonically increasing index */ -static inline int opcode_offset (__u32 opc) { +static inline int opcode_offset (__u32 opc) +{if (opc <OST_LAST_OPC ) {/* OST opcode */ return (opc -OST_FIRST_OPC );
drivers/staging/lustre/lustre/include/lustre/lustre_user.h +2 -1
@@ -658,7 +658,8 @@ enum changelog_rec_type {CL_LAST }; -static inline const char *changelog_type2str (int type) { +static inline const char *changelog_type2str (int type) +{static const char *changelog_str[] = {"MARK" ,"CREAT" ,"MKDIR" ,"HLINK" ,"SLINK" ,"MKNOD" ,"UNLNK" ,"RMDIR" ,"RENME" ,"RNMTO" ,"OPEN" ,"CLOSE" ,"LYOUT" ,"TRUNC" ,
drivers/staging/lustre/lustre/obdclass/cl_object.c +2 -1
@@ -653,7 +653,8 @@ static inline void cl_env_do_detach(struct cl_env *cle) cle->ce_owner =NULL ; } -static int cl_env_store_init (void ) { +static int cl_env_store_init (void ) +{ cl_env_hash = cfs_hash_create("cl_env", HASH_CL_ENV_BITS, HASH_CL_ENV_BITS, HASH_CL_ENV_BKT_BITS, 0,
Signature · 1 line
2.1.0