Commit 168c7a13 authored by Shraddha Barke's avatar Shraddha Barke Committed by Greg Kroah-Hartman

Staging: lustre: lnet: Remove typedef srpc_server_rpc_t

The Linux kernel coding style guidelines suggest not using typedefs
for structure types. This patch gets rid of the typedef for
srpc_server_rpc_t.
Signed-off-by: default avatarShraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e72d9799
...@@ -358,7 +358,7 @@ brw_client_done_rpc(sfw_test_unit_t *tsu, srpc_client_rpc_t *rpc) ...@@ -358,7 +358,7 @@ brw_client_done_rpc(sfw_test_unit_t *tsu, srpc_client_rpc_t *rpc)
} }
static void static void
brw_server_rpc_done(srpc_server_rpc_t *rpc) brw_server_rpc_done(struct srpc_server_rpc *rpc)
{ {
srpc_bulk_t *blk = rpc->srpc_bulk; srpc_bulk_t *blk = rpc->srpc_bulk;
...@@ -378,7 +378,7 @@ brw_server_rpc_done(srpc_server_rpc_t *rpc) ...@@ -378,7 +378,7 @@ brw_server_rpc_done(srpc_server_rpc_t *rpc)
} }
static int static int
brw_bulk_ready(srpc_server_rpc_t *rpc, int status) brw_bulk_ready(struct srpc_server_rpc *rpc, int status)
{ {
__u64 magic = BRW_MAGIC; __u64 magic = BRW_MAGIC;
srpc_brw_reply_t *reply = &rpc->srpc_replymsg.msg_body.brw_reply; srpc_brw_reply_t *reply = &rpc->srpc_replymsg.msg_body.brw_reply;
......
...@@ -1883,7 +1883,7 @@ lstcon_session_feats_check(unsigned feats) ...@@ -1883,7 +1883,7 @@ lstcon_session_feats_check(unsigned feats)
} }
static int static int
lstcon_acceptor_handle(srpc_server_rpc_t *rpc) lstcon_acceptor_handle(struct srpc_server_rpc *rpc)
{ {
srpc_msg_t *rep = &rpc->srpc_replymsg; srpc_msg_t *rep = &rpc->srpc_replymsg;
srpc_msg_t *req = &rpc->srpc_reqstbuf->buf_msg; srpc_msg_t *req = &rpc->srpc_reqstbuf->buf_msg;
......
...@@ -111,7 +111,7 @@ static struct smoketest_framework { ...@@ -111,7 +111,7 @@ static struct smoketest_framework {
spinlock_t fw_lock; /* serialise */ spinlock_t fw_lock; /* serialise */
sfw_session_t *fw_session; /* _the_ session */ sfw_session_t *fw_session; /* _the_ session */
int fw_shuttingdown; /* shutdown in progress */ int fw_shuttingdown; /* shutdown in progress */
srpc_server_rpc_t *fw_active_srpc; /* running RPC */ struct srpc_server_rpc *fw_active_srpc;/* running RPC */
} sfw_data; } sfw_data;
/* forward ref's */ /* forward ref's */
...@@ -722,7 +722,7 @@ sfw_unpack_addtest_req(srpc_msg_t *msg) ...@@ -722,7 +722,7 @@ sfw_unpack_addtest_req(srpc_msg_t *msg)
} }
static int static int
sfw_add_test_instance(sfw_batch_t *tsb, srpc_server_rpc_t *rpc) sfw_add_test_instance(sfw_batch_t *tsb, struct srpc_server_rpc *rpc)
{ {
srpc_msg_t *msg = &rpc->srpc_reqstbuf->buf_msg; srpc_msg_t *msg = &rpc->srpc_reqstbuf->buf_msg;
srpc_test_reqst_t *req = &msg->msg_body.tes_reqst; srpc_test_reqst_t *req = &msg->msg_body.tes_reqst;
...@@ -1091,7 +1091,7 @@ sfw_query_batch(sfw_batch_t *tsb, int testidx, srpc_batch_reply_t *reply) ...@@ -1091,7 +1091,7 @@ sfw_query_batch(sfw_batch_t *tsb, int testidx, srpc_batch_reply_t *reply)
} }
void void
sfw_free_pages(srpc_server_rpc_t *rpc) sfw_free_pages(struct srpc_server_rpc *rpc)
{ {
srpc_free_bulk(rpc->srpc_bulk); srpc_free_bulk(rpc->srpc_bulk);
rpc->srpc_bulk = NULL; rpc->srpc_bulk = NULL;
...@@ -1112,7 +1112,7 @@ sfw_alloc_pages(struct srpc_server_rpc *rpc, int cpt, int npages, int len, ...@@ -1112,7 +1112,7 @@ sfw_alloc_pages(struct srpc_server_rpc *rpc, int cpt, int npages, int len,
} }
static int static int
sfw_add_test(srpc_server_rpc_t *rpc) sfw_add_test(struct srpc_server_rpc *rpc)
{ {
sfw_session_t *sn = sfw_data.fw_session; sfw_session_t *sn = sfw_data.fw_session;
srpc_test_reply_t *reply = &rpc->srpc_replymsg.msg_body.tes_reply; srpc_test_reply_t *reply = &rpc->srpc_replymsg.msg_body.tes_reply;
......
...@@ -859,7 +859,7 @@ srpc_prepare_bulk(srpc_client_rpc_t *rpc) ...@@ -859,7 +859,7 @@ srpc_prepare_bulk(srpc_client_rpc_t *rpc)
} }
static int static int
srpc_do_bulk(srpc_server_rpc_t *rpc) srpc_do_bulk(struct srpc_server_rpc *rpc)
{ {
srpc_event_t *ev = &rpc->srpc_ev; srpc_event_t *ev = &rpc->srpc_ev;
srpc_bulk_t *bk = rpc->srpc_bulk; srpc_bulk_t *bk = rpc->srpc_bulk;
...@@ -887,7 +887,7 @@ srpc_do_bulk(srpc_server_rpc_t *rpc) ...@@ -887,7 +887,7 @@ srpc_do_bulk(srpc_server_rpc_t *rpc)
/* only called from srpc_handle_rpc */ /* only called from srpc_handle_rpc */
static void static void
srpc_server_rpc_done(srpc_server_rpc_t *rpc, int status) srpc_server_rpc_done(struct srpc_server_rpc *rpc, int status)
{ {
struct srpc_service_cd *scd = rpc->srpc_scd; struct srpc_service_cd *scd = rpc->srpc_scd;
struct srpc_service *sv = scd->scd_svc; struct srpc_service *sv = scd->scd_svc;
...@@ -1397,7 +1397,7 @@ srpc_lnet_ev_handler(lnet_event_t *ev) ...@@ -1397,7 +1397,7 @@ srpc_lnet_ev_handler(lnet_event_t *ev)
struct srpc_service_cd *scd; struct srpc_service_cd *scd;
srpc_event_t *rpcev = ev->md.user_ptr; srpc_event_t *rpcev = ev->md.user_ptr;
srpc_client_rpc_t *crpc; srpc_client_rpc_t *crpc;
srpc_server_rpc_t *srpc; struct srpc_server_rpc *srpc;
srpc_buffer_t *buffer; srpc_buffer_t *buffer;
srpc_service_t *sv; srpc_service_t *sv;
srpc_msg_t *msg; srpc_msg_t *msg;
......
...@@ -182,7 +182,7 @@ typedef struct swi_workitem { ...@@ -182,7 +182,7 @@ typedef struct swi_workitem {
} swi_workitem_t; } swi_workitem_t;
/* server-side state of a RPC */ /* server-side state of a RPC */
typedef struct srpc_server_rpc { struct srpc_server_rpc {
/* chain on srpc_service::*_rpcq */ /* chain on srpc_service::*_rpcq */
struct list_head srpc_list; struct list_head srpc_list;
struct srpc_service_cd *srpc_scd; struct srpc_service_cd *srpc_scd;
...@@ -198,7 +198,7 @@ typedef struct srpc_server_rpc { ...@@ -198,7 +198,7 @@ typedef struct srpc_server_rpc {
unsigned int srpc_aborted; /* being given up */ unsigned int srpc_aborted; /* being given up */
int srpc_status; int srpc_status;
void (*srpc_done)(struct srpc_server_rpc *); void (*srpc_done)(struct srpc_server_rpc *);
} srpc_server_rpc_t; };
/* client-side state of a RPC */ /* client-side state of a RPC */
typedef struct srpc_client_rpc { typedef struct srpc_client_rpc {
...@@ -318,8 +318,8 @@ typedef struct srpc_service { ...@@ -318,8 +318,8 @@ typedef struct srpc_service {
* - sv_handler: process incoming RPC request * - sv_handler: process incoming RPC request
* - sv_bulk_ready: notify bulk data * - sv_bulk_ready: notify bulk data
*/ */
int (*sv_handler) (srpc_server_rpc_t *); int (*sv_handler)(struct srpc_server_rpc *);
int (*sv_bulk_ready) (srpc_server_rpc_t *, int); int (*sv_bulk_ready)(struct srpc_server_rpc *, int);
} srpc_service_t; } srpc_service_t;
typedef struct { typedef struct {
...@@ -423,9 +423,9 @@ void sfw_abort_rpc(srpc_client_rpc_t *rpc); ...@@ -423,9 +423,9 @@ void sfw_abort_rpc(srpc_client_rpc_t *rpc);
void sfw_post_rpc(srpc_client_rpc_t *rpc); void sfw_post_rpc(srpc_client_rpc_t *rpc);
void sfw_client_rpc_done(srpc_client_rpc_t *rpc); void sfw_client_rpc_done(srpc_client_rpc_t *rpc);
void sfw_unpack_message(srpc_msg_t *msg); void sfw_unpack_message(srpc_msg_t *msg);
void sfw_free_pages(srpc_server_rpc_t *rpc); void sfw_free_pages(struct srpc_server_rpc *rpc);
void sfw_add_bulk_page(srpc_bulk_t *bk, struct page *pg, int i); void sfw_add_bulk_page(srpc_bulk_t *bk, struct page *pg, int i);
int sfw_alloc_pages(srpc_server_rpc_t *rpc, int cpt, int npages, int len, int sfw_alloc_pages(struct srpc_server_rpc *rpc, int cpt, int npages, int len,
int sink); int sink);
int sfw_make_session (srpc_mksn_reqst_t *request, srpc_mksn_reply_t *reply); int sfw_make_session (srpc_mksn_reqst_t *request, srpc_mksn_reply_t *reply);
...@@ -440,7 +440,7 @@ void srpc_free_bulk(srpc_bulk_t *bk); ...@@ -440,7 +440,7 @@ void srpc_free_bulk(srpc_bulk_t *bk);
srpc_bulk_t *srpc_alloc_bulk(int cpt, unsigned bulk_npg, unsigned bulk_len, srpc_bulk_t *srpc_alloc_bulk(int cpt, unsigned bulk_npg, unsigned bulk_len,
int sink); int sink);
int srpc_send_rpc(swi_workitem_t *wi); int srpc_send_rpc(swi_workitem_t *wi);
int srpc_send_reply(srpc_server_rpc_t *rpc); int srpc_send_reply(struct srpc_server_rpc *rpc);
int srpc_add_service(srpc_service_t *sv); int srpc_add_service(srpc_service_t *sv);
int srpc_remove_service(srpc_service_t *sv); int srpc_remove_service(srpc_service_t *sv);
void srpc_shutdown_service(srpc_service_t *sv); void srpc_shutdown_service(srpc_service_t *sv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment