staging: lustre: lnet: change lstcon_trans_stat_t to proper structure
authorJames Simmons <jsimmons@infradead.org>
Mon, 16 Jan 2017 21:30:12 +0000 (16:30 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jan 2017 10:10:15 +0000 (11:10 +0100)
Change lstcon_trans_stat_t from typedef to proper structure.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142
Reviewed-on: https://review.whamcloud.com/24188
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/lnet/lnetst.h
drivers/staging/lustre/lnet/selftest/conctl.c
drivers/staging/lustre/lnet/selftest/conrpc.c
drivers/staging/lustre/lnet/selftest/conrpc.h
drivers/staging/lustre/lnet/selftest/console.h

index f5c68c13256686505cc4ba6aa244fb93fa078866..48dc06f1b9e96997d1d77033d147c325859f3a35 100644 (file)
@@ -137,7 +137,7 @@ struct lstcon_rpc_ent {
        char                    rpe_payload[0]; /* private reply payload */
 };
 
-typedef struct {
+struct lstcon_trans_stat {
        int     trs_rpc_stat[4];        /* RPCs stat (0: total
                                                      1: failed
                                                      2: finished
@@ -146,94 +146,94 @@ typedef struct {
        int     trs_fwk_stat[8];        /* framework stat */
        int     trs_fwk_errno;          /* errno of the first remote error */
        void    *trs_fwk_private;       /* private framework stat */
-} lstcon_trans_stat_t;
+};
 
 static inline int
-lstcon_rpc_stat_total(lstcon_trans_stat_t *stat, int inc)
+lstcon_rpc_stat_total(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_rpc_stat[0] : stat->trs_rpc_stat[0];
 }
 
 static inline int
-lstcon_rpc_stat_success(lstcon_trans_stat_t *stat, int inc)
+lstcon_rpc_stat_success(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_rpc_stat[1] : stat->trs_rpc_stat[1];
 }
 
 static inline int
-lstcon_rpc_stat_failure(lstcon_trans_stat_t *stat, int inc)
+lstcon_rpc_stat_failure(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_rpc_stat[2] : stat->trs_rpc_stat[2];
 }
 
 static inline int
-lstcon_sesop_stat_success(lstcon_trans_stat_t *stat, int inc)
+lstcon_sesop_stat_success(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[0] : stat->trs_fwk_stat[0];
 }
 
 static inline int
-lstcon_sesop_stat_failure(lstcon_trans_stat_t *stat, int inc)
+lstcon_sesop_stat_failure(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[1] : stat->trs_fwk_stat[1];
 }
 
 static inline int
-lstcon_sesqry_stat_active(lstcon_trans_stat_t *stat, int inc)
+lstcon_sesqry_stat_active(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[0] : stat->trs_fwk_stat[0];
 }
 
 static inline int
-lstcon_sesqry_stat_busy(lstcon_trans_stat_t *stat, int inc)
+lstcon_sesqry_stat_busy(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[1] : stat->trs_fwk_stat[1];
 }
 
 static inline int
-lstcon_sesqry_stat_unknown(lstcon_trans_stat_t *stat, int inc)
+lstcon_sesqry_stat_unknown(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[2] : stat->trs_fwk_stat[2];
 }
 
 static inline int
-lstcon_tsbop_stat_success(lstcon_trans_stat_t *stat, int inc)
+lstcon_tsbop_stat_success(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[0] : stat->trs_fwk_stat[0];
 }
 
 static inline int
-lstcon_tsbop_stat_failure(lstcon_trans_stat_t *stat, int inc)
+lstcon_tsbop_stat_failure(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[1] : stat->trs_fwk_stat[1];
 }
 
 static inline int
-lstcon_tsbqry_stat_idle(lstcon_trans_stat_t *stat, int inc)
+lstcon_tsbqry_stat_idle(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[0] : stat->trs_fwk_stat[0];
 }
 
 static inline int
-lstcon_tsbqry_stat_run(lstcon_trans_stat_t *stat, int inc)
+lstcon_tsbqry_stat_run(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[1] : stat->trs_fwk_stat[1];
 }
 
 static inline int
-lstcon_tsbqry_stat_failure(lstcon_trans_stat_t *stat, int inc)
+lstcon_tsbqry_stat_failure(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[2] : stat->trs_fwk_stat[2];
 }
 
 static inline int
-lstcon_statqry_stat_success(lstcon_trans_stat_t *stat, int inc)
+lstcon_statqry_stat_success(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[0] : stat->trs_fwk_stat[0];
 }
 
 static inline int
-lstcon_statqry_stat_failure(lstcon_trans_stat_t *stat, int inc)
+lstcon_statqry_stat_failure(struct lstcon_trans_stat *stat, int inc)
 {
        return inc ? ++stat->trs_fwk_stat[1] : stat->trs_fwk_stat[1];
 }
index 94383023c1bebf49d968bac6d009fb32c46af9fe..a897738a578919457e6f858433095ed676a36833 100644 (file)
@@ -851,7 +851,7 @@ lstcon_ioctl_entry(unsigned int cmd, struct libcfs_ioctl_hdr *hdr)
                goto out;
        }
 
