Thread (28 messages) 28 messages, 3 authors, 2021-03-17
STALE1954d
Revisions (3)
  1. v1 current
  2. v2 [diff vs current]
  3. v3 [diff vs current]

[PATCH 4/7] qla2xxx: qla82xx_pinit_from_rom(): Initialize 'n' before using it

From: Bart Van Assche <bvanassche@acm.org>
Date: 2021-03-16 03:57:52
Subsystem: qlogic qla2xxx fc-scsi driver, scsi subsystem, the rest · Maintainers: Nilesh Javali, "James E.J. Bottomley", "Martin K. Petersen", Linus Torvalds

This patch suppresses the following sparse warning:

qla_nx.c:1218: qla82xx_pinit_from_rom() error: uninitialized symbol 'n'.

Cc: Quinn Tran <redacted>
Cc: Mike Christie <michael.christie@oracle.com>
Cc: Himanshu Madhani <redacted>
Cc: Daniel Wagner <redacted>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/qla2xxx/qla_nx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
index 0677295957bc..5683126e0cbc 100644
--- a/drivers/scsi/qla2xxx/qla_nx.c
+++ b/drivers/scsi/qla2xxx/qla_nx.c
@@ -1095,7 +1095,7 @@ qla82xx_pinit_from_rom(scsi_qla_host_t *vha)
 	int i ;
 	struct crb_addr_pair *buf;
 	unsigned long off;
-	unsigned offset, n;
+	unsigned offset, n = 0;
 	struct qla_hw_data *ha = vha->hw;
 
 	struct crb_addr_pair {
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help