From: Tobin C. Harding Date: Wed, 22 Feb 2017 06:12:38 +0000 (+1100) Subject: cciss: Remove kmalloc cast X-Git-Tag: v4.14-rc1~1420^2~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=48efbfbf6353af15d97ef37216146e550403c773;p=platform%2Fkernel%2Flinux-rpi.git cciss: Remove kmalloc cast Coccinelle emits a warning about casting the return value of kmalloc(). Coccinelle suggests removing the cast as do kerneljanitors. Remove cast from kmalloc() call. Signed-off-by: Tobin C. Harding Acked-by: Don Brace Signed-off-by: Jens Axboe --- diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c index f5c21f3..01a1f7e 100644 --- a/drivers/block/cciss_scsi.c +++ b/drivers/block/cciss_scsi.c @@ -647,8 +647,7 @@ cciss_scsi_setup(ctlr_info_t *h) struct cciss_scsi_adapter_data_t * shba; ccissscsi[h->ctlr].ndevices = 0; - shba = (struct cciss_scsi_adapter_data_t *) - kmalloc(sizeof(*shba), GFP_KERNEL); + shba = kmalloc(sizeof(*shba), GFP_KERNEL); if (shba == NULL) return; shba->scsi_host = NULL;