-       memset(&console_session.ses_trans_stat, 0, sizeof(lstcon_trans_stat_t));
+       memset(&console_session.ses_trans_stat, 0, sizeof(struct lstcon_trans_stat));
 
        switch (opc) {
        case LSTIO_SESSION_NEW:
@@ -913,7 +913,7 @@ lstcon_ioctl_entry(unsigned int cmd, struct libcfs_ioctl_hdr *hdr)
        }
 
        if (copy_to_user(data->ioc_pbuf2, &console_session.ses_trans_stat,
-                        sizeof(lstcon_trans_stat_t)))
+                        sizeof(struct lstcon_trans_stat)))
                rc = -EFAULT;
 out:
        mutex_unlock(&console_session.ses_mutex);
index bc924f9e8727c7a5c557a7eb2e275a738f881061..3b97915d3bdaad7b7f932feef689a7265cf080c2 100644 (file)
@@ -43,7 +43,7 @@
 #include "console.h"
 
 void lstcon_rpc_stat_reply(struct lstcon_rpc_trans *, struct srpc_msg *,
-                          struct lstcon_node *, lstcon_trans_stat_t *);
+                          struct lstcon_node *, struct lstcon_trans_stat *);
 
 static void
 lstcon_rpc_done(struct srpc_client_rpc *rpc)
@@ -420,7 +420,7 @@ lstcon_rpc_get_reply(struct lstcon_rpc *crpc, struct srpc_msg **msgpp)
 }
 
 void
-lstcon_rpc_trans_stat(struct lstcon_rpc_trans *trans, lstcon_trans_stat_t *stat)
+lstcon_rpc_trans_stat(struct lstcon_rpc_trans *trans, struct lstcon_trans_stat *stat)
 {
        struct lstcon_rpc *crpc;
        struct srpc_msg *rep;
@@ -964,7 +964,7 @@ lstcon_sesnew_stat_reply(struct lstcon_rpc_trans *trans,
 
 void
 lstcon_rpc_stat_reply(struct lstcon_rpc_trans *trans, struct srpc_msg *msg,
-                     struct lstcon_node *nd, lstcon_trans_stat_t *stat)
+                     struct lstcon_node *nd, struct lstcon_trans_stat *stat)
 {
        struct srpc_rmsn_reply *rmsn_rep;
        struct srpc_debug_reply *dbg_rep;
@@ -1320,7 +1320,7 @@ lstcon_rpc_pinger_stop(void)
        lstcon_rpc_trans_stat(console_session.ses_ping, lstcon_trans_stat());
        lstcon_rpc_trans_destroy(console_session.ses_ping);
 
-       memset(lstcon_trans_stat(), 0, sizeof(lstcon_trans_stat_t));
+       memset(lstcon_trans_stat(), 0, sizeof(struct lstcon_trans_stat));
 
        console_session.ses_ping = NULL;
 }
index ad0a49e2b462f702b45ab929bbd56530cb5f61de..7141d2c902a50604cf982b44e921be16aea746e3 100644 (file)
@@ -125,7 +125,7 @@ int  lstcon_rpc_trans_ndlist(struct list_head *ndlist,
                             void *arg, lstcon_rpc_cond_func_t condition,
                             struct lstcon_rpc_trans **transpp);
 void lstcon_rpc_trans_stat(struct lstcon_rpc_trans *trans,
-                          lstcon_trans_stat_t *stat);
+                          struct lstcon_trans_stat *stat);
 int  lstcon_rpc_trans_interpreter(struct lstcon_rpc_trans *trans,
                                  struct list_head __user *head_up,
                                  lstcon_rpc_readent_func_t readent);
index f8d61ce455646d2103d31ff5147cbe31a9339ec2..05b4b7013d2ea0ff855ab20b4b292fab2c811cee 100644 (file)
@@ -158,7 +158,7 @@ struct lstcon_session {
        char                ses_name[LST_NAME_SIZE];/* session name */
        struct lstcon_rpc_trans *ses_ping;              /* session pinger */
        struct stt_timer         ses_ping_timer;   /* timer for pinger */
-       lstcon_trans_stat_t ses_trans_stat;   /* transaction stats */
+       struct lstcon_trans_stat ses_trans_stat;   /* transaction stats */
 
        struct list_head    ses_trans_list;   /* global list of transaction */
        struct list_head    ses_grp_list;     /* global list of groups */
@@ -173,7 +173,7 @@ struct lstcon_session {
 
 extern struct lstcon_session    console_session;
 
-static inline lstcon_trans_stat_t *
+static inline struct lstcon_trans_stat *
 lstcon_trans_stat(void)
 {
        return &console_session.ses_trans_stat;