* [PATCH] arm: imx: Zero entire imxdma structure
@ 2011-02-20 22:10 Ilia Mirkin
2011-02-20 22:59 ` Ilia Mirkin
0 siblings, 1 reply; 4+ messages in thread
From: Ilia Mirkin @ 2011-02-20 22:10 UTC (permalink / raw)
To: linux-arm-kernel
The semantic match that finds the problem:
// <smpl>
@@
type T;
identifier x;
@@
T *x;
...
* memset(x, ..., ... * sizeof(x) * ...);
// </smpl>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
---
arch/arm/mach-imx/dma-v1.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Untested, lack of tool chain and hardware. But there's definitely something
odd going on here, and this seemed like the most logical fix.
diff --git a/arch/arm/mach-imx/dma-v1.c b/arch/arm/mach-imx/dma-v1.c
index e9f1769..236f149 100644
--- a/arch/arm/mach-imx/dma-v1.c
+++ b/arch/arm/mach-imx/dma-v1.c
@@ -699,7 +699,7 @@ int imx_dma_request(int channel, const char *name)
local_irq_restore(flags);
return -EBUSY;
}
- memset(imxdma, 0, sizeof(imxdma));
+ memset(imxdma, 0, sizeof(*imxdma));
imxdma->name = name;
local_irq_restore(flags); /* request_irq() can block */
--
1.7.3.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] arm: imx: Zero entire imxdma structure
2011-02-20 22:10 [PATCH] arm: imx: Zero entire imxdma structure Ilia Mirkin
@ 2011-02-20 22:59 ` Ilia Mirkin
2011-02-20 23:04 ` Russell King - ARM Linux
0 siblings, 1 reply; 4+ messages in thread
From: Ilia Mirkin @ 2011-02-20 22:59 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Feb 20, 2011 at 10:10 PM, Ilia Mirkin <imirkin@alum.mit.edu> wrote:
> The semantic match that finds the problem:
> // <smpl>
> @@
> type T;
> identifier x;
> @@
>
> T *x;
> ...
> * memset(x, ..., ... * sizeof(x) * ...);
> // </smpl>
>
> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
>
> ---
> ?arch/arm/mach-imx/dma-v1.c | ? ?2 +-
> ?1 files changed, 1 insertions(+), 1 deletions(-)
>
> Untested, lack of tool chain and hardware. But there's definitely something
> odd going on here, and this seemed like the most logical fix.
Doing some quick digging (as I've been discovering that a few of the
other patches I was planning on sending have already been sent out in
the past), I noticed that this same patch was already sent on Dec 9,
2009 by Julia Lawall[1] (back when it was plat-mxc/dma-mx1-mx2.c), and
then again by Vasiliy Kulikov[2] on Oct 10, 2010.
On each occasion, the response was positive, but patch has yet to make
it upstream. Weird.
--
Ilia Mirkin
imirkin at alum.mit.edu
[1] Message-ID: <Pine.LNX.4.64.0912092022040.1870@ask.diku.dk>
[2] Message-ID: <1286731703-17775-1-git-send-email-segooon@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] arm: imx: Zero entire imxdma structure
2011-02-20 22:59 ` Ilia Mirkin
@ 2011-02-20 23:04 ` Russell King - ARM Linux
2011-02-21 16:00 ` Sascha Hauer
0 siblings, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2011-02-20 23:04 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Feb 20, 2011 at 10:59:24PM +0000, Ilia Mirkin wrote:
> On Sun, Feb 20, 2011 at 10:10 PM, Ilia Mirkin <imirkin@alum.mit.edu> wrote:
> > The semantic match that finds the problem:
> > // <smpl>
> > @@
> > type T;
> > identifier x;
> > @@
> >
> > T *x;
> > ...
> > * memset(x, ..., ... * sizeof(x) * ...);
> > // </smpl>
> >
> > Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
> >
> > ---
> > ?arch/arm/mach-imx/dma-v1.c | ? ?2 +-
> > ?1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > Untested, lack of tool chain and hardware. But there's definitely something
> > odd going on here, and this seemed like the most logical fix.
>
> Doing some quick digging (as I've been discovering that a few of the
> other patches I was planning on sending have already been sent out in
> the past), I noticed that this same patch was already sent on Dec 9,
> 2009 by Julia Lawall[1] (back when it was plat-mxc/dma-mx1-mx2.c), and
> then again by Vasiliy Kulikov[2] on Oct 10, 2010.
>
> On each occasion, the response was positive, but patch has yet to make
> it upstream. Weird.
Sascha, are you going to take this patch?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] arm: imx: Zero entire imxdma structure
2011-02-20 23:04 ` Russell King - ARM Linux
@ 2011-02-21 16:00 ` Sascha Hauer
0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2011-02-21 16:00 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Feb 20, 2011 at 11:04:58PM +0000, Russell King - ARM Linux wrote:
> On Sun, Feb 20, 2011 at 10:59:24PM +0000, Ilia Mirkin wrote:
> > On Sun, Feb 20, 2011 at 10:10 PM, Ilia Mirkin <imirkin@alum.mit.edu> wrote:
> > > The semantic match that finds the problem:
> > > // <smpl>
> > > @@
> > > type T;
> > > identifier x;
> > > @@
> > >
> > > T *x;
> > > ...
> > > * memset(x, ..., ... * sizeof(x) * ...);
> > > // </smpl>
> > >
> > > Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
> > >
> > > ---
> > > ?arch/arm/mach-imx/dma-v1.c | ? ?2 +-
> > > ?1 files changed, 1 insertions(+), 1 deletions(-)
> > >
> > > Untested, lack of tool chain and hardware. But there's definitely something
> > > odd going on here, and this seemed like the most logical fix.
> >
> > Doing some quick digging (as I've been discovering that a few of the
> > other patches I was planning on sending have already been sent out in
> > the past), I noticed that this same patch was already sent on Dec 9,
> > 2009 by Julia Lawall[1] (back when it was plat-mxc/dma-mx1-mx2.c), and
> > then again by Vasiliy Kulikov[2] on Oct 10, 2010.
> >
> > On each occasion, the response was positive, but patch has yet to make
> > it upstream. Weird.
>
> Sascha, are you going to take this patch?
Yes.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-02-21 16:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-20 22:10 [PATCH] arm: imx: Zero entire imxdma structure Ilia Mirkin
2011-02-20 22:59 ` Ilia Mirkin
2011-02-20 23:04 ` Russell King - ARM Linux
2011-02-21 16:00 ` Sascha Hauer
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).