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/20200403084018.30766-2-njavali@marvell.com Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Nilesh Javali <njavali@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
1d95b8a2d4
commit
bb46737ec0
@ -2539,7 +2539,6 @@ ql_dbg(uint level, scsi_qla_host_t *vha, uint id, const char *fmt, ...)
|
||||
{
|
||||
va_list va;
|
||||
struct va_format vaf;
|
||||
char pbuf[64];
|
||||
|
||||
va_start(va, fmt);
|
||||
|
||||
@ -2547,6 +2546,8 @@ ql_dbg(uint level, scsi_qla_host_t *vha, uint id, const char *fmt, ...)
|
||||
vaf.va = &va;
|
||||
|
||||
if (!ql_mask_match(level)) {
|
||||
char pbuf[64];
|
||||
|
||||
if (vha != NULL) {
|
||||
const struct pci_dev *pdev = vha->hw->pdev;
|
||||
/* <module-name> <msg-id>:<host> Message */
|
||||
|
@ -3611,8 +3611,6 @@ qla24xx_detect_sfp(scsi_qla_host_t *vha)
|
||||
ha->lr_distance = LR_DISTANCE_5K;
|
||||
}
|
||||
|
||||
if (!vha->flags.init_done)
|
||||
rc = QLA_SUCCESS;
|
||||
out:
|
||||
ql_dbg(ql_dbg_async, vha, 0x507b,
|
||||
"SFP detect: %s-Range SFP %s (nvr=%x ll=%x lr=%x lrd=%x).\n",
|
||||
|
@ -87,7 +87,6 @@ qla24xx_process_abts(struct scsi_qla_host *vha, void *pkt)
|
||||
}
|
||||
|
||||
/* terminate exchange */
|
||||
memset(rsp_els, 0, sizeof(*rsp_els));
|
||||
rsp_els->entry_type = ELS_IOCB_TYPE;
|
||||
rsp_els->entry_count = 1;
|
||||
rsp_els->nport_handle = ~0;
|
||||
|
@ -4894,8 +4894,6 @@ qla25xx_set_els_cmds_supported(scsi_qla_host_t *vha)
|
||||
return QLA_MEMORY_ALLOC_FAILED;
|
||||
}
|
||||
|
||||
memset(els_cmd_map, 0, ELS_CMD_MAP_SIZE);
|
||||
|
||||
els_cmd_map[index] |= 1 << bit;
|
||||
|
||||
mcp->mb[0] = MBC_SET_RNID_PARAMS;
|
||||
|
Loading…
Reference in New Issue
Block a user