diff mbox series

[RESEND,net-next,v2,12/12] net: usbnet: convert tasklets to use new tasklet_setup() API

Message ID 20200914073131.803374-13-allen.lkml@gmail.com
State New
Headers show
Series [RESEND,net-next,v2,01/12] net: mvpp2: Prepare to use the new tasklet API | expand

Commit Message

Allen Sept. 14, 2020, 7:31 a.m. UTC
From: Allen Pais <apais@linux.microsoft.com>

In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly
and remove the .data field.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <apais@linux.microsoft.com>
---
 drivers/net/usb/usbnet.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Oliver Neukum Sept. 14, 2020, 8:02 a.m. UTC | #1
Am Montag, den 14.09.2020, 13:01 +0530 schrieb Allen Pais:
> From: Allen Pais <apais@linux.microsoft.com>
> 
> In preparation for unconditionally passing the
> struct tasklet_struct pointer to all tasklet
> callbacks, switch to using the new tasklet_setup()
> and from_tasklet() to pass the tasklet pointer explicitly
> and remove the .data field.

Hi,

how would bisecting be supposed to run smoothly, if this
patch were applied? We'd pass a NULL pointer.

	Regards
		Oliver
diff mbox series

Patch

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 2b2a841cd938..d63485b858ba 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1708,8 +1708,7 @@  usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
 	skb_queue_head_init (&dev->txq);
 	skb_queue_head_init (&dev->done);
 	skb_queue_head_init(&dev->rxq_pause);
-	dev->bh.func = usbnet_bh_tasklet;
-	dev->bh.data = (unsigned long)&dev->delay;
+	dev->bh.func = (void(*) (unsigned long))usbnet_bh_tasklet;
 	INIT_WORK (&dev->kevent, usbnet_deferred_kevent);
 	init_usb_anchor(&dev->deferred);
 	timer_setup(&dev->delay, usbnet_bh, 0);