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: 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
@@ -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.