mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Simmons <jsimmons@infradead.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org,
	Andreas Dilger <andreas.dilger@intel.com>,
	Oleg Drokin <oleg.drokin@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Lustre Development List <lustre-devel@lists.lustre.org>,
	James Simmons <jsimmons@infradead.org>,
	James Simmons <uja.ornl@gmail.com>
Subject: [PATCH 09/24] staging: lustre: selftest: convert sfw_batch_t to proper struct
Date: Wed,  6 Apr 2016 15:25:35 -0400	[thread overview]
Message-ID: <1459970750-5377-10-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1459970750-5377-1-git-send-email-jsimmons@infradead.org>

Turn typedef sfw_batch_t to proper structure

Signed-off-by: James Simmons <uja.ornl@gmail.com>
---
 drivers/staging/lustre/lnet/selftest/framework.c |   38 +++++++++++-----------
 drivers/staging/lustre/lnet/selftest/selftest.h  |    6 ++--
 2 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/lustre/lnet/selftest/framework.c b/drivers/staging/lustre/lnet/selftest/framework.c
index 3a20598..0d7c3c5 100644
--- a/drivers/staging/lustre/lnet/selftest/framework.c
+++ b/drivers/staging/lustre/lnet/selftest/framework.c
@@ -115,7 +115,7 @@ static struct smoketest_framework {
 } sfw_data;
 
 /* forward ref's */
-int sfw_stop_batch(sfw_batch_t *tsb, int force);
+int sfw_stop_batch(struct sfw_batch *tsb, int force);
 void sfw_destroy_session(struct sfw_session *sn);
 
 static inline sfw_test_case_t *
@@ -198,7 +198,7 @@ __must_hold(&sfw_data.fw_lock)
 {
 	struct sfw_session *sn = sfw_data.fw_session;
 	int nactive = 0;
-	sfw_batch_t *tsb;
+	struct sfw_batch *tsb;
 	sfw_test_case_t *tsc;
 
 	if (!sn)
@@ -318,11 +318,11 @@ sfw_client_rpc_fini(struct srpc_client_rpc *rpc)
 	spin_unlock(&sfw_data.fw_lock);
 }
 
-static sfw_batch_t *
+static struct sfw_batch *
 sfw_find_batch(lst_bid_t bid)
 {
 	struct sfw_session *sn = sfw_data.fw_session;
-	sfw_batch_t *bat;
+	struct sfw_batch *bat;
 
 	LASSERT(sn);
 
@@ -334,11 +334,11 @@ sfw_find_batch(lst_bid_t bid)
 	return NULL;
 }
 
-static sfw_batch_t *
+static struct sfw_batch *
 sfw_bid2batch(lst_bid_t bid)
 {
 	struct sfw_session *sn = sfw_data.fw_session;
-	sfw_batch_t *bat;
+	struct sfw_batch *bat;
 
 	LASSERT(sn);
 
@@ -346,7 +346,7 @@ sfw_bid2batch(lst_bid_t bid)
 	if (bat)
 		return bat;
 
-	LIBCFS_ALLOC(bat, sizeof(sfw_batch_t));
+	LIBCFS_ALLOC(bat, sizeof(struct sfw_batch));
 	if (!bat)
 		return NULL;
 
@@ -365,7 +365,7 @@ sfw_get_stats(srpc_stat_reqst_t *request, srpc_stat_reply_t *reply)
 {
 	struct sfw_session *sn = sfw_data.fw_session;
 	sfw_counters_t *cnt = &reply->str_fw;
-	sfw_batch_t *bat;
+	struct sfw_batch *bat;
 
 	reply->str_sid = !sn ? LST_INVALID_SID : sn->sn_id;
 
@@ -648,7 +648,7 @@ clean:
 }
 
 static void
-sfw_destroy_batch(sfw_batch_t *tsb)
+sfw_destroy_batch(struct sfw_batch *tsb)
 {
 	sfw_test_instance_t *tsi;
 
@@ -662,20 +662,20 @@ sfw_destroy_batch(sfw_batch_t *tsb)
 		sfw_destroy_test_instance(tsi);
 	}
 
-	LIBCFS_FREE(tsb, sizeof(sfw_batch_t));
+	LIBCFS_FREE(tsb, sizeof(struct sfw_batch));
 }
 
 void
 sfw_destroy_session(struct sfw_session *sn)
 {
-	sfw_batch_t *batch;
+	struct sfw_batch *batch;
 
 	LASSERT(list_empty(&sn->sn_list));
 	LASSERT(sn != sfw_data.fw_session);
 
 	while (!list_empty(&sn->sn_batches)) {
 		batch = list_entry(sn->sn_batches.next,
-				   sfw_batch_t, bat_list);
+				   struct sfw_batch, bat_list);
 		list_del_init(&batch->bat_list);
 		sfw_destroy_batch(batch);
 	}
