Commit 9e75b5e2 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

scsi: qla2xxx: Change data_dsd into an array

This patch does not change any functionality but fixes a Coverity complaint
about using a scalar as an array.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Tested-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
Reviewed-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent bb6efb1e
...@@ -1852,7 +1852,7 @@ struct crc_context { ...@@ -1852,7 +1852,7 @@ struct crc_context {
uint16_t reserved_2; uint16_t reserved_2;
uint16_t reserved_3; uint16_t reserved_3;
uint32_t reserved_4; uint32_t reserved_4;
struct dsd64 data_dsd; struct dsd64 data_dsd[1];
uint32_t reserved_5[2]; uint32_t reserved_5[2];
uint32_t reserved_6; uint32_t reserved_6;
} nobundling; } nobundling;
...@@ -1862,7 +1862,7 @@ struct crc_context { ...@@ -1862,7 +1862,7 @@ struct crc_context {
uint16_t reserved_1; uint16_t reserved_1;
__le16 dseg_count; /* Data segment count */ __le16 dseg_count; /* Data segment count */
uint32_t reserved_2; uint32_t reserved_2;
struct dsd64 data_dsd; struct dsd64 data_dsd[1];
struct dsd64 dif_dsd; struct dsd64 dif_dsd;
} bundling; } bundling;
} u; } u;
......
...@@ -1516,7 +1516,7 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt, ...@@ -1516,7 +1516,7 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt,
} }
if (!bundling) { if (!bundling) {
cur_dsd = &crc_ctx_pkt->u.nobundling.data_dsd; cur_dsd = &crc_ctx_pkt->u.nobundling.data_dsd[0];
} else { } else {
/* /*
* Configure Bundling if we need to fetch interlaving * Configure Bundling if we need to fetch interlaving
...@@ -1526,7 +1526,7 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt, ...@@ -1526,7 +1526,7 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt,
crc_ctx_pkt->u.bundling.dif_byte_count = cpu_to_le32(dif_bytes); crc_ctx_pkt->u.bundling.dif_byte_count = cpu_to_le32(dif_bytes);
crc_ctx_pkt->u.bundling.dseg_count = cpu_to_le16(tot_dsds - crc_ctx_pkt->u.bundling.dseg_count = cpu_to_le16(tot_dsds -
tot_prot_dsds); tot_prot_dsds);
cur_dsd = &crc_ctx_pkt->u.bundling.data_dsd; cur_dsd = &crc_ctx_pkt->u.bundling.data_dsd[0];
} }
/* Finish the common fields of CRC pkt */ /* Finish the common fields of CRC pkt */
......
...@@ -3163,7 +3163,7 @@ qlt_build_ctio_crc2_pkt(struct qla_qpair *qpair, struct qla_tgt_prm *prm) ...@@ -3163,7 +3163,7 @@ qlt_build_ctio_crc2_pkt(struct qla_qpair *qpair, struct qla_tgt_prm *prm)
pkt->crc_context_len = CRC_CONTEXT_LEN_FW; pkt->crc_context_len = CRC_CONTEXT_LEN_FW;
if (!bundling) { if (!bundling) {
cur_dsd = &crc_ctx_pkt->u.nobundling.data_dsd; cur_dsd = &crc_ctx_pkt->u.nobundling.data_dsd[0];
} else { } else {
/* /*
* Configure Bundling if we need to fetch interlaving * Configure Bundling if we need to fetch interlaving
...@@ -3173,7 +3173,7 @@ qlt_build_ctio_crc2_pkt(struct qla_qpair *qpair, struct qla_tgt_prm *prm) ...@@ -3173,7 +3173,7 @@ qlt_build_ctio_crc2_pkt(struct qla_qpair *qpair, struct qla_tgt_prm *prm)
crc_ctx_pkt->u.bundling.dif_byte_count = cpu_to_le32(dif_bytes); crc_ctx_pkt->u.bundling.dif_byte_count = cpu_to_le32(dif_bytes);
crc_ctx_pkt->u.bundling.dseg_count = crc_ctx_pkt->u.bundling.dseg_count =
cpu_to_le16(prm->tot_dsds - prm->prot_seg_cnt); cpu_to_le16(prm->tot_dsds - prm->prot_seg_cnt);
cur_dsd = &crc_ctx_pkt->u.bundling.data_dsd; cur_dsd = &crc_ctx_pkt->u.bundling.data_dsd[0];
} }
/* Finish the common fields of CRC pkt */ /* Finish the common fields of CRC pkt */
......
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