netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ll_temac: Fix poll implementation
@ 2010-08-18 10:26 Michal Simek
  2010-08-19  7:48 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Simek @ 2010-08-18 10:26 UTC (permalink / raw)
  To: glikely; +Cc: davem, netdev, Michal Simek

Functions ll_temac_rx_irq and ll_temac_tx_irq
have pointer to net_device as second parameter not
pointer to temac_local.

Signed-off-by: Michal Simek <monstr@monstr.eu>
---
 drivers/net/ll_temac_main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c
index c7b6247..bdf2149 100644
--- a/drivers/net/ll_temac_main.c
+++ b/drivers/net/ll_temac_main.c
@@ -902,8 +902,8 @@ temac_poll_controller(struct net_device *ndev)
 	disable_irq(lp->tx_irq);
 	disable_irq(lp->rx_irq);
 
-	ll_temac_rx_irq(lp->tx_irq, lp);
-	ll_temac_tx_irq(lp->rx_irq, lp);
+	ll_temac_rx_irq(lp->tx_irq, ndev);
+	ll_temac_tx_irq(lp->rx_irq, ndev);
 
 	enable_irq(lp->tx_irq);
 	enable_irq(lp->rx_irq);
-- 
1.5.5.6


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ll_temac: Fix poll implementation
  2010-08-18 10:26 [PATCH] ll_temac: Fix poll implementation Michal Simek
@ 2010-08-19  7:48 ` David Miller
  2010-08-25 12:24   ` Michal Simek
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2010-08-19  7:48 UTC (permalink / raw)
  To: monstr; +Cc: glikely, netdev, rusty

From: Michal Simek <monstr@monstr.eu>
Date: Wed, 18 Aug 2010 12:26:34 +0200

> Functions ll_temac_rx_irq and ll_temac_tx_irq
> have pointer to net_device as second parameter not
> pointer to temac_local.
> 
> Signed-off-by: Michal Simek <monstr@monstr.eu>

Applied, thanks a lot.

I can't count how many times this kind of error has been
introduced.  It's of cource because the handle passed to
IRQ handlers is an opaque void pointer, so if the underlying
type gets changed there is absolutely no type checking done
against by-hand calls of the IRQ handler.

Rusty Russell was, if I remember correctly, doing some work
to correct this such that IRQ handlers could in fact have
some proper typing in their handlers.  Or maybe that was for
timer handlers?

Anyways that kind of thing would help here.

Rusty?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ll_temac: Fix poll implementation
  2010-08-19  7:48 ` David Miller
@ 2010-08-25 12:24   ` Michal Simek
  0 siblings, 0 replies; 3+ messages in thread
From: Michal Simek @ 2010-08-25 12:24 UTC (permalink / raw)
  To: David Miller; +Cc: glikely, netdev, rusty

David Miller wrote:
> From: Michal Simek <monstr@monstr.eu>
> Date: Wed, 18 Aug 2010 12:26:34 +0200
> 
>> Functions ll_temac_rx_irq and ll_temac_tx_irq
>> have pointer to net_device as second parameter not
>> pointer to temac_local.
>>
>> Signed-off-by: Michal Simek <monstr@monstr.eu>
> 
> Applied, thanks a lot.
> 
> I can't count how many times this kind of error has been
> introduced.  It's of cource because the handle passed to
> IRQ handlers is an opaque void pointer, so if the underlying
> type gets changed there is absolutely no type checking done
> against by-hand calls of the IRQ handler.
> 
> Rusty Russell was, if I remember correctly, doing some work
> to correct this such that IRQ handlers could in fact have
> some proper typing in their handlers.  Or maybe that was for
> timer handlers?
> 
> Anyways that kind of thing would help here.
> 
> Rusty?

Rusty, you there?

Michal


-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-25 12:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-18 10:26 [PATCH] ll_temac: Fix poll implementation Michal Simek
2010-08-19  7:48 ` David Miller
2010-08-25 12:24   ` Michal Simek

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).