[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20161008.000526.415379645974882301.davem@davemloft.net>
Date: Sat, 08 Oct 2016 00:05:26 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: christophe.jaillet@...adoo.fr
Cc: qiang.zhao@....com, netdev@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] wan/fsl_ucc_hdlc: Fix size used in dma_free_coherent()
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Date: Fri, 7 Oct 2016 22:58:47 +0200
> Size used with 'dma_alloc_coherent()' and 'dma_free_coherent()' should be
> consistent.
> Here, the size of a pointer is used in dma_alloc... and the size of the
> pointed structure is used in dma_free...
>
> This has been spotted with coccinelle, using the following script:
> ////////////////////
> @r@
> expression x0, x1, y0, y1, z0, z1, t0, t1, ret;
> @@
>
> * ret = dma_alloc_coherent(x0, y0, z0, t0);
> ...
> * dma_free_coherent(x1, y1, ret, t1);
>
>
> @script:python@
> y0 << r.y0;
> y1 << r.y1;
>
> @@
> if y1.find(y0) == -1:
> print "WARNING: sizes look different: '%s' vs '%s'" % (y0, y1)
> ////////////////////
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Looks good to me, applied, thanks.
Powered by blists - more mailing lists