staging: lustre: fix whitespace errors reported by checkpatch.pl
authorMike Rapoport <mike.rapoport@gmail.com>
Thu, 3 Sep 2015 08:49:13 +0000 (11:49 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:39 +0000 (18:24 -0700)
Added/removed spaces and replaced '+1' with '1' in several places to
eliminate SPACING and POINTER_LOCATION errors reported by checkpatch.pl

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
33 files changed:
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
drivers/staging/lustre/lnet/selftest/conrpc.h
drivers/staging/lustre/lnet/selftest/console.c
drivers/staging/lustre/lnet/selftest/selftest.h
drivers/staging/lustre/lustre/include/cl_object.h
drivers/staging/lustre/lustre/include/lu_object.h
drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
drivers/staging/lustre/lustre/include/lustre/lustre_user.h
drivers/staging/lustre/lustre/include/lustre_capa.h
drivers/staging/lustre/lustre/include/lustre_disk.h
drivers/staging/lustre/lustre/include/lustre_dlm.h
drivers/staging/lustre/lustre/include/lustre_dlm_flags.h
drivers/staging/lustre/lustre/include/lustre_lib.h
drivers/staging/lustre/lustre/include/lustre_net.h
drivers/staging/lustre/lustre/include/obd.h
drivers/staging/lustre/lustre/include/obd_support.h
drivers/staging/lustre/lustre/libcfs/tracefile.c
drivers/staging/lustre/lustre/llite/llite_internal.h
drivers/staging/lustre/lustre/llite/lproc_llite.c
drivers/staging/lustre/lustre/llite/rw.c
drivers/staging/lustre/lustre/llite/statahead.c
drivers/staging/lustre/lustre/llite/vvp_io.c
drivers/staging/lustre/lustre/lmv/lmv_obd.c
drivers/staging/lustre/lustre/lov/lov_obd.c
drivers/staging/lustre/lustre/obdclass/cl_io.c
drivers/staging/lustre/lustre/obdclass/cl_lock.c
drivers/staging/lustre/lustre/obdclass/cl_object.c
drivers/staging/lustre/lustre/obdclass/class_obd.c
drivers/staging/lustre/lustre/obdclass/genops.c
drivers/staging/lustre/lustre/obdclass/llog.c
drivers/staging/lustre/lustre/obdclass/obd_config.c
drivers/staging/lustre/lustre/osc/osc_request.c
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c

index ffdc06cbd18ec233e876115380c7c684b03025f9..d0c79d1bb9f6943dc2d3433bde46822dd0acee6a 100644 (file)
@@ -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));
index 7d33cf9e9d998e551a1a2fa9ec94ac0c38c44f81..ae7ed75573b9bb5f30586ff30ce99e726cd80c1d 100644 (file)
@@ -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);
index f47c8f27f975a878ad55677030f6e3a9d0dea4d1..5c624e19eaa17501f518cf7f2696be2f711edc5c 100644 (file)
@@ -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
index 7939e4e04d90a7af8d09be9d541e65a62a745561..dfe3342750e998063185a3d3f80316a2088b07df 100644 (file)
@@ -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);
index d56c8bea89c4089600952c51ee4aeed3c5430e5a..04dcb51117569e40d51fffa582c4528e8581d9bd 100644 (file)
@@ -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)
 
index e1d72a7a5c2dd5bb22eeced75759db6aaf904272..a16c9ea983731aa16b98393be36bd4a26252d0e4 100644 (file)
@@ -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 {; }
 
 
 
index ac78dbc38b9f3485a3bc32cad305748592c7b21d..e79af19ce853b9b6ba6a4535ac045e70d2c26066 100644 (file)
@@ -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 {
index 144afbed4d6552bf369c0eadba65776df085d301..e9925ef1dbee616158fce951e1777a7337afeb86 100644 (file)
@@ -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)
index fe19534ebd8fbb15dddee4afaa44583511d508de..11bcdb93544379a72cc68c5cbdd7a3cff1a6c6be 100644 (file)
@@ -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[];
index 9b2833131744adb7a641c4e7d9930c63f7283fe2..131985d3081a5ea0922b709c4298693a1afaeaa9 100644 (file)
@@ -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",
index 355254689dee0b7c21a4e4851a0f6b02f4868849..92b24be7c21e04539422eeae19909ff0d99dc4b2 100644 (file)
@@ -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);                \
        }                                                                   \
index d4cc096352712ef3bab6f5b7a13056734b314c45..d27bdae0b3731649516be1e3b1ff5e55182e1494 100644 (file)
 
 /** extent, mode, or resource changed */
 #define LDLM_FL_LOCK_CHANGED            0x0000000000000001ULL // bit   0
