diff options
author | Hannes Reinecke <hare@suse.de> | 2016-10-18 04:01:53 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-11-08 17:29:56 -0500 |
commit | 96d564e24ac2b69fbfa2b81d48069ffeede549d7 (patch) | |
tree | 782b822b4c0235e00d10297eb801666e9cd4d021 | |
parent | f1d61e6e682cd241c145e6268be3a9f30af934eb (diff) |
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: Hannes Reinecke <hare@suse.com>
Acked-by: Johannes Thumshirn <jth@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/libfc/fc_exch.c | 6 | ||||
-rw-r--r-- | drivers/target/tcm_fc/tfc_cmd.c | 2 | ||||
-rw-r--r-- | include/scsi/libfc.h | 8 |
3 files changed, 4 insertions, 12 deletions
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index ceeccd7b3ba7..efb6a4b7a62a 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c | |||
@@ -1477,7 +1477,7 @@ reject: | |||
1477 | * A reference will be held on the exchange/sequence for the caller, which | 1477 | * A reference will be held on the exchange/sequence for the caller, which |
1478 | * must call fc_seq_release(). | 1478 | * must call fc_seq_release(). |
1479 | */ | 1479 | */ |
1480 | static struct fc_seq *fc_seq_assign(struct fc_lport *lport, struct fc_frame *fp) | 1480 | struct fc_seq *fc_seq_assign(struct fc_lport *lport, struct fc_frame *fp) |
1481 | { | 1481 | { |
1482 | struct fc_exch_mgr_anchor *ema; | 1482 | struct fc_exch_mgr_anchor *ema; |
1483 | 1483 | ||
@@ -1491,6 +1491,7 @@ static struct fc_seq *fc_seq_assign(struct fc_lport *lport, struct fc_frame *fp) | |||
1491 | break; | 1491 | break; |
1492 | return fr_seq(fp); | 1492 | return fr_seq(fp); |
1493 | } | 1493 | } |
1494 | EXPORT_SYMBOL(fc_seq_assign); | ||
1494 | 1495 | ||
1495 | /** | 1496 | /** |
1496 | * fc_seq_release() - Release the hold | 1497 | * fc_seq_release() - Release the hold |
@@ -2653,9 +2654,6 @@ int fc_exch_init(struct fc_lport *lport) | |||
2653 | if (!lport->tt.exch_mgr_reset) | 2654 | if (!lport->tt.exch_mgr_reset) |
2654 | lport->tt.exch_mgr_reset = fc_exch_mgr_reset; | 2655 | lport->tt.exch_mgr_reset = fc_exch_mgr_reset; |
2655 | 2656 | ||
2656 | if (!lport->tt.seq_assign) | ||
2657 | lport->tt.seq_assign = fc_seq_assign; | ||
2658 | |||
2659 | if (!lport->tt.seq_release) | 2657 | if (!lport->tt.seq_release) |
2660 | lport->tt.seq_release = fc_seq_release; | 2658 | lport->tt.seq_release = fc_seq_release; |
2661 | 2659 | ||
diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c index d6d06644f1da..962eff3d190d 100644 --- a/drivers/target/tcm_fc/tfc_cmd.c +++ b/drivers/target/tcm_fc/tfc_cmd.c | |||
@@ -461,7 +461,7 @@ static void ft_recv_cmd(struct ft_sess *sess, struct fc_frame *fp) | |||
461 | 461 | ||
462 | cmd->se_cmd.map_tag = tag; | 462 | cmd->se_cmd.map_tag = tag; |
463 | cmd->sess = sess; | 463 | cmd->sess = sess; |
464 | cmd->seq = lport->tt.seq_assign(lport, fp); | 464 | cmd->seq = fc_seq_assign(lport, fp); |
465 | if (!cmd->seq) { | 465 | if (!cmd->seq) { |
466 | percpu_ida_free(&se_sess->sess_tag_pool, tag); | 466 | percpu_ida_free(&se_sess->sess_tag_pool, tag); |
467 | goto busy; | 467 | goto busy; |
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index e8669f9f2e50..2baa2553c977 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
@@ -515,13 +515,6 @@ struct libfc_function_template { | |||
515 | void (*get_lesb)(struct fc_lport *, struct fc_els_lesb *lesb); | 515 | void (*get_lesb)(struct fc_lport *, struct fc_els_lesb *lesb); |
516 | 516 | ||
517 | /* | 517 | /* |
518 | * Assign a sequence for an incoming request frame. | ||
519 | * | ||
520 | * STATUS: OPTIONAL | ||
521 | */ | ||
522 | struct fc_seq *(*seq_assign)(struct fc_lport *, struct fc_frame *); | ||
523 | |||
524 | /* | ||
525 | * Release the reference on the sequence returned by seq_assign(). | 518 | * Release the reference on the sequence returned by seq_assign(). |
526 | * | 519 | * |
527 | * STATUS: OPTIONAL | 520 | * STATUS: OPTIONAL |
@@ -1006,6 +999,7 @@ struct fc_seq *fc_seq_start_next(struct fc_seq *sp); | |||
1006 | void fc_seq_set_resp(struct fc_seq *sp, | 999 | void fc_seq_set_resp(struct fc_seq *sp, |
1007 | void (*resp)(struct fc_seq *, struct fc_frame *, void *), | 1000 | void (*resp)(struct fc_seq *, struct fc_frame *, void *), |
1008 | void *arg); | 1001 | void *arg); |
1002 | struct fc_seq *fc_seq_assign(struct fc_lport *lport, struct fc_frame *fp); | ||
1009 | struct fc_exch_mgr_anchor *fc_exch_mgr_add(struct fc_lport *, | 1003 | struct fc_exch_mgr_anchor *fc_exch_mgr_add(struct fc_lport *, |
1010 | struct fc_exch_mgr *, | 1004 | struct fc_exch_mgr *, |
1011 | bool (*match)(struct fc_frame *)); | 1005 | bool (*match)(struct fc_frame *)); |