From patchwork Fri Nov 16 15:50:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 10686481 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4668314D6 for ; Fri, 16 Nov 2018 15:50:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 344462CD47 for ; Fri, 16 Nov 2018 15:50:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28A4E2D5B6; Fri, 16 Nov 2018 15:50:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B89DA2CD47 for ; Fri, 16 Nov 2018 15:50:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728628AbeKQCDf (ORCPT ); Fri, 16 Nov 2018 21:03:35 -0500 Received: from imap1.codethink.co.uk ([176.9.8.82]:54606 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728485AbeKQCDf (ORCPT ); Fri, 16 Nov 2018 21:03:35 -0500 Received: from [148.252.241.226] (helo=rainbowdash) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1gNgOD-00036S-Up; Fri, 16 Nov 2018 15:50:38 +0000 Received: from ben by rainbowdash with local (Exim 4.91) (envelope-from ) id 1gNgOD-0004xa-L2; Fri, 16 Nov 2018 15:50:37 +0000 From: Ben Dooks To: oneukum@suse.com, linux-usb@vger.kernel.org Cc: davem@davemloft.net, linux-kernel@vger.kernel.org, Ben Dooks Subject: [PATCH] usbnet: use tasklet_init() for usbnet_bh handler Date: Fri, 16 Nov 2018 15:50:35 +0000 Message-Id: <20181116155035.19025-1-ben.dooks@codethink.co.uk> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The tasklet initialisation would be better done by tasklet_init() instead of assuming all the fields are in an ok state by default. Note, this does not fix any known bug. Signed-off-by: Ben Dooks Acked-by: Oliver Neukum --- drivers/net/usb/usbnet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 28d76c827e70..8f7db959d319 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1704,8 +1704,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.data = (unsigned long)&dev->delay; + tasklet_init(&dev->bh, (void (*)(unsigned long))usbnet_bh, (unsigned long)&dev->delay); INIT_WORK (&dev->kevent, usbnet_deferred_kevent); init_usb_anchor(&dev->deferred); timer_setup(&dev->delay, usbnet_bh, 0);