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@yahoo.com>
Subject: [PATCH 17/34] staging: lustre: lnet: change lnet_remotenet_t to proper structure
Date: Sun, 26 Feb 2017 19:41:42 -0500	[thread overview]
Message-ID: <1488156119-19670-18-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1488156119-19670-1-git-send-email-jsimmons@infradead.org>

Change lnet_remotenet_t from typedef to proper structure.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/20831
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 .../staging/lustre/include/linux/lnet/lib-lnet.h   |  2 +-
 .../staging/lustre/include/linux/lnet/lib-types.h  |  4 ++--
 drivers/staging/lustre/lnet/lnet/api-ni.c          |  2 +-
 drivers/staging/lustre/lnet/lnet/lib-move.c        |  6 +++---
 drivers/staging/lustre/lnet/lnet/router.c          | 24 +++++++++++-----------
 drivers/staging/lustre/lnet/lnet/router_proc.c     |  4 ++--
 6 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index 93e6830..8483a4a 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -473,7 +473,7 @@ int lnet_get_route(int idx, __u32 *net, __u32 *hops,
 int lnet_rtrpools_enable(void);
 void lnet_rtrpools_disable(void);
 void lnet_rtrpools_free(int keep_pools);
-lnet_remotenet_t *lnet_find_net_locked(__u32 net);
+struct lnet_remotenet *lnet_find_net_locked(__u32 net);
 int lnet_dyn_add_ni(lnet_pid_t requested_pid,
 		    struct lnet_ioctl_config_data *conf);
 int lnet_dyn_del_ni(__u32 net);
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-types.h b/drivers/staging/lustre/include/linux/lnet/lib-types.h
index a0d9cad..04ad728 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-types.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-types.h
@@ -384,12 +384,12 @@ struct lnet_route {
 #define LNET_REMOTE_NETS_HASH_MAX	(1U << 16)
 #define LNET_REMOTE_NETS_HASH_SIZE	(1 << the_lnet.ln_remote_nets_hbits)
 
-typedef struct {
+struct lnet_remotenet {
 	struct list_head	lrn_list;	/* chain on
 						   ln_remote_nets_hash */
 	struct list_head	lrn_routes;	/* routes to me */
 	__u32			lrn_net;	/* my net number */
-} lnet_remotenet_t;
+};
 
 /** lnet message has credit and can be submitted to lnd for send/receive */
 #define LNET_CREDIT_OK		0
diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c
index 88279ed..c03e701 100644
--- a/drivers/staging/lustre/lnet/lnet/api-ni.c
+++ b/drivers/staging/lustre/lnet/lnet/api-ni.c
@@ -1762,7 +1762,7 @@ void lnet_lib_exit(void)
 	struct lnet_handle_md md_handle;
 	struct lnet_ni *ni;
 	struct list_head net_head;
-	lnet_remotenet_t *rnet;
+	struct lnet_remotenet *rnet;
 	int rc;
 
 	INIT_LIST_HEAD(&net_head);
diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c b/drivers/staging/lustre/lnet/lnet/lib-move.c
index 9d1ab1f..3581100 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-move.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-move.c
@@ -998,7 +998,7 @@
 lnet_find_route_locked(struct lnet_ni *ni, lnet_nid_t target,
 		       lnet_nid_t rtr_nid)
 {
-	lnet_remotenet_t *rnet;
+	struct lnet_remotenet *rnet;
 	struct lnet_route *route;
 	struct lnet_route *best_route;
 	struct lnet_route *last_route;
@@ -2291,7 +2291,7 @@ struct lnet_msg *
 {
 	struct list_head *e;
 	struct lnet_ni *ni;
-	lnet_remotenet_t *rnet;
+	struct lnet_remotenet *rnet;
 	__u32 dstnet = LNET_NIDNET(dstnid);
 	int hops;
 	int cpt;
@@ -2348,7 +2348,7 @@ struct lnet_msg *
 
 	rn_list = lnet_net2rnethash(dstnet);
 	list_for_each(e, rn_list) {
-		rnet = list_entry(e, lnet_remotenet_t, lrn_list);
+		rnet = list_entry(e, struct lnet_remotenet, lrn_list);
 
 		if (rnet->lrn_net == dstnet) {
 			struct lnet_route *route;
diff --git a/drivers/staging/lustre/lnet/lnet/router.c b/drivers/staging/lustre/lnet/lnet/router.c
index 8e5af05..9a5faba 100644
--- a/drivers/staging/lustre/lnet/lnet/router.c
+++ b/drivers/staging/lustre/lnet/lnet/router.c
@@ -217,10 +217,10 @@
 	}
 }
 
-lnet_remotenet_t *
+struct lnet_remotenet *
 lnet_find_net_locked(__u32 net)
 {
-	lnet_remotenet_t *rnet;
+	struct lnet_remotenet *rnet;
 	struct list_head *tmp;
 	struct list_head *rn_list;
 
@@ -228,7 +228,7 @@
 
 	rn_list = lnet_net2rnethash(net);
 	list_for_each(tmp, rn_list) {
-		rnet = list_entry(tmp, lnet_remotenet_t, lrn_list);
+		rnet = list_entry(tmp, struct lnet_remotenet, lrn_list);
 
 		if (rnet->lrn_net == net)
 			return rnet;
@@ -268,7 +268,7 @@ static void lnet_shuffle_seed(void)
 
 /* NB expects LNET_LOCK held */
 static void
-lnet_add_route_to_rnet(lnet_remotenet_t *rnet, struct lnet_route *route)
+lnet_add_route_to_rnet(struct lnet_remotenet *rnet, struct lnet_route *route)
 {
 	unsigned int len = 0;
 	unsigned int offset = 0;
@@ -299,8 +299,8 @@ static void lnet_shuffle_seed(void)
 	       unsigned int priority)
 {
 	struct list_head *e;
-	lnet_remotenet_t *rnet;
-	lnet_remotenet_t *rnet2;
+	struct lnet_remotenet *rnet;
+	struct lnet_remotenet *rnet2;
 	struct lnet_route *route;
 	struct lnet_ni *ni;
 	int add_route;
@@ -416,7 +416,7 @@ static void lnet_shuffle_seed(void)
 int
 lnet_check_routes(void)
 {
-	lnet_remotenet_t *rnet;
+	struct lnet_remotenet *rnet;
 	struct lnet_route *route;
 	struct lnet_route *route2;
 	struct list_head *e1;
@@ -430,7 +430,7 @@ static void lnet_shuffle_seed(void)
 	for (i = 0; i < LNET_REMOTE_NETS_HASH_SIZE; i++) {
 		rn_list = &the_lnet.ln_remote_nets_hash[i];
 		list_for_each(e1, rn_list) {
-			rnet = list_entry(e1, lnet_remotenet_t, lrn_list);
+			rnet = list_entry(e1, struct lnet_remotenet, lrn_list);
 
 			route2 = NULL;
 			list_for_each(e2, &rnet->lrn_routes) {
@@ -472,7 +472,7 @@ static void lnet_shuffle_seed(void)
 lnet_del_route(__u32 net, lnet_nid_t gw_nid)
 {
 	struct lnet_peer *gateway;
-	lnet_remotenet_t *rnet;
+	struct lnet_remotenet *rnet;
 	struct lnet_route *route;
 	struct list_head *e1;
 	struct list_head *e2;
@@ -495,7 +495,7 @@ static void lnet_shuffle_seed(void)
 
  again:
 	list_for_each(e1, rn_list) {
-		rnet = list_entry(e1, lnet_remotenet_t, lrn_list);
+		rnet = list_entry(e1, struct lnet_remotenet, lrn_list);
 
 		if (!(net == LNET_NIDNET(LNET_NID_ANY) ||
 		      net == rnet->lrn_net))
@@ -588,7 +588,7 @@ int lnet_get_rtr_pool_cfg(int idx, struct lnet_ioctl_pool_cfg *pool_cfg)
 {
 	struct list_head *e1;
 	struct list_head *e2;
-	lnet_remotenet_t *rnet;
+	struct lnet_remotenet *rnet;
 	struct lnet_route *route;
 	int cpt;
 	int i;
@@ -599,7 +599,7 @@ int lnet_get_rtr_pool_cfg(int idx, struct lnet_ioctl_pool_cfg *pool_cfg)
 	for (i = 0; i < LNET_REMOTE_NETS_HASH_SIZE; i++) {
 		rn_list = &the_lnet.ln_remote_nets_hash[i];
 		list_for_each(e1, rn_list) {
-			rnet = list_entry(e1, lnet_remotenet_t, lrn_list);
+			rnet = list_entry(e1, struct lnet_remotenet, lrn_list);
 
 			list_for_each(e2, &rnet->lrn_routes) {
 				route = list_entry(e2, struct lnet_route,
diff --git a/drivers/staging/lustre/lnet/lnet/router_proc.c b/drivers/staging/lustre/lnet/lnet/router_proc.c
index 1b2817c..779ec69 100644
--- a/drivers/staging/lustre/lnet/lnet/router_proc.c
+++ b/drivers/staging/lustre/lnet/lnet/router_proc.c
@@ -172,7 +172,7 @@ static int proc_lnet_routes(struct ctl_table *table, int write,
 		struct list_head *n;
 		struct list_head *r;
 		struct lnet_route *route = NULL;
-		lnet_remotenet_t *rnet  = NULL;
+		struct lnet_remotenet *rnet  = NULL;
 		int skip  = off - 1;
 		struct list_head *rn_list;
 		int i;
@@ -191,7 +191,7 @@ static int proc_lnet_routes(struct ctl_table *table, int write,
 			n = rn_list->next;
 
 			while (n != rn_list && !route) {
-				rnet = list_entry(n, lnet_remotenet_t,
+				rnet = list_entry(n, struct lnet_remotenet,
 						  lrn_list);
 
 				r = rnet->lrn_routes.next;
-- 
1.8.3.1

  parent reply	other threads:[~2017-02-27  0:59 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27  0:41 [PATCH 00/34] staging: lustre: lnet: remove most of typedefs from LNet headers James Simmons
2017-02-27  0:41 ` [PATCH 01/34] staging: lustre: socklnd: change UAPI typedefs to proper structure James Simmons
2017-02-27  0:41 ` [PATCH 02/34] staging: lustre: lnet: change lnet_handle_eq_t to proper struct James Simmons
2017-02-27  0:41 ` [PATCH 03/34] staging: lustre: lnet: change lnet_handle_md_t " James Simmons
2017-02-27  0:41 ` [PATCH 04/34] staging: lustre: lnet: change lnet_handle_me_t " James Simmons
2017-02-27  0:41 ` [PATCH 05/34] staging: lustre: lnet: remove generic lnet_handle_any_t James Simmons
2017-02-27  0:41 ` [PATCH 06/34] staging: lustre: lnet: change lnet_msg_t to proper structure James Simmons
2017-02-27  0:41 ` [PATCH 07/34] staging: lustre: lnet: change lnet_libhandle_t " James Simmons
2017-02-27  0:41 ` [PATCH 08/34] staging: lustre: lnet: change lnet_eq_t " James Simmons
2017-02-27  0:41 ` [PATCH 09/34] staging: lustre: lnet: change lnet_me_t " James Simmons
2017-02-27  0:41 ` [PATCH 10/34] staging: lustre: lnet: change lnet_libmd_t " James Simmons
2017-02-27  0:41 ` [PATCH 11/34] staging: lustre: lnet: change lnet_test_peer_t " James Simmons
2017-02-27  0:41 ` [PATCH 12/34] staging: lustre: lnet: change lnd_t " James Simmons
2017-02-27  0:41 ` [PATCH 13/34] staging: lustre: lnet: change lnet_ni_t " James Simmons
2017-02-27  0:41 ` [PATCH 14/34] staging: lustre: lnet: change lnet_rc_data_t " James Simmons
2017-02-27  0:41 ` [PATCH 15/34] staging: lustre: lnet: change lnet_peer_t " James Simmons
2017-02-27  0:41 ` [PATCH 16/34] staging: lustre: lnet: change lnet_route_t " James Simmons
2017-02-27  0:41 ` James Simmons [this message]
2017-02-27  0:41 ` [PATCH 18/34] staging: lustre: lnet: change lnet_rtrbufpool_t " James Simmons
2017-02-27  0:41 ` [PATCH 19/34] staging: lustre: lnet: change lnet_rtrbuf_t " James Simmons
2017-02-27  0:41 ` [PATCH 20/34] staging: lustre: lnet: change lnet_portal_t " James Simmons
2017-02-27  0:41 ` [PATCH 21/34] staging: lustre: lnet: change lnet_t " James Simmons
2017-02-27  0:41 ` [PATCH 22/34] staging: lustre: lnet: give LNET_MATCH* enum a name James Simmons
2017-02-27  0:41 ` [PATCH 23/34] staging: lustre: lnet: change lnet_counter_t to proper structure James Simmons
2017-02-27  0:41 ` [PATCH 24/34] staging: lustre: lnet: change lnet_md_t " James Simmons
2017-02-27  0:41 ` [PATCH 25/34] staging: lustre: lnet: change lnet_event_t " James Simmons
2017-02-27  0:41 ` [PATCH 26/34] staging: lustre: lnet: change lnet_process_id_t " James Simmons
2017-02-27  0:41 ` [PATCH 27/34] staging: lustre: lnet: change lnet_msg_type_t to proper enum James Simmons
2017-02-27  0:41 ` [PATCH 28/34] staging: lustre: lnet: change lnet_unlink_t " James Simmons
2017-02-27  0:41 ` [PATCH 29/34] staging: lustre: lnet: change lnet_ins_pos_t " James Simmons
2017-02-27  0:41 ` [PATCH 30/34] staging: lustre: lnet: change lnet_event_kind_t " James Simmons
2017-02-27  0:41 ` [PATCH 31/34] staging: lustre: lnet: change lnet_ack_req_t " James Simmons
2017-02-27  0:41 ` [PATCH 32/34] staging: lustre: lnet: remove LNET_SEQ_BASETYPE James Simmons
2017-02-27  0:41 ` [PATCH 33/34] staging: lustre: lnet: remove unused lnet_md_iovec_t James Simmons
2017-02-27  0:41 ` [PATCH 34/34] staging: lustre: lnet: use struct bio_vec instead of typedef James Simmons

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=1488156119-19670-18-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@yahoo.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®