-#define ldlm_is_lock_changed(_l)        LDLM_TEST_FLAG(( _l), 1ULL <<  0)
-#define ldlm_set_lock_changed(_l)       LDLM_SET_FLAG((  _l), 1ULL <<  0)
+#define ldlm_is_lock_changed(_l)        LDLM_TEST_FLAG((_l), 1ULL <<  0)
+#define ldlm_set_lock_changed(_l)       LDLM_SET_FLAG((_l), 1ULL <<  0)
 #define ldlm_clear_lock_changed(_l)     LDLM_CLEAR_FLAG((_l), 1ULL <<  0)
 
 /**
  * Server placed lock on granted list, or a recovering client wants the
  * lock added to the granted list, no questions asked. */
 #define LDLM_FL_BLOCK_GRANTED           0x0000000000000002ULL // bit   1
-#define ldlm_is_block_granted(_l)       LDLM_TEST_FLAG(( _l), 1ULL <<  1)
-#define ldlm_set_block_granted(_l)      LDLM_SET_FLAG((  _l), 1ULL <<  1)
+#define ldlm_is_block_granted(_l)       LDLM_TEST_FLAG((_l), 1ULL <<  1)
+#define ldlm_set_block_granted(_l)      LDLM_SET_FLAG((_l), 1ULL <<  1)
 #define ldlm_clear_block_granted(_l)    LDLM_CLEAR_FLAG((_l), 1ULL <<  1)
 
 /**
  * Server placed lock on conv list, or a recovering client wants the lock
  * added to the conv list, no questions asked. */
 #define LDLM_FL_BLOCK_CONV              0x0000000000000004ULL // bit   2
-#define ldlm_is_block_conv(_l)          LDLM_TEST_FLAG(( _l), 1ULL <<  2)
-#define ldlm_set_block_conv(_l)         LDLM_SET_FLAG((  _l), 1ULL <<  2)
+#define ldlm_is_block_conv(_l)          LDLM_TEST_FLAG((_l), 1ULL <<  2)
+#define ldlm_set_block_conv(_l)         LDLM_SET_FLAG((_l), 1ULL <<  2)
 #define ldlm_clear_block_conv(_l)       LDLM_CLEAR_FLAG((_l), 1ULL <<  2)
 
 /**
  * Server placed lock on wait list, or a recovering client wants the lock
  * added to the wait list, no questions asked. */
 #define LDLM_FL_BLOCK_WAIT              0x0000000000000008ULL // bit   3
-#define ldlm_is_block_wait(_l)          LDLM_TEST_FLAG(( _l), 1ULL <<  3)
-#define ldlm_set_block_wait(_l)         LDLM_SET_FLAG((  _l), 1ULL <<  3)
+#define ldlm_is_block_wait(_l)          LDLM_TEST_FLAG((_l), 1ULL <<  3)
+#define ldlm_set_block_wait(_l)         LDLM_SET_FLAG((_l), 1ULL <<  3)
 #define ldlm_clear_block_wait(_l)       LDLM_CLEAR_FLAG((_l), 1ULL <<  3)
 
 /** blocking or cancel packet was queued for sending. */
 #define LDLM_FL_AST_SENT                0x0000000000000020ULL // bit   5
-#define ldlm_is_ast_sent(_l)            LDLM_TEST_FLAG(( _l), 1ULL <<  5)
-#define ldlm_set_ast_sent(_l)           LDLM_SET_FLAG((  _l), 1ULL <<  5)
+#define ldlm_is_ast_sent(_l)            LDLM_TEST_FLAG((_l), 1ULL <<  5)
+#define ldlm_set_ast_sent(_l)           LDLM_SET_FLAG((_l), 1ULL <<  5)
 #define ldlm_clear_ast_sent(_l)         LDLM_CLEAR_FLAG((_l), 1ULL <<  5)
 
 /**
  * Lock is being replayed.  This could probably be implied by the fact that
  * one of BLOCK_{GRANTED,CONV,WAIT} is set, but that is pretty dangerous. */
 #define LDLM_FL_REPLAY                  0x0000000000000100ULL // bit   8
-#define ldlm_is_replay(_l)              LDLM_TEST_FLAG(( _l), 1ULL <<  8)
-#define ldlm_set_replay(_l)             LDLM_SET_FLAG((  _l), 1ULL <<  8)
+#define ldlm_is_replay(_l)              LDLM_TEST_FLAG((_l), 1ULL <<  8)
+#define ldlm_set_replay(_l)             LDLM_SET_FLAG((_l), 1ULL <<  8)
 #define ldlm_clear_replay(_l)           LDLM_CLEAR_FLAG((_l), 1ULL <<  8)
 
 /** Don't grant lock, just do intent. */
 #define LDLM_FL_INTENT_ONLY             0x0000000000000200ULL // bit   9
