Skip to contentSkip to conversation

scsi: bfa: fix warning comparing pointer to 0

PATCH Applied Jiapeng Chong 2 participants 2 messages Mar 16, 2021 – Mar 30, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: bfa: fix warning comparing pointer to 0

Fix the following coccicheck warning:

./drivers/scsi/bfa/bfad_bsg.c:3412:29-30: WARNING comparing pointer to 0.

---
 drivers/scsi/bfa/bfad_bsg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/bfa/bfad_bsg.c +1 -1
index fc51542..be8dfbe 100644
@@ -3409,7 +3409,7 @@
 
 	drv_fcxp->port = fcs_port->bfad_port;
 
-	if (drv_fcxp->port->bfad == 0)
+	if (!drv_fcxp->port->bfad)
 		drv_fcxp->port->bfad = bfad;
 
 	/* Fetch the bfa_rport - if nexus needed */
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 4 lines · Jiapeng Chong

Fix the following coccicheck warning:

./drivers/scsi/bfa/bfad_bsg.c:3412:29-30: WARNING comparing pointer to 0.

Applied to 5.13/scsi-queue, thanks!

[1/1] scsi: bfa: fix warning comparing pointer to 0

      https://git.kernel.org/mkp/scsi/c/1630e752fb83
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering