All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [SCSI] esas2r: remove casting dma_alloc_coherent
@ 2019-07-18 19:22 Vasyl Gomonovych
  0 siblings, 0 replies; only message in thread
From: Vasyl Gomonovych @ 2019-07-18 19:22 UTC (permalink / raw
  To: linuxdrivers, jejb, martin.petersen, linux-scsi
  Cc: Vasyl Gomonovych, linux-kernel

Fix allocation style
Generated by:  alloc_cast.cocci

Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
---
 drivers/scsi/esas2r/esas2r_ioctl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/esas2r/esas2r_ioctl.c b/drivers/scsi/esas2r/esas2r_ioctl.c
index 3d130523c288..eece7e80cb59 100644
--- a/drivers/scsi/esas2r/esas2r_ioctl.c
+++ b/drivers/scsi/esas2r/esas2r_ioctl.c
@@ -1552,7 +1552,7 @@ static int allocate_fw_buffers(struct esas2r_adapter *a, u32 length)
 
 	a->firmware.orig_len = length;
 
-	a->firmware.data = (u8 *)dma_alloc_coherent(&a->pcid->dev,
+	a->firmware.data = dma_alloc_coherent(&a->pcid->dev,
 						    (size_t)length,
 						    (dma_addr_t *)&a->firmware.
 						    phys,
@@ -1899,7 +1899,7 @@ int esas2r_write_vda(struct esas2r_adapter *a, const char *buf, long off,
 
 	if (!a->vda_buffer) {
 		dma_addr_t dma_addr;
-		a->vda_buffer = (u8 *)dma_alloc_coherent(&a->pcid->dev,
+		a->vda_buffer = dma_alloc_coherent(&a->pcid->dev,
 							 (size_t)
 							 VDA_MAX_BUFFER_SIZE,
 							 &dma_addr,
@@ -2068,7 +2068,7 @@ int esas2r_write_fs(struct esas2r_adapter *a, const char *buf, long off,
 re_allocate_buffer:
 			a->fs_api_buffer_size = length;
 
-			a->fs_api_buffer = (u8 *)dma_alloc_coherent(
+			a->fs_api_buffer = dma_alloc_coherent(
 				&a->pcid->dev,
 				(size_t)a->fs_api_buffer_size,
 				(dma_addr_t *)&a->ppfs_api_buffer,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-07-18 19:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-18 19:22 [PATCH] [SCSI] esas2r: remove casting dma_alloc_coherent Vasyl Gomonovych

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.