Re: [spi-devel-general] [PATCH 1/7] powerpc: Implement get_brgfreq() and get_baudrate() stubs

2008-12-16 Thread Kumar Gala

On Dec 5, 2008, at 2:10 PM, Anton Vorontsov wrote:

> This is needed to not bother with ugly #ifdefs in the drivers.
>
> Signed-off-by: Anton Vorontsov 
> ---
> arch/powerpc/sysdev/fsl_soc.h |5 +
> 1 files changed, 5 insertions(+), 0 deletions(-)

applied to next

- k

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[spi-devel-general] [PATCH 10/11] drivers/spi: Move a dereference below a NULL test

2008-12-16 Thread Julia Lawall
From: Julia Lawall 

In each case, if the NULL test is necessary, then the dereference should be
moved below the NULL test.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// 
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
  ... when != E
  when != i
  if (E == NULL) S
+ i = E->fld;
// 

Signed-off-by: Julia Lawall 

---
 drivers/spi/pxa2xx_spi.c|3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c
index cf12f2d..fbad7e4 100644
--- a/drivers/spi/pxa2xx_spi.c
+++ b/drivers/spi/pxa2xx_spi.c
@@ -1561,11 +1561,12 @@ out_error_master_alloc:
 static int pxa2xx_spi_remove(struct platform_device *pdev)
 {
struct driver_data *drv_data = platform_get_drvdata(pdev);
-   struct ssp_device *ssp = drv_data->ssp;
+   struct ssp_device *ssp;
int status = 0;
 
if (!drv_data)
return 0;
+   ssp = drv_data->ssp;
 
/* Remove the queue */
status = destroy_queue(drv_data);

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [spi-devel-general] "concurrent" transfers list corruption (spi_async) with atmel_spi

2008-12-16 Thread Domen Puncer
Uh, nm, sorry for the noise, it was my code that used the same message
and transfer struct. (Maybe if I posted before I'd find it sooner? ;-) )


Domen

On 16/12/08 10:42 +0100, Domen Puncer wrote:
> Hello!
> 
> At least I think this is the reason.
> 
> I'm doing spi_async transfers, and in the middle, I get an interrupt
> which triggers another spi_async (presumably in the middle of spi
> callback) , to read status register.
> 
> The resulting backtrace is:


--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[spi-devel-general] "concurrent" transfers list corruption (spi_async) with atmel_spi

2008-12-16 Thread Domen Puncer
Hello!

At least I think this is the reason.

I'm doing spi_async transfers, and in the middle, I get an interrupt
which triggers another spi_async (presumably in the middle of spi
callback) , to read status register.

The resulting backtrace is:

[42949455.73] [ cut here ]
[42949455.73] WARNING: at 
/home/domen/arm9/linux/linux-2.6.27-at91/lib/list_debug.c:30 
__list_add+0x6c/0x90()
[42949455.73] list_add corruption. prev->next should be next (c39a1018), 
but was . (prev=c3a33170).
[42949455.73] Modules linked in: nordic
[42949455.73] [] (dump_stack+0x0/0x14) from [] 
(warn_slowpath+0x64/0x80)
[42949455.73] [] (warn_slowpath+0x0/0x80) from [] 
(__list_add+0x6c/0x90)
[42949455.73]  r3:c39a1018 r2:c02bddcc
[42949455.73]  r6:c3a33170 r5:c39a1018 r4:c3a33170
[42949455.73] [] (__list_add+0x0/0x90) from [] 
(atmel_spi_transfer+0x140/0x180)
[42949455.73]  r6:c3a33150 r5:6093 r4:c3a33134
[42949455.73] [] (atmel_spi_transfer+0x0/0x180) from [] 
(nordic_spi_async+0x78/0x7c [nordic])
[42949455.73]  r9:0004 r8:0001 r7:c3a331d1 r6:c3a331d1 r5:c3a33150
[42949455.73] r4:c3a33000
[42949455.73] [] (nordic_spi_async+0x0/0x7c [nordic]) from 
[] (nordic_irq+0x54/0x64 [nordic])
[42949455.73]  r9:0004 r8:fefff800 r7:0066 r6: r5:
[42949455.73] r4:c3af67c0
[42949455.73] [] (nordic_irq+0x0/0x64 [nordic]) from [] 
(handle_IRQ_event+0x2c/0x6c)
[42949455.73] [] (handle_IRQ_event+0x0/0x6c) from [] 
(handle_simple_irq+0x7c/0xc4)
[42949455.73]  r7:c02f571c r6:0066 r5:c3af67c0 r4:c02f56ec
[42949455.73] [] (handle_simple_irq+0x0/0xc4) from [] 
(gpio_irq_handler+0x94/0xc0)
[42949455.73]  r7:c02eebcc r6:0001 r5:0066 r4:c02f56ec
[42949455.73] [] (gpio_irq_handler+0x0/0xc0) from [] 
(__exception_text_start+0x44/0x6c)
[42949455.73] [] (__exception_text_start+0x0/0x6c) from 
[] (__irq_svc+0x34/0x60)
[42949455.73] Exception stack(0xc3b3fd90 to 0xc3b3fdd8)
[42949455.73] fd80: c02f35f8 c3b3e000 
c03112a0 2013 
[42949455.73] fda0: c02f35c8 0082 000a c39a0fe0 c3994510 c3a330a0 
c3a33100 c3b3fdf4 
[42949455.73] fdc0: c3b3fdf8 c3b3fdd8 c00420fc c0042034 2013    

[42949455.73]  r7:c39a0fe0 r6:0004 r5:fefff000 r4:
[42949455.73] [] (__do_softirq+0x0/0xc8) from [] 
(irq_exit+0x48/0x50)
[42949455.73]  r7:c39a0fe0 r6: r5:0001 r4:c02f35c8
[42949455.73] [] (irq_exit+0x0/0x50) from [] 
(__exception_text_start+0x54/0x6c)
[42949455.73] [] (__exception_text_start+0x0/0x6c) from 
[] (__irq_svc+0x34/0x60)
[42949455.73] Exception stack(0xc3b3fe28 to 0xc3b3fe70)
[42949455.73] fe20:   c39a0fe0 02e0  0001 
c39a0fe0 6013 
[42949455.73] fe40: c3a33150 c39a0fe0 c3994510 c3a330a0 c3a33100 c3b3fe84 
c3b3fe70 c3b3fe70 
[42949455.73] fe60: c0248bb8 c0248bbc 6013  

[42949455.73]  r7:c39a0fe0 r6:0001 r5:fefff000 r4:
[42949455.73] [] (_spin_unlock_irqrestore+0x0/0x34) from 
[] (atmel_spi_transfer+0x160/0x180)
[42949455.73]  r5:6013 r4:c3a33134
[42949455.73] [] (atmel_spi_transfer+0x0/0x180) from [] 
(nordic_spi_async+0x78/0x7c [nordic])
[42949455.73]  r9:c3a330a0 r8:0001 r7:c3a331d3 r6:c3a331d3 r5:c3a33150
[42949455.73] r4:c3a33000
[42949455.73] [] (nordic_spi_async+0x0/0x7c [nordic]) from 
[] (nordic_write+0x204/0x338 [nordic])
[42949455.73]  r9:c3a330a0 r8:bf0044c0 r7:001f r6:c3a331d3 r5:c3a33000
[42949455.73] r4:0001
[42949455.73] [] (nordic_write+0x0/0x338 [nordic]) from 
[] (vfs_write+0xb8/0x148)
[42949455.73] [] (vfs_write+0x0/0x148) from [] 
(sys_write+0x44/0x70)
[42949455.73]  r7:0408 r6:c3b4a6f0 r5: r4:
[42949455.73] [] (sys_write+0x0/0x70) from [] 
(ret_fast_syscall+0x0/0x2c)
[42949455.73]  r8:c0026da8 r7:0004 r6:8790 r5: r4:915c
[42949455.73] ---[ end trace f4eb31538b67de43 ]---


--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general