-#define ldlm_is_intent_only(_l)         LDLM_TEST_FLAG(( _l), 1ULL <<  9)
-#define ldlm_set_intent_only(_l)        LDLM_SET_FLAG((  _l), 1ULL <<  9)
+#define ldlm_is_intent_only(_l)         LDLM_TEST_FLAG((_l), 1ULL <<  9)
+#define ldlm_set_intent_only(_l)        LDLM_SET_FLAG((_l), 1ULL <<  9)
 #define ldlm_clear_intent_only(_l)      LDLM_CLEAR_FLAG((_l), 1ULL <<  9)
 
 /** lock request has intent */
 #define LDLM_FL_HAS_INTENT              0x0000000000001000ULL // bit  12
-#define ldlm_is_has_intent(_l)          LDLM_TEST_FLAG(( _l), 1ULL << 12)
-#define ldlm_set_has_intent(_l)         LDLM_SET_FLAG((  _l), 1ULL << 12)
+#define ldlm_is_has_intent(_l)          LDLM_TEST_FLAG((_l), 1ULL << 12)
+#define ldlm_set_has_intent(_l)         LDLM_SET_FLAG((_l), 1ULL << 12)
 #define ldlm_clear_has_intent(_l)       LDLM_CLEAR_FLAG((_l), 1ULL << 12)
 
 /** flock deadlock detected */
 
 /** discard (no writeback) on cancel */
 #define LDLM_FL_DISCARD_DATA            0x0000000000010000ULL // bit  16
-#define ldlm_is_discard_data(_l)        LDLM_TEST_FLAG(( _l), 1ULL << 16)
-#define ldlm_set_discard_data(_l)       LDLM_SET_FLAG((  _l), 1ULL << 16)
+#define ldlm_is_discard_data(_l)        LDLM_TEST_FLAG((_l), 1ULL << 16)
+#define ldlm_set_discard_data(_l)       LDLM_SET_FLAG((_l), 1ULL << 16)
 #define ldlm_clear_discard_data(_l)     LDLM_CLEAR_FLAG((_l), 1ULL << 16)
 
 /** Blocked by group lock - wait indefinitely */
 #define LDLM_FL_NO_TIMEOUT              0x0000000000020000ULL // bit  17
-#define ldlm_is_no_timeout(_l)          LDLM_TEST_FLAG(( _l), 1ULL << 17)
-#define ldlm_set_no_timeout(_l)         LDLM_SET_FLAG((  _l), 1ULL << 17)
+#define ldlm_is_no_timeout(_l)          LDLM_TEST_FLAG((_l), 1ULL << 17)
+#define ldlm_set_no_timeout(_l)         LDLM_SET_FLAG((_l), 1ULL << 17)
 #define ldlm_clear_no_timeout(_l)       LDLM_CLEAR_FLAG((_l), 1ULL << 17)
 
 /**
  * Server told not to wait if blocked. For AGL, OST will not send glimpse
  * callback. */
 #define LDLM_FL_BLOCK_NOWAIT            0x0000000000040000ULL // bit  18
-#define ldlm_is_block_nowait(_l)        LDLM_TEST_FLAG(( _l), 1ULL << 18)
-#define ldlm_set_block_nowait(_l)       LDLM_SET_FLAG((  _l), 1ULL << 18)
+#define ldlm_is_block_nowait(_l)        LDLM_TEST_FLAG((_l), 1ULL << 18)
+#define ldlm_set_block_nowait(_l)       LDLM_SET_FLAG((_l), 1ULL << 18)
 #define ldlm_clear_block_nowait(_l)     LDLM_CLEAR_FLAG((_l), 1ULL << 18)
 
 /** return blocking lock */
 #define LDLM_FL_TEST_LOCK               0x0000000000080000ULL // bit  19
-#define ldlm_is_test_lock(_l)           LDLM_TEST_FLAG(( _l), 1ULL << 19)
-#define ldlm_set_test_lock(_l)          LDLM_SET_FLAG((  _l), 1ULL << 19)
+#define ldlm_is_test_lock(_l)           LDLM_TEST_FLAG((_l), 1ULL << 19)
+#define ldlm_set_test_lock(_l)          LDLM_SET_FLAG((_l), 1ULL << 19)
 #define ldlm_clear_test_lock(_l)        LDLM_CLEAR_FLAG((_l), 1ULL << 19)
 
 /**
  * is for clients (like liblustre) that cannot be expected to reliably
  * response to blocking AST. */
 #define LDLM_FL_CANCEL_ON_BLOCK         0x0000000000800000ULL // bit  23
