提交 e76ee65f 编写于 作者: H Hannes Reinecke 提交者: Martin K. Petersen

scsi: libfc: Replace ->rport_recv_req callback with function call

The ->rport_recv_req callback only ever had one implementation,
so we can as well call it directly and drop the callback.
Signed-off-by: NHannes Reinecke <hare@suse.com>
Acked-by: NJohannes Thumshirn <jth@kernel.org>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 c96c792a
...@@ -902,7 +902,7 @@ static void fc_lport_recv_els_req(struct fc_lport *lport, ...@@ -902,7 +902,7 @@ static void fc_lport_recv_els_req(struct fc_lport *lport,
/* /*
* Check opcode. * Check opcode.
*/ */
recv = lport->tt.rport_recv_req; recv = fc_rport_recv_req;
switch (fc_frame_payload_op(fp)) { switch (fc_frame_payload_op(fp)) {
case ELS_FLOGI: case ELS_FLOGI:
if (!lport->point_to_multipoint) if (!lport->point_to_multipoint)
......
...@@ -1786,7 +1786,7 @@ static void fc_rport_recv_els_req(struct fc_lport *lport, struct fc_frame *fp) ...@@ -1786,7 +1786,7 @@ static void fc_rport_recv_els_req(struct fc_lport *lport, struct fc_frame *fp)
* *
* Reference counting: does not modify kref * Reference counting: does not modify kref
*/ */
static void fc_rport_recv_req(struct fc_lport *lport, struct fc_frame *fp) void fc_rport_recv_req(struct fc_lport *lport, struct fc_frame *fp)
{ {
struct fc_seq_els_data els_data; struct fc_seq_els_data els_data;
...@@ -1823,6 +1823,7 @@ static void fc_rport_recv_req(struct fc_lport *lport, struct fc_frame *fp) ...@@ -1823,6 +1823,7 @@ static void fc_rport_recv_req(struct fc_lport *lport, struct fc_frame *fp)
break; break;
} }
} }
EXPORT_SYMBOL(fc_rport_recv_req);
/** /**
* fc_rport_recv_plogi_req() - Handler for Port Login (PLOGI) requests * fc_rport_recv_plogi_req() - Handler for Port Login (PLOGI) requests
...@@ -2185,9 +2186,6 @@ static void fc_rport_flush_queue(void) ...@@ -2185,9 +2186,6 @@ static void fc_rport_flush_queue(void)
*/ */
int fc_rport_init(struct fc_lport *lport) int fc_rport_init(struct fc_lport *lport)
{ {
if (!lport->tt.rport_recv_req)
lport->tt.rport_recv_req = fc_rport_recv_req;
if (!lport->tt.rport_flush_queue) if (!lport->tt.rport_flush_queue)
lport->tt.rport_flush_queue = fc_rport_flush_queue; lport->tt.rport_flush_queue = fc_rport_flush_queue;
......
...@@ -609,13 +609,6 @@ struct libfc_function_template { ...@@ -609,13 +609,6 @@ struct libfc_function_template {
void (*lport_set_port_id)(struct fc_lport *, u32 port_id, void (*lport_set_port_id)(struct fc_lport *, u32 port_id,
struct fc_frame *); struct fc_frame *);
/*
* Receive a request from a remote port.
*
* STATUS: OPTIONAL
*/
void (*rport_recv_req)(struct fc_lport *, struct fc_frame *);
/* /*
* Callback routine after the remote port is logged in * Callback routine after the remote port is logged in
* *
...@@ -1000,6 +993,7 @@ struct fc_rport_priv *fc_rport_create(struct fc_lport *, u32); ...@@ -1000,6 +993,7 @@ struct fc_rport_priv *fc_rport_create(struct fc_lport *, u32);
void fc_rport_destroy(struct kref *kref); void fc_rport_destroy(struct kref *kref);
int fc_rport_login(struct fc_rport_priv *rdata); int fc_rport_login(struct fc_rport_priv *rdata);
int fc_rport_logoff(struct fc_rport_priv *rdata); int fc_rport_logoff(struct fc_rport_priv *rdata);
void fc_rport_recv_req(struct fc_lport *lport, struct fc_frame *fp);
/* /*
* DISCOVERY LAYER * DISCOVERY LAYER
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册