Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1588435
| From | James Simmons <jsimmons@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 12/34] staging: lustre: lnet: change lnd_t to proper structure |
| Date | 2017-02-27 02:00 +0100 |
| Message-ID | <tfhPr-6aG-1@gated-at.bofh.it> (permalink) |
| References | <tfhFL-675-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Change lnd_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>
---
drivers/staging/lustre/include/linux/lnet/lib-lnet.h | 6 +++---
drivers/staging/lustre/include/linux/lnet/lib-types.h | 6 +++---
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 4 ++--
drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 2 +-
drivers/staging/lustre/lnet/lnet/api-ni.c | 14 +++++++-------
drivers/staging/lustre/lnet/lnet/lo.c | 2 +-
6 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index 685c5d4..9a29769 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -439,7 +439,7 @@ void lnet_res_lh_initialize(struct lnet_res_container *rec,
((1U << the_lnet.ln_remote_nets_hbits) - 1)];
}
-extern lnd_t the_lolnd;
+extern struct lnet_lnd the_lolnd;
extern int avoid_asym_router_failure;
int lnet_cpt_of_nid_locked(lnet_nid_t nid);
@@ -628,8 +628,8 @@ void lnet_copy_kiov2iter(struct iov_iter *to,
void lnet_md_unlink(struct lnet_libmd *md);
void lnet_md_deconstruct(struct lnet_libmd *lmd, lnet_md_t *umd);
-void lnet_register_lnd(lnd_t *lnd);
-void lnet_unregister_lnd(lnd_t *lnd);
+void lnet_register_lnd(struct lnet_lnd *lnd);
+void lnet_unregister_lnd(struct lnet_lnd *lnd);
int lnet_connect(struct socket **sockp, lnet_nid_t peer_nid,
__u32 local_ip, __u32 peer_ip, int peer_port);
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-types.h b/drivers/staging/lustre/include/linux/lnet/lib-types.h
index 59d7143..8a65db2 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-types.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-types.h
@@ -179,7 +179,7 @@ struct lnet_test_peer {
struct lnet_ni; /* forward ref */
-typedef struct lnet_lnd {
+struct lnet_lnd {
/* fields managed by portals */
struct list_head lnd_list; /* stash in the LND table */
int lnd_refcount; /* # active instances */
@@ -243,7 +243,7 @@ struct lnet_test_peer {
/* accept a new connection */
int (*lnd_accept)(struct lnet_ni *ni, struct socket *sock);
-} lnd_t;
+};
struct lnet_tx_queue {
int tq_credits; /* # tx credits free */
@@ -267,7 +267,7 @@ struct lnet_tx_queue {
__u32 *ni_cpts; /* bond NI on some CPTs */
lnet_nid_t ni_nid; /* interface's NID */
void *ni_data; /* instance-specific data */
- lnd_t *ni_lnd; /* procedural interface */
+ struct lnet_lnd *ni_lnd; /* procedural interface */
struct lnet_tx_queue **ni_tx_queues; /* percpt TX queues */
int **ni_refs; /* percpt reference count */
time64_t ni_last_alive;/* when I was last alive */
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
index 6f73454..29a5263 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
@@ -38,7 +38,7 @@
#include <asm/page.h>
#include "o2iblnd.h"
-static lnd_t the_o2iblnd;
+static struct lnet_lnd the_o2iblnd;
struct kib_data kiblnd_data;
@@ -2938,7 +2938,7 @@ static int kiblnd_startup(lnet_ni_t *ni)
return -ENETDOWN;
}
-static lnd_t the_o2iblnd = {
+static struct lnet_lnd the_o2iblnd = {
.lnd_type = O2IBLND,
.lnd_startup = kiblnd_startup,
.lnd_shutdown = kiblnd_shutdown,
diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
index 3b08aff..258507f 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
@@ -39,7 +39,7 @@
#include "socklnd.h"
-static lnd_t the_ksocklnd;
+static struct lnet_lnd the_ksocklnd;
struct ksock_nal_data ksocknal_data;
static struct ksock_interface *
diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c
index aeb9e6f..d31a50b 100644
--- a/drivers/staging/lustre/lnet/lnet/api-ni.c
+++ b/drivers/staging/lustre/lnet/lnet/api-ni.c
@@ -265,15 +265,15 @@ static void lnet_assert_wire_constants(void)
BUILD_BUG_ON((int)sizeof(((struct lnet_hdr *)0)->msg.hello.type) != 4);
}
-static lnd_t *
+static struct lnet_lnd *
lnet_find_lnd_by_type(__u32 type)
{
- lnd_t *lnd;
+ struct lnet_lnd *lnd;
struct list_head *tmp;
/* holding lnd mutex */
list_for_each(tmp, &the_lnet.ln_lnds) {
- lnd = list_entry(tmp, lnd_t, lnd_list);
+ lnd = list_entry(tmp, struct lnet_lnd, lnd_list);
if (lnd->lnd_type == type)
return lnd;
@@ -283,7 +283,7 @@ static void lnet_assert_wire_constants(void)
}
void
-lnet_register_lnd(lnd_t *lnd)
+lnet_register_lnd(struct lnet_lnd *lnd)
{
mutex_lock(&the_lnet.ln_lnd_mutex);
@@ -300,7 +300,7 @@ static void lnet_assert_wire_constants(void)
EXPORT_SYMBOL(lnet_register_lnd);
void
-lnet_unregister_lnd(lnd_t *lnd)
+lnet_unregister_lnd(struct lnet_lnd *lnd)
{
mutex_lock(&the_lnet.ln_lnd_mutex);
@@ -1220,7 +1220,7 @@ struct lnet_libhandle *
struct lnet_ioctl_config_lnd_tunables *lnd_tunables = NULL;
int rc = -EINVAL;
int lnd_type;
- lnd_t *lnd;
+ struct lnet_lnd *lnd;
struct lnet_tx_queue *tq;
int i;
@@ -1475,7 +1475,7 @@ void lnet_lib_exit(void)
while (!list_empty(&the_lnet.ln_lnds))
lnet_unregister_lnd(list_entry(the_lnet.ln_lnds.next,
- lnd_t, lnd_list));
+ struct lnet_lnd, lnd_list));
lnet_destroy_locks();
}
diff --git a/drivers/staging/lustre/lnet/lnet/lo.c b/drivers/staging/lustre/lnet/lnet/lo.c
index 12b6b3a..d11b4f9 100644
--- a/drivers/staging/lustre/lnet/lnet/lo.c
+++ b/drivers/staging/lustre/lnet/lnet/lo.c
@@ -88,7 +88,7 @@
return 0;
}
-lnd_t the_lolnd = {
+struct lnet_lnd the_lolnd = {
/* .lnd_list = */ {&the_lolnd.lnd_list, &the_lolnd.lnd_list},
/* .lnd_refcount = */ 0,
/* .lnd_type = */ LOLND,
--
1.8.3.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/34] staging: lustre: lnet: remove most of typedefs from LNet headers James Simmons <jsimmons@infradead.org> - 2017-02-27 01:50 +0100 [PATCH 01/34] staging: lustre: socklnd: change UAPI typedefs to proper structure James Simmons <jsimmons@infradead.org> - 2017-02-27 01:50 +0100 [PATCH 12/34] staging: lustre: lnet: change lnd_t to proper structure James Simmons <jsimmons@infradead.org> - 2017-02-27 02:00 +0100 [PATCH 09/34] staging: lustre: lnet: change lnet_me_t to proper structure James Simmons <jsimmons@infradead.org> - 2017-02-27 02:00 +0100 [PATCH 11/34] staging: lustre: lnet: change lnet_test_peer_t to proper structure James Simmons <jsimmons@infradead.org> - 2017-02-27 02:00 +0100 [PATCH 06/34] staging: lustre: lnet: change lnet_msg_t to proper structure James Simmons <jsimmons@infradead.org> - 2017-02-27 02:00 +0100 [PATCH 16/34] staging: lustre: lnet: change lnet_route_t to proper structure James Simmons <jsimmons@infradead.org> - 2017-02-27 02:00 +0100 [PATCH 07/34] staging: lustre: lnet: change lnet_libhandle_t to proper structure James Simmons <jsimmons@infradead.org> - 2017-02-27 02:00 +0100 [PATCH 10/34] staging: lustre: lnet: change lnet_libmd_t to proper structure James Simmons <jsimmons@infradead.org> - 2017-02-27 02:00 +0100 [PATCH 05/34] staging: lustre: lnet: remove generic lnet_handle_any_t James Simmons <jsimmons@infradead.org> - 2017-02-27 02:00 +0100 [PATCH 17/34] staging: lustre: lnet: change lnet_remotenet_t to proper structure James Simmons <jsimmons@infradead.org> - 2017-02-27 02:00 +0100 [PATCH 15/34] staging: lustre: lnet: change lnet_peer_t to proper structure James Simmons <jsimmons@infradead.org> - 2017-02-27 02:00 +0100 [PATCH 08/34] staging: lustre: lnet: change lnet_eq_t to proper structure James Simmons <jsimmons@infradead.org> - 2017-02-27 02:00 +0100 [PATCH 27/34] staging: lustre: lnet: change lnet_msg_type_t to proper enum James Simmons <jsimmons@infradead.org> - 2017-02-27 02:10 +0100 [PATCH 23/34] staging: lustre: lnet: change lnet_counter_t to proper structure James Simmons <jsimmons@infradead.org> - 2017-02-27 02:10 +0100 [PATCH 19/34] staging: lustre: lnet: change lnet_rtrbuf_t to proper structure James Simmons <jsimmons@infradead.org> - 2017-02-27 02:10 +0100 [PATCH 21/34] staging: lustre: lnet: change lnet_t to proper structure James Simmons <jsimmons@infradead.org> - 2017-02-27 02:10 +0100 [PATCH 18/34] staging: lustre: lnet: change lnet_rtrbufpool_t to proper structure James Simmons <jsimmons@infradead.org> - 2017-02-27 02:10 +0100 [PATCH 31/34] staging: lustre: lnet: change lnet_ack_req_t to proper enum James Simmons <jsimmons@infradead.org> - 2017-02-27 02:20 +0100 [PATCH 02/34] staging: lustre: lnet: change lnet_handle_eq_t to proper struct James Simmons <jsimmons@infradead.org> - 2017-02-27 02:20 +0100 [PATCH 03/34] staging: lustre: lnet: change lnet_handle_md_t to proper struct James Simmons <jsimmons@infradead.org> - 2017-02-27 02:20 +0100 [PATCH 04/34] staging: lustre: lnet: change lnet_handle_me_t to proper struct James Simmons <jsimmons@infradead.org> - 2017-02-27 02:20 +0100 [PATCH 32/34] staging: lustre: lnet: remove LNET_SEQ_BASETYPE James Simmons <jsimmons@infradead.org> - 2017-02-27 02:20 +0100 [PATCH 14/34] staging: lustre: lnet: change lnet_rc_data_t to proper structure James Simmons <jsimmons@infradead.org> - 2017-02-27 02:20 +0100 [PATCH 28/34] staging: lustre: lnet: change lnet_unlink_t to proper enum James Simmons <jsimmons@infradead.org> - 2017-02-27 02:20 +0100 [PATCH 34/34] staging: lustre: lnet: use struct bio_vec instead of typedef James Simmons <jsimmons@infradead.org> - 2017-02-27 02:20 +0100 [PATCH 33/34] staging: lustre: lnet: remove unused lnet_md_iovec_t James Simmons <jsimmons@infradead.org> - 2017-02-27 02:20 +0100 [PATCH 20/34] staging: lustre: lnet: change lnet_portal_t to proper structure James Simmons <jsimmons@infradead.org> - 2017-02-27 02:30 +0100 [PATCH 24/34] staging: lustre: lnet: change lnet_md_t to proper structure James Simmons <jsimmons@infradead.org> - 2017-02-27 02:40 +0100 [PATCH 29/34] staging: lustre: lnet: change lnet_ins_pos_t to proper enum James Simmons <jsimmons@infradead.org> - 2017-02-27 02:50 +0100 [PATCH 30/34] staging: lustre: lnet: change lnet_event_kind_t to proper enum James Simmons <jsimmons@infradead.org> - 2017-02-27 02:50 +0100 [PATCH 22/34] staging: lustre: lnet: give LNET_MATCH* enum a name James Simmons <jsimmons@infradead.org> - 2017-02-27 03:30 +0100 [PATCH 25/34] staging: lustre: lnet: change lnet_event_t to proper structure James Simmons <jsimmons@infradead.org> - 2017-02-27 03:40 +0100
csiph-web