@@ -729,7 +729,7 @@ sfw_unpack_addtest_req(srpc_msg_t *msg)
 }
 
 static int
-sfw_add_test_instance(sfw_batch_t *tsb, struct srpc_server_rpc *rpc)
+sfw_add_test_instance(struct sfw_batch *tsb, struct srpc_server_rpc *rpc)
 {
 	srpc_msg_t *msg = &rpc->srpc_reqstbuf->buf_msg;
 	srpc_test_reqst_t *req = &msg->msg_body.tes_reqst;
@@ -827,7 +827,7 @@ static void
 sfw_test_unit_done(sfw_test_unit_t *tsu)
 {
 	sfw_test_instance_t *tsi = tsu->tsu_instance;
-	sfw_batch_t *tsb = tsi->tsi_batch;
+	struct sfw_batch *tsb = tsi->tsi_batch;
 	struct sfw_session *sn = tsb->bat_session;
 
 	LASSERT(sfw_test_active(tsi));
@@ -991,7 +991,7 @@ test_done:
 }
 
 static int
-sfw_run_batch(sfw_batch_t *tsb)
+sfw_run_batch(struct sfw_batch *tsb)
 {
 	struct swi_workitem *wi;
 	sfw_test_unit_t *tsu;
@@ -1026,7 +1026,7 @@ sfw_run_batch(sfw_batch_t *tsb)
 }
 
 int
-sfw_stop_batch(sfw_batch_t *tsb, int force)
+sfw_stop_batch(struct sfw_batch *tsb, int force)
 {
 	sfw_test_instance_t *tsi;
 	struct srpc_client_rpc *rpc;
@@ -1068,7 +1068,7 @@ sfw_stop_batch(sfw_batch_t *tsb, int force)
 }
 
 static int
-sfw_query_batch(sfw_batch_t *tsb, int testidx, srpc_batch_reply_t *reply)
+sfw_query_batch(struct sfw_batch *tsb, int testidx, srpc_batch_reply_t *reply)
 {
 	sfw_test_instance_t *tsi;
 
@@ -1119,7 +1119,7 @@ sfw_add_test(struct srpc_server_rpc *rpc)
 	srpc_test_reply_t *reply = &rpc->srpc_replymsg.msg_body.tes_reply;
 	srpc_test_reqst_t *request;
 	int rc;
-	sfw_batch_t *bat;
+	struct sfw_batch *bat;
 
 	request = &rpc->srpc_reqstbuf->buf_msg.msg_body.tes_reqst;
 	reply->tsr_sid = !sn ? LST_INVALID_SID : sn->sn_id;
@@ -1187,7 +1187,7 @@ sfw_control_batch(srpc_batch_reqst_t *request, srpc_batch_reply_t *reply)
 {
 	struct sfw_session *sn = sfw_data.fw_session;
 	int rc = 0;
-	sfw_batch_t *bat;
+	struct sfw_batch *bat;
 
 	reply->bar_sid = !sn ? LST_INVALID_SID : sn->sn_id;
 
diff --git a/drivers/staging/lustre/lnet/selftest/selftest.h b/drivers/staging/lustre/lnet/selftest/selftest.h
index eee36b1..50237bc 100644
--- a/drivers/staging/lustre/lnet/selftest/selftest.h
+++ b/drivers/staging/lustre/lnet/selftest/selftest.h
@@ -341,14 +341,14 @@ struct sfw_session {
 #define sfw_sid_equal(sid0, sid1)     ((sid0).ses_nid == (sid1).ses_nid && \
 				       (sid0).ses_stamp == (sid1).ses_stamp)
 
-typedef struct {
+struct sfw_batch {
 	struct list_head bat_list;	/* chain on sn_batches */
 	lst_bid_t	 bat_id;	/* batch id */
 	int		 bat_error;	/* error code of batch */
 	struct sfw_session	*bat_session;	/* batch's session */
 	atomic_t	 bat_nactive;	/* # of active tests */
 	struct list_head bat_tests;	/* test instances */
-} sfw_batch_t;
+};
 
 typedef struct {
 	int  (*tso_init)(struct sfw_test_instance *tsi); /* initialize test
@@ -365,7 +365,7 @@ typedef struct {
 typedef struct sfw_test_instance {
 	struct list_head	   tsi_list;		/* chain on batch */
 	int			   tsi_service;		/* test type */
-	sfw_batch_t		   *tsi_batch;		/* batch */
+	struct sfw_batch		*tsi_batch;	/* batch */
 	sfw_test_client_ops_t	   *tsi_ops;		/* test client operation
 							 */
 
-- 
1.7.1

  parent reply	other threads:[~2016-04-06 19:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-06 19:25 [PATCH 00/24] staging: lustre: selftest: remove typedefs James Simmons
2016-04-06 19:25 ` [PATCH 01/24] staging: lustre: selftest: convert srpc_event_type to proper enum James Simmons
2016-04-06 19:25 ` [PATCH 02/24] staging: lustre: selftest: convert srpc_event_t to proper struct James Simmons
2016-04-06 19:25 ` [PATCH 03/24] staging: lustre: selftest: convert srpc_bulk_t " James Simmons
2016-04-06 19:25 ` [PATCH 04/24] staging: lustre: selftest: convert srpc_buffer_t " James Simmons
2016-04-06 19:25 ` [PATCH 05/24] staging: lustre: selftest: convert swi_workitem_t " James Simmons
2016-04-06 19:25 ` [PATCH 06/24] staging: lustre: selftest: convert srpc_client_rpc_t " James Simmons
2016-04-06 19:25 ` [PATCH 07/24] staging: lustre: selftest: convert srpc_service_t " James Simmons
2016-04-06 19:25 ` [PATCH 08/24] staging: lustre: selftest: convert sfw_session_t " James Simmons
2016-04-06 19:25 ` James Simmons [this message]
2016-04-06 19:25 ` [PATCH 10/24] staging: lustre: selftest: convert sfw_test_client_ops_t " James Simmons
2016-04-06 19:25 ` [PATCH 11/24] staging: lustre: selftest: convert sfw_test_instance_t " James Simmons
2016-04-06 19:25 ` [PATCH 12/24] staging: lustre: selftest: convert sfw_test_unit_t " James Simmons
2016-04-06 19:25 ` [PATCH 13/24] staging: lustre: selftest: convert sfw_test_case_t " James Simmons
2016-04-06 19:25 ` [PATCH 14/24] staging: lustre: selftest: convert lstcon_rpc_t " James Simmons
2016-04-06 19:25 ` [PATCH 15/24] staging: lustre: selftest: convert lstcon_rpc_trans_t " James Simmons
2016-04-06 19:25 ` [PATCH 16/24] staging: lustre: selftest: convert lstcon_node_t " James Simmons
2016-04-06 19:25 ` [PATCH 17/24] staging: lustre: selftest: convert lstcon_ndlink_t " James Simmons
2016-04-06 19:25 ` [PATCH 18/24] staging: lustre: selftest: convert lstcon_group_t " James Simmons
2016-04-06 19:25 ` [PATCH 19/24] staging: lustre: selftest: convert lstcon_tsb_hdr_t " James Simmons
2016-04-06 19:25 ` [PATCH 20/24] staging: lustre: selftest: convert lstcon_batch_t " James Simmons
2016-04-06 19:25 ` [PATCH 21/24] staging: lustre: selftest: convert lstcon_test_t " James Simmons
2016-04-06 19:25 ` [PATCH 22/24] staging: lustre: selftest: convert srpc_msg_t " James Simmons
2016-04-06 19:25 ` [PATCH 23/24] staging: lustre: selftest: convert wire protocol to use struct James Simmons
2016-04-06 19:25 ` [PATCH 24/24] staging: lustre: selftest: change srpc_state_t to proper enum James Simmons
2016-04-12  4:03 ` [PATCH 00/24] staging: lustre: selftest: remove typedefs Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1459970750-5377-10-git-send-email-jsimmons@infradead.org \
    --to=jsimmons@infradead.org \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    --cc=oleg.drokin@intel.com \
    --cc=uja.ornl@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®