summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/tcm_qla2xxx.c
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2021-03-21 00:23:54 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2021-03-25 02:47:20 +0100
commit634b9774d335020e2cd55950a6c1242e7e3bd1e7 (patch)
tree0fd416b4938662b5822fd71aee25f568bfac83e3 /drivers/scsi/qla2xxx/tcm_qla2xxx.c
parentscsi: ibmvscsi_tgt: Remove duplicate section 'NOTE' (diff)
downloadlinux-634b9774d335020e2cd55950a6c1242e7e3bd1e7.tar.xz
linux-634b9774d335020e2cd55950a6c1242e7e3bd1e7.zip
scsi: qla2xxx: Constify struct qla_tgt_func_tmpl
Since the target function pointers are not modified at runtime, declare the data structure with the target function pointers const. Link: https://lore.kernel.org/r/20210320232359.941-3-bvanassche@acm.org Cc: Quinn Tran <qutran@marvell.com> Cc: Mike Christie <michael.christie@oracle.com> Reviewed-by: Daniel Wagner <dwagner@suse.de> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Reviewed-by: Lee Duncan <lduncan@suse.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/tcm_qla2xxx.c')
-rw-r--r--drivers/scsi/qla2xxx/tcm_qla2xxx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index 12a2265eb2de..e7d3acf7a98c 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -1582,7 +1582,7 @@ static void tcm_qla2xxx_update_sess(struct fc_port *sess, port_id_t s_id,
/*
* Calls into tcm_qla2xxx used by qla2xxx LLD I/O path.
*/
-static struct qla_tgt_func_tmpl tcm_qla2xxx_template = {
+static const struct qla_tgt_func_tmpl tcm_qla2xxx_template = {
.find_cmd_by_tag = tcm_qla2xxx_find_cmd_by_tag,
.handle_cmd = tcm_qla2xxx_handle_cmd,
.handle_data = tcm_qla2xxx_handle_data,