lkml.org 
[lkml]   [2019]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] i2c: remove casting dma_alloc
From
Date
> From: Vasyl <gomonovych@gmail.com>
>
> Generated by: alloc_cast.cocci
>
> Signed-off-by: Vasyl <gomonovych@gmail.com>
Acked-by: Jochen Friedrich <jochen@scram.de>
> ---
> drivers/i2c/busses/i2c-cpm.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c
> index 187900594e3d..1213e1932ccb 100644
> --- a/drivers/i2c/busses/i2c-cpm.c
> +++ b/drivers/i2c/busses/i2c-cpm.c
> @@ -531,7 +531,9 @@ static int cpm_i2c_setup(struct cpm_i2c *cpm)
> }
> out_be32(&rbdf[i].cbd_bufaddr, ((cpm->rxdma[i] + 1) & ~1));
>
> - cpm->txbuf[i] = (unsigned char *)dma_alloc_coherent(&cpm->ofdev->dev, CPM_MAX_READ + 1, &cpm->txdma[i], GFP_KERNEL);
> + cpm->txbuf[i] = dma_alloc_coherent(&cpm->ofdev->dev,
> + CPM_MAX_READ + 1,
> + &cpm->txdma[i], GFP_KERNEL);
> if (!cpm->txbuf[i]) {
> ret = -ENOMEM;
> goto out_muram;

\
 
 \ /
  Last update: 2019-07-03 08:25    [W:0.116 / U:0.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site