Skip to contentSkip to conversation

Update qla2xxx driver bug fixes

PATCH Applied Nilesh Javali 5 participants 8 messages Apr 3, 2020 – Apr 13, 2020

Subsystems (2)
lore
Share & tools
lore

Nilesh Javali

author maintainer
#0 lore raw

cover Update qla2xxx driver bug fixes

Hi Martin,

Please apply the qla2xxx driver bug fixes to the scsi tree at your earliest convenience.

Thanks,
Nilesh

Nilesh Javali (2):
qla2xxx: Fix regression warnings
MAINTAINERS: Update qla2xxx FC-SCSI driver maintainer

 MAINTAINERS                     | 3 ++-
 drivers/scsi/qla2xxx/qla_dbg.c  | 2 +-
 drivers/scsi/qla2xxx/qla_init.c | 2 --
 drivers/scsi/qla2xxx/qla_isr.c  | 1 -
 drivers/scsi/qla2xxx/qla_mbx.c  | 2 --
 5 files changed, 3 insertions(+), 7 deletions(-)

base-commit: 9b88984658fbe14dae7597070a45e3668d1b6ffb
prerequisite-patch-id: badce7907d85dab5d9a908f18471eed24d41400c
prerequisite-patch-id: 580e27c186ebb36974da4a6d2ed96c54757137db
prerequisite-patch-id: 590954e09fa5fcf70cad3ad5842d3c25dab32761

Signature · 1 line
2.19.0.rc0
author maintainer
#1 lore raw

PATCH 1/2 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

---
 drivers/scsi/qla2xxx/qla_dbg.c  | 2 +-
 drivers/scsi/qla2xxx/qla_init.c | 2 --
 drivers/scsi/qla2xxx/qla_isr.c  | 1 -
 drivers/scsi/qla2xxx/qla_mbx.c  | 2 --
 4 files changed, 1 insertion(+), 6 deletions(-)
drivers/scsi/qla2xxx/qla_dbg.c +1 -1
index f301a8048b2f..0a9e084c1669 100644
@@ -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,7 @@ 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 */
drivers/scsi/qla2xxx/qla_init.c +0 -2
index 3e9b7a079554..496ead29b51e 100644
@@ -3613,8 +3613,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",
drivers/scsi/qla2xxx/qla_isr.c +0 -1
index a9e8513e1cf1..4d9ec7ee59cc 100644
@@ -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;
drivers/scsi/qla2xxx/qla_mbx.c +0 -2
index 7cefe35d61d1..d6c991bd1bde 100644
@@ -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;
Signature · 1 line
2.19.0.rc0
#2 lore raw

Re: [PATCH 1/2] qla2xxx: Fix regression warnings

drivers/scsi/qla2xxx/qla_dbg.c ql_dbg(uint level, scsi_qla_host_t *vha, uint id, const char *fmt, ...) · line 2552

Quoted 8 lines · Nilesh Javali
drivers/scsi/qla2xxx/qla_dbg.c +1 -0
@@ -2547,6 +2546,7 @@ 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 */

Has this patch been verified witch checkpatch? Did checkpatch report "Missing a blank line after declarations"?

Thanks,

Bart.

author maintainer
#3 lore raw

RE: [EXT] Re: [PATCH 1/2] qla2xxx: Fix regression warnings

Hi Bart,

Quoted 16 lines

-----Original Message-----
From: Bart Van Assche <[email protected]>
Sent: Friday, April 3, 2020 7:46 PM
To: Nilesh Javali <[email protected]>; [email protected]
Cc: [email protected]; GR-QLogic-Storage-Upstream <GR-QLogic- [email protected]>
Subject: [EXT] Re: [PATCH 1/2] qla2xxx: Fix regression warnings

External Email

----------------------------------------------------------------------

Review ql_dbg(uint level, scsi_qla_host_t *vha, uint id,

Quoted 1 line · Nilesh Javali
(quoted diff) +0 -0
@@ -2547,6 +2546,7 @@ ql_dbg(uint level, scsi_qla_host_t *vha, uint id,

const char *fmt, ...)

Quoted 2 lines
drivers/scsi/qla2xxx/qla_dbg.c +0 -0
 	vaf.va = &va;
 
Quoted 8 lines

drivers/scsi/qla2xxx/qla_dbg.c ql_dbg(uint level, scsi_qla_host_t *vha, uint id, const char *fmt, ...) · line 2552

Quoted 5 lines
drivers/scsi/qla2xxx/qla_dbg.c +1 -0
 	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 */

Has this patch been verified witch checkpatch? Did checkpatch report "Missing a blank line after declarations"?

Yes, the patch was verified using checkpath and showed no warnings.

Thanks,
Nilesh

Reviewed-by on v1 1/2
#4 lore raw

Re: [PATCH 1/2] qla2xxx: Fix regression warnings

In reply to Nilesh Javali
Quoted 9 lines · Nilesh Javali

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

Hi Nilesh,

It would be good to mention the errors are from cppcheck,

Thanks,
Roman

author maintainer
#5 lore raw

PATCH 2/2 MAINTAINERS: Update qla2xxx FC-SCSI driver maintainer

In reply to Nilesh Javali

Add [email protected] as new maintainer.
Also add Marvell Upstream email alias to the maintainers list.

---
 MAINTAINERS | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
MAINTAINERS +2 -1
index 7bd5e23648b1..c414536f3b3f 100644
@@ -13714,7 +13714,8 @@ S:	Maintained
 F:	drivers/scsi/qla1280.[ch]
 
 QLOGIC QLA2XXX FC-SCSI DRIVER
-M:	[email protected]
+M:	Nilesh Javali <[email protected]>
+M:	[email protected]
 L:	[email protected]
 S:	Supported
 F:	Documentation/scsi/LICENSE.qla2xxx
Signature · 1 line
2.19.0.rc0
Reviewed-by on v1 2/2
#6 lore raw

Re: [PATCH 2/2] MAINTAINERS: Update qla2xxx FC-SCSI driver maintainer

Quoted 13 lines · Nilesh Javali

Add [email protected] as new maintainer.
Also add Marvell Upstream email alias to the maintainers list.

---
  MAINTAINERS | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
MAINTAINERS +0 -0
index 7bd5e23648b1..c414536f3b3f 100644

MAINTAINERS S: Maintained · line 13721

Quoted 9 lines
MAINTAINERS +2 -1
@@ -13714,7 +13714,8 @@ S:	Maintained
  F:	drivers/scsi/qla1280.[ch]
 
  QLOGIC QLA2XXX FC-SCSI DRIVER
-M:	[email protected]
+M:	Nilesh Javali <[email protected]>
+M:	[email protected]
  L:	[email protected]
  S:	Supported
  F:	Documentation/scsi/LICENSE.qla2xxx
#7 lore raw
In reply to Nilesh Javali

Nilesh,

Quoted 2 lines

Please apply the qla2xxx driver bug fixes to the scsi tree at your earliest convenience.

Added newline after variable declaration as pointed out by Bart.

Applied to 5.7/scsi-fixes, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering