linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phong Tran <tranmanphong@gmail.com>
To: davem@davemloft.net
Cc: alexios.zavras@intel.com, allison@lohutok.net,
	benquike@gmail.com, gregkh@linuxfoundation.org, johan@kernel.org,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	netdev@vger.kernel.org, oneukum@suse.com, tglx@linutronix.de,
	tranmanphong@gmail.com
Subject: [Patch v2 1/2] net: hso: Fix -Wcast-function-type
Date: Tue, 26 Nov 2019 20:54:12 +0700	[thread overview]
Message-ID: <20191126135413.19929-2-tranmanphong@gmail.com> (raw)
In-Reply-To: <20191126135413.19929-1-tranmanphong@gmail.com>

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/hso.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index 74849da031fa..ca827802f291 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -1214,8 +1214,9 @@ static void hso_std_serial_read_bulk_callback(struct urb *urb)
  * This needs to be a tasklet otherwise we will
  * end up recursively calling this function.
  */
-static void hso_unthrottle_tasklet(struct hso_serial *serial)
+static void hso_unthrottle_tasklet(unsigned long data)
 {
+	struct hso_serial *serial = (struct hso_serial *)data;
 	unsigned long flags;
 
 	spin_lock_irqsave(&serial->serial_lock, flags);
@@ -1265,7 +1266,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)
 		/* Force default termio settings */
 		_hso_serial_set_termios(tty, NULL);
 		tasklet_init(&serial->unthrottle_tasklet,
-			     (void (*)(unsigned long))hso_unthrottle_tasklet,
+			     hso_unthrottle_tasklet,
 			     (unsigned long)serial);
 		result = hso_start_serial_device(serial->parent, GFP_KERNEL);
 		if (result) {
-- 
2.20.1


  reply	other threads:[~2019-11-26 13:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-25 14:54 [PATCH 1/2] drivers: net: hso: Fix -Wcast-function-type Phong Tran
2019-11-25 14:54 ` [PATCH 2/2] drivers: net: usbnet: " Phong Tran
2019-11-25 19:07   ` David Miller
2019-11-26 13:54     ` [Patch v2 0/2] Fix -Wcast-function-type usb net drivers Phong Tran
2019-11-26 13:54       ` Phong Tran [this message]
2019-11-26 13:54       ` [Patch v2 2/2] net: usbnet: Fix -Wcast-function-type Phong Tran
2019-11-26 22:04       ` [Patch v2 0/2] Fix -Wcast-function-type usb net drivers David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191126135413.19929-2-tranmanphong@gmail.com \
    --to=tranmanphong@gmail.com \
    --cc=alexios.zavras@intel.com \
    --cc=allison@lohutok.net \
    --cc=benquike@gmail.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oneukum@suse.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).