linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] drivers/scsi/lpfc/lpfc_init.c: remove unnecessary casting
@ 2014-05-27 17:49 Fabian Frederick
  2014-05-28 10:42 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2014-05-27 17:49 UTC (permalink / raw)
  To: linux-scsi; +Cc: Fabian Frederick, James Smart, James E.J. Bottomley

Fix coccicheck warning:
"WARNING: casting value returned by k[cmz]alloc to (struct lpfc_sli_ring *) is useless."

Cc: James Smart <james.smart@emulex.com>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 drivers/scsi/lpfc/lpfc_init.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 635eeb3..50f2a1f 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -4743,9 +4743,9 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba)
 	}
 
 	if (!phba->sli.ring)
-		phba->sli.ring = (struct lpfc_sli_ring *)
-			kzalloc(LPFC_SLI3_MAX_RING *
-			sizeof(struct lpfc_sli_ring), GFP_KERNEL);
+		phba->sli.ring = kzalloc(LPFC_SLI3_MAX_RING *
+					 sizeof(struct lpfc_sli_ring),
+					 GFP_KERNEL);
 	if (!phba->sli.ring)
 		return -ENOMEM;
 
-- 
1.8.4.5


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

end of thread, other threads:[~2014-05-28 10:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-27 17:49 [PATCH 1/1] drivers/scsi/lpfc/lpfc_init.c: remove unnecessary casting Fabian Frederick
2014-05-28 10:42 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).