Skip to content

Commit 2eb1d3f

Browse files
phongtdavem330
authored andcommitted
net: usbnet: Fix -Wcast-function-type
correct usage prototype of callback in tasklet_init(). Report by KSPP#20 Signed-off-by: Phong Tran <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1d4a09d commit 2eb1d3f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

drivers/net/usb/usbnet.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1573,6 +1573,13 @@ static void usbnet_bh (struct timer_list *t)
15731573
}
15741574
}
15751575

1576+
static void usbnet_bh_tasklet(unsigned long data)
1577+
{
1578+
struct timer_list *t = (struct timer_list *)data;
1579+
1580+
usbnet_bh(t);
1581+
}
1582+
15761583

15771584
/*-------------------------------------------------------------------------
15781585
*
@@ -1700,7 +1707,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
17001707
skb_queue_head_init (&dev->txq);
17011708
skb_queue_head_init (&dev->done);
17021709
skb_queue_head_init(&dev->rxq_pause);
1703-
dev->bh.func = (void (*)(unsigned long))usbnet_bh;
1710+
dev->bh.func = usbnet_bh_tasklet;
17041711
dev->bh.data = (unsigned long)&dev->delay;
17051712
INIT_WORK (&dev->kevent, usbnet_deferred_kevent);
17061713
init_usb_anchor(&dev->deferred);

0 commit comments

Comments
 (0)