Skip to content

Commit

Permalink
net: usbnet: Fix -Wcast-function-type
Browse files Browse the repository at this point in the history
correct usage prototype of callback in tasklet_init().
Report by https://github.com/KSPP/linux/issues/20

Signed-off-by: Phong Tran <tranmanphong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Phong Tran authored and David S. Miller committed Nov 26, 2019
1 parent 1d4a09d commit 2eb1d3f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/net/usb/usbnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1573,6 +1573,13 @@ static void usbnet_bh (struct timer_list *t)
}
}

static void usbnet_bh_tasklet(unsigned long data)
{
struct timer_list *t = (struct timer_list *)data;

usbnet_bh(t);
}


/*-------------------------------------------------------------------------
*
Expand Down Expand Up @@ -1700,7 +1707,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 = (void (*)(unsigned long))usbnet_bh;
dev->bh.func = usbnet_bh_tasklet;
dev->bh.data = (unsigned long)&dev->delay;
INIT_WORK (&dev->kevent, usbnet_deferred_kevent);
init_usb_anchor(&dev->deferred);
Expand Down

0 comments on commit 2eb1d3f

Please sign in to comment.