[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5029AC92.2060408@redhat.com>
Date: Mon, 13 Aug 2012 22:40:34 -0300
From: Mauro Carvalho Chehab <mchehab@...hat.com>
To: Julia Lawall <julia.lawall@...6.fr>
CC: Lars-Peter Clausen <lars@...afoo.de>,
Dan Carpenter <dan.carpenter@...cle.com>,
Mauro Carvalho Chehab <mchehab@...radead.org>,
kernel-janitors@...r.kernel.org, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers/media/video/mx2_emmaprp.c: use devm_kzalloc and
devm_clk_get
Em 13-08-2012 17:20, Julia Lawall escreveu:
> From: Julia Lawall <Julia.Lawall@...6.fr>
>
> Using devm_kzalloc simplifies the code and ensures that the use of
> devm_request_irq is safe. When kzalloc and kfree were used, the interrupt
> could be triggered after the handler's data argument had been freed.
>
> This also introduces some missing initializations of the return variable
> ret, and uses devm_request_and_ioremap instead of the combination of
> devm_request_mem_region and devm_ioremap.
>
> The problem of a free after a devm_request_irq was found using the
> following semantic match (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @r exists@
> expression e1,e2,x,a,b,c,d;
> identifier free;
> position p1,p2;
> @@
>
> devm_request_irq@p1(e1,e2,...,x)
> ... when any
> when != e2 = a
> when != x = b
> if (...) {
> ... when != e2 = c
> when != x = d
> free@p2(...,x,...);
> ...
> return ...;
> }
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@...6.fr>
>
> ---
> v3: due to a conflict with another patch
Not sure what tree you used for it, but the result was
worse ;)
patching file drivers/media/video/mx2_emmaprp.c
Hunk #1 FAILED at 896.
Hunk #2 FAILED at 904.
Hunk #3 FAILED at 946.
Hunk #4 FAILED at 993.
Hunk #5 FAILED at 1009.
5 out of 5 hunks FAILED -- rejects in file drivers/media/video/mx2_emmaprp.c
Well, I've massively applied hundreds of patches today, but not much
on this driver. Maybe it is better for you to wait for a couple of
days for these to be at -next, or use, instead, our tree as the basis for
it:
git://linuxtv.org/media_tree.git staging/for_v3.7
Regards,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists