linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	kernel-janitors@vger.kernel.org, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers/media/video/mx2_emmaprp.c: use devm_kzalloc and devm_clk_get
Date: Mon, 13 Aug 2012 22:40:34 -0300	[thread overview]
Message-ID: <5029AC92.2060408@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1208132219060.2355@localhost6.localdomain6>

Em 13-08-2012 17:20, Julia Lawall escreveu:
> From: Julia Lawall <Julia.Lawall@lip6.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@lip6.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

  reply	other threads:[~2012-08-14  1:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-04 18:23 [PATCH] drivers/media/video/mx2_emmaprp.c: use devm_kzalloc and devm_clk_get Julia Lawall
2012-08-06 14:23 ` Dan Carpenter
2012-08-06 14:26   ` Dan Carpenter
2012-08-06 14:37     ` Lars-Peter Clausen
2012-08-06 19:53       ` Julia.Lawall
2012-08-06 19:53       ` Julia.Lawall
2012-08-10 13:59       ` Julia Lawall
2012-08-13 19:49         ` Mauro Carvalho Chehab
2012-08-13 19:57           ` Julia Lawall
2012-08-13 20:20           ` Julia Lawall
2012-08-14  1:40             ` Mauro Carvalho Chehab [this message]
2012-08-14  6:30               ` Julia Lawall
2012-08-14  9:54                 ` Mauro Carvalho Chehab
2012-08-14 13:23                   ` Julia Lawall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5029AC92.2060408@redhat.com \
    --to=mchehab@redhat.com \
    --cc=dan.carpenter@oracle.com \
    --cc=julia.lawall@lip6.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).