-#define ldlm_is_cancel_on_block(_l)     LDLM_TEST_FLAG(( _l), 1ULL << 23)
-#define ldlm_set_cancel_on_block(_l)    LDLM_SET_FLAG((  _l), 1ULL << 23)
+#define ldlm_is_cancel_on_block(_l)     LDLM_TEST_FLAG((_l), 1ULL << 23)
+#define ldlm_set_cancel_on_block(_l)    LDLM_SET_FLAG((_l), 1ULL << 23)
 #define ldlm_clear_cancel_on_block(_l)  LDLM_CLEAR_FLAG((_l), 1ULL << 23)
 
 /**
  * measure lock contention and return -EUSERS if locking contention is high */
 #define LDLM_FL_DENY_ON_CONTENTION        0x0000000040000000ULL // bit  30
-#define ldlm_is_deny_on_contention(_l)    LDLM_TEST_FLAG(( _l), 1ULL << 30)
-#define ldlm_set_deny_on_contention(_l)   LDLM_SET_FLAG((  _l), 1ULL << 30)
+#define ldlm_is_deny_on_contention(_l)    LDLM_TEST_FLAG((_l), 1ULL << 30)
+#define ldlm_set_deny_on_contention(_l)   LDLM_SET_FLAG((_l), 1ULL << 30)
 #define ldlm_clear_deny_on_contention(_l) LDLM_CLEAR_FLAG((_l), 1ULL << 30)
 
 /**
  * These are flags that are mapped into the flags and ASTs of blocking
  * locks Add FL_DISCARD to blocking ASTs */
 #define LDLM_FL_AST_DISCARD_DATA        0x0000000080000000ULL // bit  31
-#define ldlm_is_ast_discard_data(_l)    LDLM_TEST_FLAG(( _l), 1ULL << 31)
-#define ldlm_set_ast_discard_data(_l)   LDLM_SET_FLAG((  _l), 1ULL << 31)
+#define ldlm_is_ast_discard_data(_l)    LDLM_TEST_FLAG((_l), 1ULL << 31)
+#define ldlm_set_ast_discard_data(_l)   LDLM_SET_FLAG((_l), 1ULL << 31)
 #define ldlm_clear_ast_discard_data(_l) LDLM_CLEAR_FLAG((_l), 1ULL << 31)
 
 /**
  * Used for marking lock as a target for -EINTR while cp_ast sleep emulation
  * + race with upcoming bl_ast. */
 #define LDLM_FL_FAIL_LOC                0x0000000100000000ULL // bit  32
-#define ldlm_is_fail_loc(_l)            LDLM_TEST_FLAG(( _l), 1ULL << 32)
-#define ldlm_set_fail_loc(_l)           LDLM_SET_FLAG((  _l), 1ULL << 32)
+#define ldlm_is_fail_loc(_l)            LDLM_TEST_FLAG((_l), 1ULL << 32)
+#define ldlm_set_fail_loc(_l)           LDLM_SET_FLAG((_l), 1ULL << 32)
 #define ldlm_clear_fail_loc(_l)         LDLM_CLEAR_FLAG((_l), 1ULL << 32)
 
 /**
  * Used while processing the unused list to know that we have already
  * handled this lock and decided to skip it. */
 #define LDLM_FL_SKIPPED                 0x0000000200000000ULL // bit  33
-#define ldlm_is_skipped(_l)             LDLM_TEST_FLAG(( _l), 1ULL << 33)
-#define ldlm_set_skipped(_l)            LDLM_SET_FLAG((  _l), 1ULL << 33)
+#define ldlm_is_skipped(_l)             LDLM_TEST_FLAG((_l), 1ULL << 33)
+#define ldlm_set_skipped(_l)            LDLM_SET_FLAG((_l), 1ULL << 33)
 #define ldlm_clear_skipped(_l)          LDLM_CLEAR_FLAG((_l), 1ULL << 33)
 
 /** this lock is being destroyed */
 #define LDLM_FL_CBPENDING               0x0000000400000000ULL // bit  34
-#define ldlm_is_cbpending(_l)           LDLM_TEST_FLAG(( _l), 1ULL << 34)
-#define ldlm_set_cbpending(_l)          LDLM_SET_FLAG((  _l), 1ULL << 34)
+#define ldlm_is_cbpending(_l)           LDLM_TEST_FLAG((_l), 1ULL << 34)
+#define ldlm_set_cbpending(_l)          LDLM_SET_FLAG((_l), 1ULL << 34)
 #define ldlm_clear_cbpending(_l)        LDLM_CLEAR_FLAG((_l), 1ULL << 34)
 
 /** not a real flag, not saved in lock */
 #define LDLM_FL_WAIT_NOREPROC           0x0000000800000000ULL // bit  35
