Whamcloud - gitweb
LU-6142 lnet: Fix style issues for rpc.h 32/55732/2
authorArshad Hussain <arshad.hussain@aeoncomputing.com>
Mon, 15 Jul 2024 08:55:36 +0000 (04:55 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 23 Jul 2024 04:40:26 +0000 (04:40 +0000)
This patch fixes issues reported by checkpatch
for file lnet/selftest/rpc.h

Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I99524bd815936c95d048a7617acfde3327d8d5e1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55732
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/selftest/rpc.h

index fe94d11..96b1b10 100644 (file)
 
 #include <uapi/linux/lnet/lnetst.h>
 
-/*
- * LST wired structures
+/* LST wired structures
  *
  * XXX: *REPLY == *REQST + 1
  */
 enum srpc_msg_type {
-        SRPC_MSG_MKSN_REQST     = 0,
-        SRPC_MSG_MKSN_REPLY     = 1,
-        SRPC_MSG_RMSN_REQST     = 2,
-        SRPC_MSG_RMSN_REPLY     = 3,
-        SRPC_MSG_BATCH_REQST    = 4,
-        SRPC_MSG_BATCH_REPLY    = 5,
-        SRPC_MSG_STAT_REQST     = 6,
-        SRPC_MSG_STAT_REPLY     = 7,
-        SRPC_MSG_TEST_REQST     = 8,
-        SRPC_MSG_TEST_REPLY     = 9,
-        SRPC_MSG_DEBUG_REQST    = 10,
-        SRPC_MSG_DEBUG_REPLY    = 11,
-        SRPC_MSG_BRW_REQST      = 12,
-        SRPC_MSG_BRW_REPLY      = 13,
-        SRPC_MSG_PING_REQST     = 14,
-        SRPC_MSG_PING_REPLY     = 15,
-        SRPC_MSG_JOIN_REQST     = 16,
-        SRPC_MSG_JOIN_REPLY     = 17,
+       SRPC_MSG_MKSN_REQST     = 0,
+       SRPC_MSG_MKSN_REPLY     = 1,
+       SRPC_MSG_RMSN_REQST     = 2,
+       SRPC_MSG_RMSN_REPLY     = 3,
+       SRPC_MSG_BATCH_REQST    = 4,
+       SRPC_MSG_BATCH_REPLY    = 5,
+       SRPC_MSG_STAT_REQST     = 6,
+       SRPC_MSG_STAT_REPLY     = 7,
+       SRPC_MSG_TEST_REQST     = 8,
+       SRPC_MSG_TEST_REPLY     = 9,
+       SRPC_MSG_DEBUG_REQST    = 10,
+       SRPC_MSG_DEBUG_REPLY    = 11,
+       SRPC_MSG_BRW_REQST      = 12,
+       SRPC_MSG_BRW_REPLY      = 13,
+       SRPC_MSG_PING_REQST     = 14,
+       SRPC_MSG_PING_REPLY     = 15,
+       SRPC_MSG_JOIN_REQST     = 16,
+       SRPC_MSG_JOIN_REPLY     = 17,
 };
 
 /* CAVEAT EMPTOR:
@@ -50,65 +49,65 @@ enum srpc_msg_type {
  * session id if needed.
  */
 struct srpc_generic_reqst {
-        __u64                  rpyid;          /* reply buffer matchbits */
-        __u64                  bulkid;         /* bulk buffer matchbits */
+       __u64           rpyid;          /* reply buffer matchbits */
+       __u64           bulkid;         /* bulk buffer matchbits */
 } __packed;
 
 struct srpc_generic_reply {
-        __u32                   status;
-       struct lst_sid               sid;
+       __u32           status;
+       struct lst_sid  sid;
 } __packed;
 
 /* FRAMEWORK RPCs */
 struct srpc_mksn_reqst {
-        __u64                  mksn_rpyid;      /* reply buffer matchbits */
-       struct lst_sid               mksn_sid;        /* session id */
-        __u32                  mksn_force;      /* use brute force */
-        char                   mksn_name[LST_NAME_SIZE];
-} __packed;                                    /* make session request */
+       __u64           mksn_rpyid;      /* reply buffer matchbits */
+       struct lst_sid  mksn_sid;        /* session id */
+       __u32           mksn_force;      /* use brute force */
+       char            mksn_name[LST_NAME_SIZE];
+} __packed;                            /* make session request */
 
 struct srpc_mksn_reply {
-        __u32                   mksn_status;      /* session status */
-       struct lst_sid               mksn_sid;         /* session id */
-        __u32                   mksn_timeout;     /* session timeout */
-        char                   mksn_name[LST_NAME_SIZE];
+       __u32           mksn_status;      /* session status */
+       struct lst_sid  mksn_sid;         /* session id */
+       __u32           mksn_timeout;     /* session timeout */
+       char                    mksn_name[LST_NAME_SIZE];
 } __packed;                                    /* make session reply */
 
 struct srpc_rmsn_reqst {
-       __u64                   rmsn_rpyid;     /* reply buffer matchbits */
-       struct lst_sid          rmsn_sid;       /* session id */
-} __packed;                                    /* remove session request */
+       __u64           rmsn_rpyid;     /* reply buffer matchbits */
+       struct lst_sid  rmsn_sid;       /* session id */
+} __packed;                            /* remove session request */
 
 struct srpc_rmsn_reply {
-        __u32                  rmsn_status;
+       __u32                   rmsn_status;
        struct lst_sid          rmsn_sid;       /* session id */
 } __packed;                                    /* remove session reply */
 
 struct srpc_join_reqst {
-        __u64                  join_rpyid;     /* reply buffer matchbits */
-       struct lst_sid               join_sid;       /* session id to join */
-        char                    join_group[LST_NAME_SIZE]; /* group name */
+       __u64                   join_rpyid;     /* reply buffer matchbits */
+       struct lst_sid          join_sid;       /* session id to join */
+       char                    join_group[LST_NAME_SIZE]; /* group name */
 } __packed;
 
 struct srpc_join_reply {
-        __u32                   join_status;    /* returned status */
-       struct lst_sid               join_sid;       /* session id */
-        __u32                  join_timeout;   /* # seconds' inactivity to expire */
-        char                    join_session[LST_NAME_SIZE]; /* session name */
+       __u32           join_status;    /* returned status */
+       struct lst_sid  join_sid;       /* session id */
+       __u32           join_timeout;   /* # seconds' inactivity to expire */
+       char            join_session[LST_NAME_SIZE]; /* session name */
 } __packed;
 
 struct srpc_debug_reqst {
-        __u64                   dbg_rpyid;      /* reply buffer matchbits */ 
-       struct lst_sid               dbg_sid;        /* session id */
-        __u32                   dbg_flags;      /* bitmap of debug */
+       __u64           dbg_rpyid;      /* reply buffer matchbits */
+       struct lst_sid  dbg_sid;        /* session id */
+       __u32           dbg_flags;      /* bitmap of debug */
 } __packed;
 
 struct srpc_debug_reply {
-        __u32                   dbg_status;     /* returned code */
-       struct lst_sid               dbg_sid;        /* session id */
-        __u32                   dbg_timeout;    /* session timeout */
-        __u32                   dbg_nbatch;     /* # of batches in the node */
-        char                    dbg_name[LST_NAME_SIZE]; /* session name */
+       __u32           dbg_status;     /* returned code */
+       struct lst_sid  dbg_sid;        /* session id */
+       __u32           dbg_timeout;    /* session timeout */
+       __u32           dbg_nbatch;     /* # of batches in the node */
+       char            dbg_name[LST_NAME_SIZE]; /* session name */
 } __packed;
 
 #define SRPC_BATCH_OPC_RUN      1
