diff mbox series

[2/2] drivers: net: usbnet: Fix -Wcast-function-type

Message ID 20191125145443.29052-2-tranmanphong@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/2] drivers: net: hso: Fix -Wcast-function-type | expand

Commit Message

Phong Tran Nov. 25, 2019, 2:54 p.m. UTC
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>
---
 drivers/net/usb/usbnet.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

David Miller Nov. 25, 2019, 7:07 p.m. UTC | #1
From: Phong Tran <tranmanphong@gmail.com>
Date: Mon, 25 Nov 2019 21:54:43 +0700

> @@ -1573,6 +1573,12 @@ static void usbnet_bh (struct timer_list *t)
>  	}
>  }
>  
> +static void usbnet_bh_tasklet (unsigned long data)
                                ^

Please remove this space and resubmit the patch series.
diff mbox series

Patch

diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index dde05e2fdc3e..d10a5e6d0917 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1573,6 +1573,12 @@  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);
+}
+
 
 /*-------------------------------------------------------------------------
  *
@@ -1700,7 +1706,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);