-#define ldlm_is_wait_noreproc(_l)       LDLM_TEST_FLAG(( _l), 1ULL << 35)
-#define ldlm_set_wait_noreproc(_l)      LDLM_SET_FLAG((  _l), 1ULL << 35)
+#define ldlm_is_wait_noreproc(_l)       LDLM_TEST_FLAG((_l), 1ULL << 35)
+#define ldlm_set_wait_noreproc(_l)      LDLM_SET_FLAG((_l), 1ULL << 35)
 #define ldlm_clear_wait_noreproc(_l)    LDLM_CLEAR_FLAG((_l), 1ULL << 35)
 
 /** cancellation callback already run */
 #define LDLM_FL_CANCEL                  0x0000001000000000ULL // bit  36
-#define ldlm_is_cancel(_l)              LDLM_TEST_FLAG(( _l), 1ULL << 36)
-#define ldlm_set_cancel(_l)             LDLM_SET_FLAG((  _l), 1ULL << 36)
+#define ldlm_is_cancel(_l)              LDLM_TEST_FLAG((_l), 1ULL << 36)
+#define ldlm_set_cancel(_l)             LDLM_SET_FLAG((_l), 1ULL << 36)
 #define ldlm_clear_cancel(_l)           LDLM_CLEAR_FLAG((_l), 1ULL << 36)
 
 /** whatever it might mean */
 #define LDLM_FL_LOCAL_ONLY              0x0000002000000000ULL // bit  37
-#define ldlm_is_local_only(_l)          LDLM_TEST_FLAG(( _l), 1ULL << 37)
-#define ldlm_set_local_only(_l)         LDLM_SET_FLAG((  _l), 1ULL << 37)
+#define ldlm_is_local_only(_l)          LDLM_TEST_FLAG((_l), 1ULL << 37)
+#define ldlm_set_local_only(_l)         LDLM_SET_FLAG((_l), 1ULL << 37)
 #define ldlm_clear_local_only(_l)       LDLM_CLEAR_FLAG((_l), 1ULL << 37)
 
 /** don't run the cancel callback under ldlm_cli_cancel_unused */
 #define LDLM_FL_FAILED                  0x0000004000000000ULL // bit  38
-#define ldlm_is_failed(_l)              LDLM_TEST_FLAG(( _l), 1ULL << 38)
-#define ldlm_set_failed(_l)             LDLM_SET_FLAG((  _l), 1ULL << 38)
+#define ldlm_is_failed(_l)              LDLM_TEST_FLAG((_l), 1ULL << 38)
+#define ldlm_set_failed(_l)             LDLM_SET_FLAG((_l), 1ULL << 38)
 #define ldlm_clear_failed(_l)           LDLM_CLEAR_FLAG((_l), 1ULL << 38)
 
 /** lock cancel has already been sent */
 #define LDLM_FL_CANCELING               0x0000008000000000ULL // bit  39
-#define ldlm_is_canceling(_l)           LDLM_TEST_FLAG(( _l), 1ULL << 39)
-#define ldlm_set_canceling(_l)          LDLM_SET_FLAG((  _l), 1ULL << 39)
+#define ldlm_is_canceling(_l)           LDLM_TEST_FLAG((_l), 1ULL << 39)
+#define ldlm_set_canceling(_l)          LDLM_SET_FLAG((_l), 1ULL << 39)
 #define ldlm_clear_canceling(_l)        LDLM_CLEAR_FLAG((_l), 1ULL << 39)
 
 /** local lock (ie, no srv/cli split) */
 #define LDLM_FL_LOCAL                   0x0000010000000000ULL // bit  40
-#define ldlm_is_local(_l)               LDLM_TEST_FLAG(( _l), 1ULL << 40)
-#define ldlm_set_local(_l)              LDLM_SET_FLAG((  _l), 1ULL << 40)
+#define ldlm_is_local(_l)               LDLM_TEST_FLAG((_l), 1ULL << 40)
+#define ldlm_set_local(_l)              LDLM_SET_FLAG((_l), 1ULL << 40)
 #define ldlm_clear_local(_l)            LDLM_CLEAR_FLAG((_l), 1ULL << 40)
 
 /**
  * That change is pretty high-risk, though, and would need a lot more
  * testing. */
 #define LDLM_FL_LVB_READY               0x0000020000000000ULL // bit  41
