Thread (30 messages) 30 messages, 4 authors, 2020-09-11

Re: [PATCH v2 07/20] ethernet: dlink: convert tasklets to use new tasklet_setup() API

From: David Miller <davem@davemloft.net>
Date: 2020-09-09 18:11:21

From: Allen Pais <redacted>
Date: Wed,  9 Sep 2020 14:14:57 +0530
quoted hunk ↗ jump to hunk
@@ -1312,10 +1311,11 @@ static irqreturn_t intr_handler(int irq, void *dev_instance)
 	return IRQ_RETVAL(handled);
 }
 
-static void rx_poll(unsigned long data)
+static void rx_poll(struct tasklet_struct *t)
 {
-	struct net_device *dev = (struct net_device *)data;
-	struct netdev_private *np = netdev_priv(dev);
+	struct netdev_private *np = from_tasklet(np, t, rx_tasklet);
+	struct net_device *dev = (struct net_device *)((char *)np -
+				  ALIGN(sizeof(struct net_device), NETDEV_ALIGN));
Just like patch #1, I don't want to see this brittle construct.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help