linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* net: cdc_ncm: use tasklet_init() for tasklet_struct init
@ 2018-10-11 13:03 Ben Dooks
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Dooks @ 2018-10-11 13:03 UTC (permalink / raw)
  To: avem, oliver; +Cc: linux-usb, netdev, linux-kernel, linux-kernel, Ben Dooks

The tasklet initialisation would be better done by tasklet_init()
instead of assuming all the fields are in an ok state by default.

This does not fix any actual know bug.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 drivers/net/usb/cdc_ncm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 0d722b326e1b..863f3548a439 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -784,8 +784,7 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_
 
 	hrtimer_init(&ctx->tx_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
 	ctx->tx_timer.function = &cdc_ncm_tx_timer_cb;
-	ctx->bh.data = (unsigned long)dev;
-	ctx->bh.func = cdc_ncm_txpath_bh;
+	tasklet_init(&ctx->bh, cdc_ncm_txpath_bh, (unsigned long)dev);
 	atomic_set(&ctx->stop, 0);
 	spin_lock_init(&ctx->mtx);
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* net: cdc_ncm: use tasklet_init() for tasklet_struct init
@ 2018-10-11 19:06 David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-10-11 19:06 UTC (permalink / raw)
  To: ben.dooks; +Cc: oliver, linux-usb, netdev, linux-kernel, linux-kernel

From: Ben Dooks <ben.dooks@codethink.co.uk>
Date: Thu, 11 Oct 2018 14:03:32 +0100

> The tasklet initialisation would be better done by tasklet_init()
> instead of assuming all the fields are in an ok state by default.
> 
> This does not fix any actual know bug.
> 
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>

Applied to net-next.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-11 19:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-11 13:03 net: cdc_ncm: use tasklet_init() for tasklet_struct init Ben Dooks
  -- strict thread matches above, loose matches on Subject: below --
2018-10-11 19:06 David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).