-#define ldlm_is_lvb_ready(_l)           LDLM_TEST_FLAG(( _l), 1ULL << 41)
-#define ldlm_set_lvb_ready(_l)          LDLM_SET_FLAG((  _l), 1ULL << 41)
+#define ldlm_is_lvb_ready(_l)           LDLM_TEST_FLAG((_l), 1ULL << 41)
+#define ldlm_set_lvb_ready(_l)          LDLM_SET_FLAG((_l), 1ULL << 41)
 #define ldlm_clear_lvb_ready(_l)        LDLM_CLEAR_FLAG((_l), 1ULL << 41)
 
 /**
  * to know to exclude each other's locks from the calculation as they walk
  * the granted list. */
 #define LDLM_FL_KMS_IGNORE              0x0000040000000000ULL // bit  42
-#define ldlm_is_kms_ignore(_l)          LDLM_TEST_FLAG(( _l), 1ULL << 42)
-#define ldlm_set_kms_ignore(_l)         LDLM_SET_FLAG((  _l), 1ULL << 42)
+#define ldlm_is_kms_ignore(_l)          LDLM_TEST_FLAG((_l), 1ULL << 42)
+#define ldlm_set_kms_ignore(_l)         LDLM_SET_FLAG((_l), 1ULL << 42)
 #define ldlm_clear_kms_ignore(_l)       LDLM_CLEAR_FLAG((_l), 1ULL << 42)
 
 /** completion AST to be executed */
 #define LDLM_FL_CP_REQD                 0x0000080000000000ULL // bit  43
-#define ldlm_is_cp_reqd(_l)             LDLM_TEST_FLAG(( _l), 1ULL << 43)
-#define ldlm_set_cp_reqd(_l)            LDLM_SET_FLAG((  _l), 1ULL << 43)
+#define ldlm_is_cp_reqd(_l)             LDLM_TEST_FLAG((_l), 1ULL << 43)
+#define ldlm_set_cp_reqd(_l)            LDLM_SET_FLAG((_l), 1ULL << 43)
 #define ldlm_clear_cp_reqd(_l)          LDLM_CLEAR_FLAG((_l), 1ULL << 43)
 
 /** cleanup_resource has already handled the lock */
 #define LDLM_FL_CLEANED                 0x0000100000000000ULL // bit  44
-#define ldlm_is_cleaned(_l)             LDLM_TEST_FLAG(( _l), 1ULL << 44)
-#define ldlm_set_cleaned(_l)            LDLM_SET_FLAG((  _l), 1ULL << 44)
+#define ldlm_is_cleaned(_l)             LDLM_TEST_FLAG((_l), 1ULL << 44)
+#define ldlm_set_cleaned(_l)            LDLM_SET_FLAG((_l), 1ULL << 44)
 #define ldlm_clear_cleaned(_l)          LDLM_CLEAR_FLAG((_l), 1ULL << 44)
 
 /**
  * optimization hint: LDLM can run blocking callback from current context
  * w/o involving separate thread. in order to decrease cs rate */
 #define LDLM_FL_ATOMIC_CB               0x0000200000000000ULL // bit  45
-#define ldlm_is_atomic_cb(_l)           LDLM_TEST_FLAG(( _l), 1ULL << 45)
-#define ldlm_set_atomic_cb(_l)          LDLM_SET_FLAG((  _l), 1ULL << 45)
+#define ldlm_is_atomic_cb(_l)           LDLM_TEST_FLAG((_l), 1ULL << 45)
+#define ldlm_set_atomic_cb(_l)          LDLM_SET_FLAG((_l), 1ULL << 45)
 #define ldlm_clear_atomic_cb(_l)        LDLM_CLEAR_FLAG((_l), 1ULL << 45)
 
 /**
  * is used when ELC RPC is already prepared and is waiting for rpc_lock,
  * too late to send a separate CANCEL RPC. */
 #define LDLM_FL_BL_AST                  0x0000400000000000ULL // bit  46
-#define ldlm_is_bl_ast(_l)              LDLM_TEST_FLAG(( _l), 1ULL << 46)
-#define ldlm_set_bl_ast(_l)             LDLM_SET_FLAG((  _l), 1ULL << 46)
+#define ldlm_is_bl_ast(_l)              LDLM_TEST_FLAG((_l), 1ULL << 46)
+#define ldlm_set_bl_ast(_l)             LDLM_SET_FLAG((_l), 1ULL << 46)
 #define ldlm_clear_bl_ast(_l)           LDLM_CLEAR_FLAG((_l), 1ULL << 46)
 
 /** whatever it might mean */
 #define LDLM_FL_BL_DONE                 0x0000800000000000ULL // bit  47
