2019-06-23 21:14:36

by Vasyl Gomonovych

[permalink] [raw]
Subject: [PATCH] i2c: remove casting dma_alloc

From: Vasyl <[email protected]>

Generated by: alloc_cast.cocci

Signed-off-by: Vasyl <[email protected]>
---
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;
--
2.17.1


2019-06-29 11:34:53

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH] i2c: remove casting dma_alloc

On Sun, Jun 23, 2019 at 11:13:53PM +0200, Vasyl Gomonovych wrote:
> From: Vasyl <[email protected]>
>
> Generated by: alloc_cast.cocci
>
> Signed-off-by: Vasyl <[email protected]>

Your other patches in git history have your full name. Why not this one?

@Jochen: are you still there, your ack would be very welcome.

> ---
> 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;
> --
> 2.17.1
>


Attachments:
(No filename) (1.11 kB)
signature.asc (849.00 B)
Download all attachments

2019-06-29 14:52:11

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH] i2c: remove casting dma_alloc

Hi Jochen,

(could you send text emails, please?)

> yes, I'm still here. However, I don't have the hardware anymore to test the patch.

Thanks for answering!

And besides (not) testing, are you still open to review patches to the
best of your knowledge (I neither have most of the HW). Or do you prefer
to orphan the driver?

Kind regards,

Wolfram


Attachments:
(No filename) (370.00 B)
signature.asc (849.00 B)
Download all attachments

2019-07-03 06:25:28

by Jochen Friedrich

[permalink] [raw]
Subject: Re: [PATCH] i2c: remove casting dma_alloc

> From: Vasyl <[email protected]>
>
> Generated by: alloc_cast.cocci
>
> Signed-off-by: Vasyl <[email protected]>
Acked-by: Jochen Friedrich <[email protected]>
> ---
> 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;

2019-07-05 19:35:43

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH] i2c: remove casting dma_alloc

On Sun, Jun 23, 2019 at 11:13:53PM +0200, Vasyl Gomonovych wrote:
> From: Vasyl <[email protected]>
>
> Generated by: alloc_cast.cocci
>
> Signed-off-by: Vasyl <[email protected]>

Applied to for-next, thanks! I fixed the missing full name for you, but
please fix your setup.


Attachments:
(No filename) (296.00 B)
signature.asc (849.00 B)
Download all attachments