linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: pm8001: remove casting kcalloc
@ 2020-11-20  8:36 Xu Wang
  2020-11-20  8:57 ` Jinpu Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Xu Wang @ 2020-11-20  8:36 UTC (permalink / raw)
  To: jinpu.wang, jejb, martin.petersen, linux-scsi; +Cc: linux-kernel

Remove casting the values returned by kcalloc.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
 drivers/scsi/pm8001/pm8001_init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 3cf3e58b6979..ac0e598b8ac2 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -1187,8 +1187,8 @@ pm8001_init_ccb_tag(struct pm8001_hba_info *pm8001_ha, struct Scsi_Host *shost,
 		goto err_out;
 
 	/* Memory region for ccb_info*/
-	pm8001_ha->ccb_info = (struct pm8001_ccb_info *)
-		kcalloc(ccb_count, sizeof(struct pm8001_ccb_info), GFP_KERNEL);
+	pm8001_ha->ccb_info =
+		kcalloc(ccb_count, sizeof(struct pm8001_ccb_info), GFP_KERNEL);
 	if (!pm8001_ha->ccb_info) {
 		PM8001_FAIL_DBG(pm8001_ha, pm8001_printk
 			("Unable to allocate memory for ccb\n"));
-- 
2.17.1


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

end of thread, other threads:[~2020-12-01  5:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-20  8:36 [PATCH] scsi: pm8001: remove casting kcalloc Xu Wang
2020-11-20  8:57 ` Jinpu Wang
2020-11-24  3:17 ` Martin K. Petersen
2020-12-01  5:04 ` 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;
as well as URLs for NNTP newsgroup(s).