-#define ldlm_is_bl_done(_l)             LDLM_TEST_FLAG(( _l), 1ULL << 47)
-#define ldlm_set_bl_done(_l)            LDLM_SET_FLAG((  _l), 1ULL << 47)
+#define ldlm_is_bl_done(_l)             LDLM_TEST_FLAG((_l), 1ULL << 47)
+#define ldlm_set_bl_done(_l)            LDLM_SET_FLAG((_l), 1ULL << 47)
 #define ldlm_clear_bl_done(_l)          LDLM_CLEAR_FLAG((_l), 1ULL << 47)
 
 /**
  * to aging.  Used by MGC locks, they are cancelled only at unmount or
  * by callback. */
 #define LDLM_FL_NO_LRU                  0x0001000000000000ULL // bit  48
-#define ldlm_is_no_lru(_l)              LDLM_TEST_FLAG(( _l), 1ULL << 48)
-#define ldlm_set_no_lru(_l)             LDLM_SET_FLAG((  _l), 1ULL << 48)
+#define ldlm_is_no_lru(_l)              LDLM_TEST_FLAG((_l), 1ULL << 48)
+#define ldlm_set_no_lru(_l)             LDLM_SET_FLAG((_l), 1ULL << 48)
 #define ldlm_clear_no_lru(_l)           LDLM_CLEAR_FLAG((_l), 1ULL << 48)
 
 /**
  *
  * Protected by lock and resource locks. */
 #define LDLM_FL_FAIL_NOTIFIED           0x0002000000000000ULL // bit  49
-#define ldlm_is_fail_notified(_l)       LDLM_TEST_FLAG(( _l), 1ULL << 49)
-#define ldlm_set_fail_notified(_l)      LDLM_SET_FLAG((  _l), 1ULL << 49)
+#define ldlm_is_fail_notified(_l)       LDLM_TEST_FLAG((_l), 1ULL << 49)
+#define ldlm_set_fail_notified(_l)      LDLM_SET_FLAG((_l), 1ULL << 49)
 #define ldlm_clear_fail_notified(_l)    LDLM_CLEAR_FLAG((_l), 1ULL << 49)
 
 /**
  *
  * Protected by lock and resource locks. */
 #define LDLM_FL_DESTROYED               0x0004000000000000ULL // bit  50
-#define ldlm_is_destroyed(_l)           LDLM_TEST_FLAG(( _l), 1ULL << 50)
-#define ldlm_set_destroyed(_l)          LDLM_SET_FLAG((  _l), 1ULL << 50)
+#define ldlm_is_destroyed(_l)           LDLM_TEST_FLAG((_l), 1ULL << 50)
+#define ldlm_set_destroyed(_l)          LDLM_SET_FLAG((_l), 1ULL << 50)
 #define ldlm_clear_destroyed(_l)        LDLM_CLEAR_FLAG((_l), 1ULL << 50)
 
 /** flag whether this is a server namespace lock */
 #define LDLM_FL_SERVER_LOCK             0x0008000000000000ULL // bit  51
-#define ldlm_is_server_lock(_l)         LDLM_TEST_FLAG(( _l), 1ULL << 51)
-#define ldlm_set_server_lock(_l)        LDLM_SET_FLAG((  _l), 1ULL << 51)
+#define ldlm_is_server_lock(_l)         LDLM_TEST_FLAG((_l), 1ULL << 51)
+#define ldlm_set_server_lock(_l)        LDLM_SET_FLAG((_l), 1ULL << 51)
 #define ldlm_clear_server_lock(_l)      LDLM_CLEAR_FLAG((_l), 1ULL << 51)
 
 /**
  * because it works only for SMP so user needs to add extra macros like
  * LASSERT_SPIN_LOCKED for uniprocessor kernels. */
 #define LDLM_FL_RES_LOCKED              0x0010000000000000ULL // bit  52
-#define ldlm_is_res_locked(_l)          LDLM_TEST_FLAG(( _l), 1ULL << 52)
-#define ldlm_set_res_locked(_l)         LDLM_SET_FLAG((  _l), 1ULL << 52)
+#define ldlm_is_res_locked(_l)          LDLM_TEST_FLAG((_l), 1ULL << 52)
+#define ldlm_set_res_locked(_l)         LDLM_SET_FLAG((_l), 1ULL << 52)
 #define ldlm_clear_res_locked(_l)       LDLM_CLEAR_FLAG((_l), 1ULL << 52)
 
 /**
  *
  * Protected by lock and resource locks. */
 #define LDLM_FL_WAITED                  0x0020000000000000ULL // bit  53
-#define ldlm_is_waited(_l)              LDLM_TEST_FLAG(( _l), 1ULL << 53)
-#define ldlm_set_waited(_l)             LDLM_SET_FLAG((  _l), 1ULL << 53)
+#define ldlm_is_waited(_l)              LDLM_TEST_FLAG((_l), 1ULL << 53)
+#define ldlm_set_waited(_l)             LDLM_SET_FLAG((_l), 1ULL << 53)
 #define ldlm_clear_waited(_l)           LDLM_CLEAR_FLAG((_l), 1ULL << 53)
 
 /** Flag whether this is a server namespace lock. */
 #define LDLM_FL_NS_SRV                  0x0040000000000000ULL // bit  54