@@ -116,50 +115,50 @@ struct srpc_debug_reply {
 #define SRPC_BATCH_OPC_QUERY    3
 
 struct srpc_batch_reqst {
-        __u64                   bar_rpyid;      /* reply buffer matchbits */ 
-       struct lst_sid               bar_sid;        /* session id */
-       struct lst_bid               bar_bid;        /* batch id */
-        __u32                   bar_opc;        /* create/start/stop batch */
-        __u32                   bar_testidx;    /* index of test */
-        __u32                   bar_arg;        /* parameters */
+       __u64           bar_rpyid;      /* reply buffer matchbits */
+       struct lst_sid  bar_sid;        /* session id */
+       struct lst_bid  bar_bid;        /* batch id */
+       __u32           bar_opc;        /* create/start/stop batch */
+       __u32           bar_testidx;    /* index of test */
+       __u32           bar_arg;        /* parameters */
 } __packed;
 
 struct srpc_batch_reply {
-        __u32                   bar_status;     /* status of request */
-       struct lst_sid          bar_sid;        /* session id */
-        __u32                   bar_active;     /* # of active tests in batch/test */
-        __u32                   bar_time;       /* remained time */
+       __u32           bar_status;     /* status of request */
+       struct lst_sid  bar_sid;        /* session id */
+       __u32           bar_active;     /* # of active tests in batch/test */
+       __u32           bar_time;       /* remained time */
 } __packed;
 
 struct srpc_stat_reqst {
-        __u64                   str_rpyid;      /* reply buffer matchbits */
-       struct lst_sid          str_sid;        /* session id */
-        __u32                   str_type;       /* type of stat */
+       __u64           str_rpyid;      /* reply buffer matchbits */
+       struct lst_sid  str_sid;        /* session id */
+       __u32           str_type;       /* type of stat */
 } __packed;
 
 struct srpc_stat_reply {
-       __u32                    str_status;
-       struct lst_sid           str_sid;
-       struct sfw_counters      str_fw;
-       struct srpc_counters     str_rpc;
-       struct lnet_counters_common str_lnet;
+       __u32                           str_status;
+       struct lst_sid                  str_sid;
+       struct sfw_counters             str_fw;
+       struct srpc_counters            str_rpc;
+       struct lnet_counters_common     str_lnet;
 } __packed;
 
 struct test_bulk_req {
-        __u32                   blk_opc;        /* bulk operation code */
-        __u32                   blk_npg;        /* # of pages */
-        __u32                   blk_flags;      /* reserved flags */
+       __u32           blk_opc;        /* bulk operation code */
+       __u32           blk_npg;        /* # of pages */
+       __u32           blk_flags;      /* reserved flags */
 } __packed;
 
 struct test_bulk_req_v1 {
        /** bulk operation code */
-       __u16                   blk_opc;
+       __u16           blk_opc;
        /** data check flags */
-       __u16                   blk_flags;
+       __u16           blk_flags;
        /** data length */
-       __u32                   blk_len;
+       __u32           blk_len;
        /** bulk offset */
-       __u32                   blk_offset;
+       __u32           blk_offset;
 } __packed;
 
 struct test_ping_req {
@@ -194,29 +193,29 @@ struct srpc_test_reply {
 
 /* TEST RPCs */
 struct srpc_ping_reqst {
-        __u64                   pnr_rpyid;
-        __u32                   pnr_magic;
-        __u32                   pnr_seq;
-        __u64                   pnr_time_sec;
-       __u64                   pnr_time_nsec;
+       __u64           pnr_rpyid;
+       __u32           pnr_magic;
+       __u32           pnr_seq;
+       __u64           pnr_time_sec;
+       __u64           pnr_time_nsec;
 } __packed;
 
 struct srpc_ping_reply {
-        __u32                   pnr_status;
-        __u32                   pnr_magic;
-        __u32                   pnr_seq;
+       __u32           pnr_status;
+       __u32           pnr_magic;
+       __u32           pnr_seq;
 } __packed;
 
 struct srpc_brw_reqst {
-        __u64                   brw_rpyid;      /* reply buffer matchbits */
-        __u64                   brw_bulkid;     /* bulk buffer matchbits */
-        __u32                   brw_rw;         /* read or write */
-        __u32                   brw_len;        /* bulk data len */
-        __u32                   brw_flags;      /* bulk data patterns */
+       __u64           brw_rpyid;      /* reply buffer matchbits */
+       __u64           brw_bulkid;     /* bulk buffer matchbits */
+       __u32           brw_rw;         /* read or write */
+       __u32           brw_len;        /* bulk data len */
+       __u32           brw_flags;      /* bulk data patterns */
 } __packed;                                    /* bulk r/w request */
 
 struct srpc_brw_reply {
-        __u32                   brw_status;
+       __u32                   brw_status;
 } __packed; /* bulk r/w reply */
 
 #define SRPC_MSG_MAGIC                  0xeeb0f00d
@@ -233,7 +232,7 @@ struct srpc_msg {
        __u32   msg_reserved1;
        /** test session features */
        __u32   msg_ses_feats;
-        union {
+       union {
                struct srpc_generic_reqst       reqst;
                struct srpc_generic_reply       reply;
 
@@ -266,7 +265,8 @@ srpc_unpack_msg_hdr(struct srpc_msg *msg)
                return; /* no flipping needed */
 
        /* We do not swap the magic number here as it is needed to
-          determine whether the body needs to be swapped. */
+        * determine whether the body needs to be swapped.
+        */
        /* __swab32s(&msg->msg_magic); */
        __swab32s(&msg->msg_type);
        __swab32s(&msg->msg_version);