diff options
author | Hannes Reinecke <hare@suse.de> | 2016-10-18 11:01:54 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-11-09 01:29:56 +0300 |
commit | 9625cc483b8c41d500ec78f0f2e61d71db1431f5 (patch) | |
tree | 0b237782880d0208992742b2b3b278b924904223 | |
parent | 96d564e24ac2b69fbfa2b81d48069ffeede549d7 (diff) | |
download | linux-9625cc483b8c41d500ec78f0f2e61d71db1431f5.tar.xz |
scsi: libfc: Replace ->seq_release callback with function call
The ->seq_release 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 efb6a4b7a62a..442a6c1d5efc 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c @@ -1497,10 +1497,11 @@ EXPORT_SYMBOL(fc_seq_assign); * fc_seq_release() - Release the hold * @sp: The sequence. */ -static void fc_seq_release(struct fc_seq *sp) +void fc_seq_release(struct fc_seq *sp) { fc_exch_release(fc_seq_exch(sp)); } +EXPORT_SYMBOL(fc_seq_release); /** * fc_exch_recv_req() - Handler for an incoming request @@ -2654,9 +2655,6 @@ int fc_exch_init(struct fc_lport *lport) if (!lport->tt.exch_mgr_reset) lport->tt.exch_mgr_reset = fc_exch_mgr_reset; - if (!lport->tt.seq_release) - lport->tt.seq_release = fc_seq_release; - return 0; } EXPORT_SYMBOL(fc_exch_init); diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c index 962eff3d190d..9af7842b8178 100644 --- a/drivers/target/tcm_fc/tfc_cmd.c +++ b/drivers/target/tcm_fc/tfc_cmd.c @@ -92,7 +92,7 @@ static void ft_free_cmd(struct ft_cmd *cmd) fp = cmd->req_frame; lport = fr_dev(fp); if (fr_seq(fp)) - lport->tt.seq_release(fr_seq(fp)); + fc_seq_release(fr_seq(fp)); fc_frame_free(fp); percpu_ida_free(&sess->se_sess->sess_tag_pool, cmd->se_cmd.map_tag); ft_sess_put(sess); /* undo get from lookup at recv */ diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 2baa2553c977..6f81b28364da 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h @@ -515,13 +515,6 @@ struct libfc_function_template { void (*get_lesb)(struct fc_lport *, struct fc_els_lesb *lesb); /* - * Release the reference on the sequence returned by seq_assign(). - * - * STATUS: OPTIONAL - */ - void (*seq_release)(struct fc_seq *); - - /* * Reset an exchange manager, completing all sequences and exchanges. * If s_id is non-zero, reset only exchanges originating from that FID. * If d_id is non-zero, reset only exchanges sending to that FID. @@ -1000,6 +993,7 @@ void fc_seq_set_resp(struct fc_seq *sp, void (*resp)(struct fc_seq *, struct fc_frame *, void *), void *arg); struct fc_seq *fc_seq_assign(struct fc_lport *lport, struct fc_frame *fp); +void fc_seq_release(struct fc_seq *sp); struct fc_exch_mgr_anchor *fc_exch_mgr_add(struct fc_lport *, struct fc_exch_mgr *, bool (*match)(struct fc_frame *)); |