-#define ldlm_is_ns_srv(_l)              LDLM_TEST_FLAG(( _l), 1ULL << 54)
-#define ldlm_set_ns_srv(_l)             LDLM_SET_FLAG((  _l), 1ULL << 54)
+#define ldlm_is_ns_srv(_l)              LDLM_TEST_FLAG((_l), 1ULL << 54)
+#define ldlm_set_ns_srv(_l)             LDLM_SET_FLAG((_l), 1ULL << 54)
 #define ldlm_clear_ns_srv(_l)           LDLM_CLEAR_FLAG((_l), 1ULL << 54)
 
 /** Flag whether this lock can be reused. Used by exclusive open. */
index 43ee9f0eb4d47f801a8f99acc4bdc41e7294899e..2a4294d41b5a0a5ab25d2fa1494f3181c014f3b5 100644 (file)
@@ -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,                 \
index 48ad60b221223b1c85864bb534244fbb2eb9afab..3341b5da6ac02d271e15aec0ca8d42813a752e19 100644 (file)
@@ -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 */
index 9ad8c268da10efe512aff7b530297faaf6d11aed..76a2546e0f41e504fc168af5a56a8d99163dd670 100644 (file)
@@ -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 **);
index 18aec796a724a77b2a84b2217913d353293a4a8e..3986ca4cddaa77fbdb19123a9e224adbb09cd038 100644 (file)
@@ -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)
index effa2af58c13a905a60f108cae21a8af8a79eead..5a2e5ea00570171759e2ff5cb9beb3e106544501 100644 (file)
@@ -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);
index ec8fff4632085a9652581b7b6fec3c8573c99365..2de64c23383be848c3ca8c62c28327e07782a7bd 100644 (file)
@@ -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
index 486dca6077de2e692d1bc0b7d58751be4a664b2b..2fc24a946590d72996d57594228b920839c51126 100644 (file)
@@ -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]++;
index 991d20c5065d3d0e83b169614cc474c54fa6d46d..3e2825514f7e0b624071e15a53eaa5277d3976fd 100644 (file)
@@ -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;
index f97371dd8539f6fef6aabab90ba4ba56468f83c0..8f4cca1ef109c49237c35315930a276329713c03 100644 (file)
@@ -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);
 
index a659962e09c8a49146b80ac74a4ad13356cfa2cb..75a8ea21bc240644984007cb1af54dc78fe5bf97 100644 (file)
@@ -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;
        }
 
index c9e0536e9f2a18948b8c9b2aeed7418355cc0604..f8146acd883d8bf29e689cdbefeb7666c81c0b6e 100644 (file)
@@ -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))
index c5c67d982ef2387c73cb247aef6a9fa96cf4db31..2a2fd8de055d091929575dace872f27acf334699 100644 (file)
@@ -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);
index fd1a4c5421e8fc7bc28152119bd41a9c1d3a532d..da0066a20fa0304858a4035ab41f4a1905a146f0 100644 (file)
@@ -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. */
index b081167f97670a881020c8524b1e17502a207000..7c6583a2e88436c405da05c229751c9b024c94c8 100644 (file)
@@ -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);
 
index 8f17d7c4f28e5b9f2327edb3a8625972b2aaf06e..9d1a3befb4f935565d322f70f8f2955353162417 100644 (file)
@@ -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)
index 20a7cd9fb4f1c74948bd2154a871edc1329bf415..b1511547444a36e5bf1fe7d8a9880cc59fda2b86 100644 (file)
@@ -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) {
index 0ca730948f7adbea81ecccba24f18db198e20835..bc614dce70c6cd73996e89d7124305c63655d622 100644 (file)
@@ -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
 
index facc8351fcea50163c83b2c12b29ad31500f3800..78d92269aab6dffc64da48010eec5992199eaa74 100644 (file)
@@ -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);
index 7b2b4c84208ddb390e19f8161c363d6dce65bfc1..d399cae2059e98f3ba7f50d60bd8a988ac3f6bac 100644 (file)
@@ -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;
index 12113dfd87b8e614f948a9162442ba44b6f61894..cf2739ccbc0483afa7294ee9af9dbc0570ae8a6b 100644 (file)
@@ -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;
index 53f9af1f2f3eaa109599b9a3e610171acf7ecd64..84eb3da5a9c98e6e1fc55cf8d5d093779ea3eb8d 100644 (file)
@@ -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" },