public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: hpsa: remove an unecessary NULL check
@ 2017-11-07 13:01 Dan Carpenter
  2017-11-21  2:31 ` Martin K. Petersen
  2017-11-22  3:59 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2017-11-07 13:01 UTC (permalink / raw)
  To: Don Brace
  Cc: James E.J. Bottomley, Martin K. Petersen, esc.storagedev,
	linux-scsi, kernel-janitors

device->scsi3addr[] is an array, not a pointer, so it can't be NULL.
I've removed the check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 287e5eb0723f..b0aa5dc1d54c 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -8223,8 +8223,6 @@ static void hpsa_set_ioaccel_status(struct ctlr_info *h)
 
 		if (!device)
 			continue;
-		if (!device->scsi3addr)
-			continue;
 		if (!hpsa_vpd_page_supported(h, device->scsi3addr,
 						HPSA_VPD_LV_IOACCEL_STATUS))
 			continue;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: hpsa: remove an unecessary NULL check
  2017-11-07 13:01 [PATCH] scsi: hpsa: remove an unecessary NULL check Dan Carpenter
@ 2017-11-21  2:31 ` Martin K. Petersen
  2017-11-22  3:59 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2017-11-21  2:31 UTC (permalink / raw)
  To: Don Brace
  Cc: Dan Carpenter, James E.J. Bottomley, Martin K. Petersen,
	esc.storagedev, linux-scsi, kernel-janitors


> device->scsi3addr[] is an array, not a pointer, so it can't be NULL.
> I've removed the check.

Microsemi folks, please review. Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: hpsa: remove an unecessary NULL check
  2017-11-07 13:01 [PATCH] scsi: hpsa: remove an unecessary NULL check Dan Carpenter
  2017-11-21  2:31 ` Martin K. Petersen
@ 2017-11-22  3:59 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2017-11-22  3:59 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Don Brace, James E.J. Bottomley, Martin K. Petersen,
	esc.storagedev, linux-scsi, kernel-janitors


Dan,

> device->scsi3addr[] is an array, not a pointer, so it can't be NULL.
> I've removed the check.

Applied to 4.16/scsi-queue. Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-22  3:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-07 13:01 [PATCH] scsi: hpsa: remove an unecessary NULL check Dan Carpenter
2017-11-21  2:31 ` Martin K. Petersen
2017-11-22  3:59 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox