]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: lustre: selftest: convert sfw_test_unit_t to proper struct
authorJames Simmons <jsimmons@infradead.org>
Wed, 6 Apr 2016 19:25:38 +0000 (15:25 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Apr 2016 04:01:20 +0000 (21:01 -0700)
Turn typedef sfw_test_unit_t to proper structure

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/selftest/brw_test.c
drivers/staging/lustre/lnet/selftest/framework.c
drivers/staging/lustre/lnet/selftest/ping_test.c
drivers/staging/lustre/lnet/selftest/selftest.h

index bb50ee1f836ddec5ff2982b54bbeedcd478ad2a9..bbb003da3e3e05aa8613a68dc218ae866e0bb370 100644 (file)
@@ -52,7 +52,7 @@ static void
 brw_client_fini(struct sfw_test_instance *tsi)
 {
        struct srpc_bulk *bulk;
-       sfw_test_unit_t *tsu;
+       struct sfw_test_unit    *tsu;
 
        LASSERT(tsi->tsi_is_client);
 
@@ -75,7 +75,7 @@ brw_client_init(struct sfw_test_instance *tsi)
        int len;
        int opc;
        struct srpc_bulk *bulk;
-       sfw_test_unit_t *tsu;
+       struct sfw_test_unit *tsu;
 
        LASSERT(sn);
        LASSERT(tsi->tsi_is_client);
@@ -254,7 +254,7 @@ brw_check_bulk(struct srpc_bulk *bk, int pattern, __u64 magic)
 }
 
 static int
-brw_client_prep_rpc(sfw_test_unit_t *tsu,
+brw_client_prep_rpc(struct sfw_test_unit *tsu,
                    lnet_process_id_t dest, struct srpc_client_rpc **rpcpp)
 {
        struct srpc_bulk *bulk = tsu->tsu_private;
@@ -313,7 +313,7 @@ brw_client_prep_rpc(sfw_test_unit_t *tsu,
 }
 
 static void
-brw_client_done_rpc(sfw_test_unit_t *tsu, struct srpc_client_rpc *rpc)
+brw_client_done_rpc(struct sfw_test_unit *tsu, struct srpc_client_rpc *rpc)
 {
        __u64 magic = BRW_MAGIC;
        struct sfw_test_instance *tsi = tsu->tsu_instance;
index d783f08d3aedd2965ef08c79b6ca926078fb1d9b..31b564759d7f07f2944da689107732db9ed79c09 100644 (file)
@@ -528,7 +528,7 @@ sfw_debug_session(srpc_debug_reqst_t *request, srpc_debug_reply_t *reply)
 static void
 sfw_test_rpc_fini(struct srpc_client_rpc *rpc)
 {
-       sfw_test_unit_t *tsu = rpc->crpc_priv;
+       struct sfw_test_unit *tsu = rpc->crpc_priv;
        struct sfw_test_instance *tsi = tsu->tsu_instance;
 
        /* Called with hold of tsi->tsi_lock */
@@ -617,7 +617,7 @@ static void
 sfw_destroy_test_instance(struct sfw_test_instance *tsi)
 {
        struct srpc_client_rpc *rpc;
-       sfw_test_unit_t *tsu;
+       struct sfw_test_unit *tsu;
 
        if (!tsi->tsi_is_client)
                goto clean;
@@ -630,7 +630,7 @@ sfw_destroy_test_instance(struct sfw_test_instance *tsi)
 
        while (!list_empty(&tsi->tsi_units)) {
                tsu = list_entry(tsi->tsi_units.next,
-                                sfw_test_unit_t, tsu_list);
+                                struct sfw_test_unit, tsu_list);
                list_del(&tsu->tsu_list);
                LIBCFS_FREE(tsu, sizeof(*tsu));
        }
@@ -735,7 +735,7 @@ sfw_add_test_instance(struct sfw_batch *tsb, struct srpc_server_rpc *rpc)
        srpc_test_reqst_t *req = &msg->msg_body.tes_reqst;
        struct srpc_bulk *bk = rpc->srpc_bulk;
        int ndest = req->tsr_ndest;
-       sfw_test_unit_t *tsu;
+       struct sfw_test_unit *tsu;
        struct sfw_test_instance *tsi;
        int i;
        int rc;
@@ -795,7 +795,7 @@ sfw_add_test_instance(struct sfw_batch *tsb, struct srpc_server_rpc *rpc)
                        sfw_unpack_id(id);
 
                for (j = 0; j < tsi->tsi_concur; j++) {
-                       LIBCFS_ALLOC(tsu, sizeof(sfw_test_unit_t));
+                       LIBCFS_ALLOC(tsu, sizeof(struct sfw_test_unit));
                        if (!tsu) {
                                rc = -ENOMEM;
                                CERROR("Can't allocate tsu for %d\n",
@@ -824,7 +824,7 @@ error:
 }
 
 static void
-sfw_test_unit_done(sfw_test_unit_t *tsu)
+sfw_test_unit_done(struct sfw_test_unit *tsu)
 {
        struct sfw_test_instance *tsi = tsu->tsu_instance;
        struct sfw_batch *tsb = tsi->tsi_batch;
@@ -868,7 +868,7 @@ sfw_test_unit_done(sfw_test_unit_t *tsu)
 static void
 sfw_test_rpc_done(struct srpc_client_rpc *rpc)
 {
-       sfw_test_unit_t *tsu = rpc->crpc_priv;
+       struct sfw_test_unit *tsu = rpc->crpc_priv;
        struct sfw_test_instance *tsi = tsu->tsu_instance;
        int done = 0;
 
@@ -900,7 +900,7 @@ sfw_test_rpc_done(struct srpc_client_rpc *rpc)
 }
 
 int
-sfw_create_test_rpc(sfw_test_unit_t *tsu, lnet_process_id_t peer,
+sfw_create_test_rpc(struct sfw_test_unit *tsu, lnet_process_id_t peer,
                    unsigned features, int nblk, int blklen,
                    struct srpc_client_rpc **rpcpp)
 {
@@ -944,7 +944,7 @@ sfw_create_test_rpc(sfw_test_unit_t *tsu, lnet_process_id_t peer,
 static int
 sfw_run_test(struct swi_workitem *wi)
 {
-       sfw_test_unit_t *tsu = wi->swi_workitem.wi_data;
+       struct sfw_test_unit *tsu = wi->swi_workitem.wi_data;
        struct sfw_test_instance *tsi = tsu->tsu_instance;
        struct srpc_client_rpc *rpc = NULL;
 
@@ -994,7 +994,7 @@ static int
 sfw_run_batch(struct sfw_batch *tsb)
 {
        struct swi_workitem *wi;
-       sfw_test_unit_t *tsu;
+       struct sfw_test_unit *tsu;
        struct sfw_test_instance *tsi;
 
        if (sfw_batch_active(tsb)) {
index 4e454283da227aac802cf577a0120e256ac275ba..c6f2caa86d730d3e7da991f1445fd09c9a961c4f 100644 (file)
@@ -86,7 +86,7 @@ ping_client_fini(struct sfw_test_instance *tsi)
 }
 
 static int
-ping_client_prep_rpc(sfw_test_unit_t *tsu, lnet_process_id_t dest,
+ping_client_prep_rpc(struct sfw_test_unit *tsu, lnet_process_id_t dest,
                     struct srpc_client_rpc **rpc)
 {
        srpc_ping_reqst_t *req;
@@ -118,7 +118,7 @@ ping_client_prep_rpc(sfw_test_unit_t *tsu, lnet_process_id_t dest,
 }
 
 static void
-ping_client_done_rpc(sfw_test_unit_t *tsu, struct srpc_client_rpc *rpc)
+ping_client_done_rpc(struct sfw_test_unit *tsu, struct srpc_client_rpc *rpc)
 {
        struct sfw_test_instance *tsi = tsu->tsu_instance;
        struct sfw_session *sn = tsi->tsi_batch->bat_session;
index a95bdca02c30adf41a8820858870af2b3f841588..ae1a69957cf738ff11312e3bf1539eb2e807add9 100644 (file)
@@ -398,14 +398,14 @@ struct sfw_test_instance {
 #define SFW_MAX_NDESTS    (LNET_MAX_IOV * SFW_ID_PER_PAGE)
 #define sfw_id_pages(n)    (((n) + SFW_ID_PER_PAGE - 1) / SFW_ID_PER_PAGE)
 
-typedef struct sfw_test_unit {
+struct sfw_test_unit {
        struct list_head    tsu_list;      /* chain on lst_test_instance */
        lnet_process_id_t   tsu_dest;      /* id of dest node */
        int                 tsu_loop;      /* loop count of the test */
        struct sfw_test_instance        *tsu_instance; /* pointer to test instance */
        void                *tsu_private;  /* private data */
        struct swi_workitem     tsu_worker;     /* workitem of the test unit */
-} sfw_test_unit_t;
+};
 
 typedef struct sfw_test_case {
        struct list_head      tsc_list;         /* chain on fw_tests */
@@ -417,7 +417,7 @@ struct srpc_client_rpc *
 sfw_create_rpc(lnet_process_id_t peer, int service,
               unsigned features, int nbulkiov, int bulklen,
               void (*done)(struct srpc_client_rpc *), void *priv);
-int sfw_create_test_rpc(sfw_test_unit_t *tsu,
+int sfw_create_test_rpc(struct sfw_test_unit *tsu,
                        lnet_process_id_t peer, unsigned features,
                        int nblk, int blklen, struct srpc_client_rpc **rpc);
 void sfw_abort_rpc(struct srpc_client_rpc *rpc);