Skip to content

Commit bb46737

Browse files
njavalimartinkpetersen
authored andcommitted
scsi: qla2xxx: Fix regression warnings
drivers/scsi/qla2xxx/qla_dbg.c:2542:7: warning: The scope of the variable 'pbuf' can be reduced. [variableScope] drivers/scsi/qla2xxx/qla_init.c:3615:6: warning: Variable 'rc' is assigned a value that is never used. [unreadVariable] drivers/scsi/qla2xxx/qla_isr.c:81:11-29: WARNING: dma_alloc_coherent use in rsp_els already zeroes out memory, so memset is not needed drivers/scsi/qla2xxx/qla_mbx.c:4889:15-33: WARNING: dma_alloc_coherent use in els_cmd_map already zeroes out memory, so memset is not needed [mkp: added newline after variable declaration] Link: https://lore.kernel.org/r/[email protected] Reported-by: kbuild test robot <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 1d95b8a commit bb46737

File tree

4 files changed

+2
-6
lines changed

4 files changed

+2
-6
lines changed

drivers/scsi/qla2xxx/qla_dbg.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2539,14 +2539,15 @@ ql_dbg(uint level, scsi_qla_host_t *vha, uint id, const char *fmt, ...)
25392539
{
25402540
va_list va;
25412541
struct va_format vaf;
2542-
char pbuf[64];
25432542

25442543
va_start(va, fmt);
25452544

25462545
vaf.fmt = fmt;
25472546
vaf.va = &va;
25482547

25492548
if (!ql_mask_match(level)) {
2549+
char pbuf[64];
2550+
25502551
if (vha != NULL) {
25512552
const struct pci_dev *pdev = vha->hw->pdev;
25522553
/* <module-name> <msg-id>:<host> Message */

drivers/scsi/qla2xxx/qla_init.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3611,8 +3611,6 @@ qla24xx_detect_sfp(scsi_qla_host_t *vha)
36113611
ha->lr_distance = LR_DISTANCE_5K;
36123612
}
36133613

3614-
if (!vha->flags.init_done)
3615-
rc = QLA_SUCCESS;
36163614
out:
36173615
ql_dbg(ql_dbg_async, vha, 0x507b,
36183616
"SFP detect: %s-Range SFP %s (nvr=%x ll=%x lr=%x lrd=%x).\n",

drivers/scsi/qla2xxx/qla_isr.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ qla24xx_process_abts(struct scsi_qla_host *vha, void *pkt)
8787
}
8888

8989
/* terminate exchange */
90-
memset(rsp_els, 0, sizeof(*rsp_els));
9190
rsp_els->entry_type = ELS_IOCB_TYPE;
9291
rsp_els->entry_count = 1;
9392
rsp_els->nport_handle = ~0;

drivers/scsi/qla2xxx/qla_mbx.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4894,8 +4894,6 @@ qla25xx_set_els_cmds_supported(scsi_qla_host_t *vha)
48944894
return QLA_MEMORY_ALLOC_FAILED;
48954895
}
48964896

4897-
memset(els_cmd_map, 0, ELS_CMD_MAP_SIZE);
4898-
48994897
els_cmd_map[index] |= 1 << bit;
49004898

49014899
mcp->mb[0] = MBC_SET_RNID_PARAMS;

0 commit comments

Comments
 (0)