Commit 96d564e2 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Martin K. Petersen

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

The ->seq_assign callback only ever had one implementation,
so call the function directly and drop the callback.
Signed-off-by: default avatarHannes Reinecke <hare@suse.com>
Acked-by: default avatarJohannes Thumshirn <jth@kernel.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent f1d61e6e
...@@ -1477,7 +1477,7 @@ static void fc_exch_recv_abts(struct fc_exch *ep, struct fc_frame *rx_fp) ...@@ -1477,7 +1477,7 @@ static void fc_exch_recv_abts(struct fc_exch *ep, struct fc_frame *rx_fp)
* A reference will be held on the exchange/sequence for the caller, which * A reference will be held on the exchange/sequence for the caller, which
* must call fc_seq_release(). * must call fc_seq_release().
*/ */
static struct fc_seq *fc_seq_assign(struct fc_lport *lport, struct fc_frame *fp) struct fc_seq *fc_seq_assign(struct fc_lport *lport, struct fc_frame *fp)
{ {
struct fc_exch_mgr_anchor *ema; struct fc_exch_mgr_anchor *ema;
...@@ -1491,6 +1491,7 @@ static struct fc_seq *fc_seq_assign(struct fc_lport *lport, struct fc_frame *fp) ...@@ -1491,6 +1491,7 @@ static struct fc_seq *fc_seq_assign(struct fc_lport *lport, struct fc_frame *fp)
break; break;
return fr_seq(fp); return fr_seq(fp);
} }
EXPORT_SYMBOL(fc_seq_assign);
/** /**
* fc_seq_release() - Release the hold * fc_seq_release() - Release the hold
...@@ -2653,9 +2654,6 @@ int fc_exch_init(struct fc_lport *lport) ...@@ -2653,9 +2654,6 @@ int fc_exch_init(struct fc_lport *lport)
if (!lport->tt.exch_mgr_reset) if (!lport->tt.exch_mgr_reset)
lport->tt.exch_mgr_reset = fc_exch_mgr_reset; lport->tt.exch_mgr_reset = fc_exch_mgr_reset;
if (!lport->tt.seq_assign)
lport->tt.seq_assign = fc_seq_assign;
if (!lport->tt.seq_release) if (!lport->tt.seq_release)
lport->tt.seq_release = fc_seq_release; lport->tt.seq_release = fc_seq_release;
......
...@@ -461,7 +461,7 @@ static void ft_recv_cmd(struct ft_sess *sess, struct fc_frame *fp) ...@@ -461,7 +461,7 @@ static void ft_recv_cmd(struct ft_sess *sess, struct fc_frame *fp)
cmd->se_cmd.map_tag = tag; cmd->se_cmd.map_tag = tag;
cmd->sess = sess; cmd->sess = sess;
cmd->seq = lport->tt.seq_assign(lport, fp); cmd->seq = fc_seq_assign(lport, fp);
if (!cmd->seq) { if (!cmd->seq) {
percpu_ida_free(&se_sess->sess_tag_pool, tag); percpu_ida_free(&se_sess->sess_tag_pool, tag);
goto busy; goto busy;
......
...@@ -514,13 +514,6 @@ struct libfc_function_template { ...@@ -514,13 +514,6 @@ struct libfc_function_template {
*/ */
void (*get_lesb)(struct fc_lport *, struct fc_els_lesb *lesb); void (*get_lesb)(struct fc_lport *, struct fc_els_lesb *lesb);
/*
* Assign a sequence for an incoming request frame.
*
* STATUS: OPTIONAL
*/
struct fc_seq *(*seq_assign)(struct fc_lport *, struct fc_frame *);
/* /*
* Release the reference on the sequence returned by seq_assign(). * Release the reference on the sequence returned by seq_assign().
* *
...@@ -1006,6 +999,7 @@ struct fc_seq *fc_seq_start_next(struct fc_seq *sp); ...@@ -1006,6 +999,7 @@ struct fc_seq *fc_seq_start_next(struct fc_seq *sp);
void fc_seq_set_resp(struct fc_seq *sp, void fc_seq_set_resp(struct fc_seq *sp,
void (*resp)(struct fc_seq *, struct fc_frame *, void *), void (*resp)(struct fc_seq *, struct fc_frame *, void *),
void *arg); void *arg);
struct fc_seq *fc_seq_assign(struct fc_lport *lport, struct fc_frame *fp);
struct fc_exch_mgr_anchor *fc_exch_mgr_add(struct fc_lport *, struct fc_exch_mgr_anchor *fc_exch_mgr_add(struct fc_lport *,
struct fc_exch_mgr *, struct fc_exch_mgr *,
bool (*match)(struct fc_frame *)); bool (*match)(struct fc_frame *));
......
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