Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4263087ybc; Tue, 26 Nov 2019 06:27:20 -0800 (PST) X-Google-Smtp-Source: APXvYqz17Vb86ofLWtT6xAlFdpLz77EYighIn2gzCqwaOyNq3qWEUcFFjx/iUh49KG0iazPHYXVh X-Received: by 2002:a17:906:340f:: with SMTP id c15mr1096190ejb.197.1574778440030; Tue, 26 Nov 2019 06:27:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574778440; cv=none; d=google.com; s=arc-20160816; b=IwsvFPMtVO7KNdUdEjWlqqRwrYM+tXvBOfCvL8cNL+LWqzkmHPlkcwMqTTxYUj4ivn cZumH8b42Cr6Xx6L73Sv9NgxGxWEQwKIVPKVFBdJrAm5pXnv1s73USd77l5PEVffFeQQ +aIb9ox6bGwb+6j/gVOEGmLcG1MO3WocP5FzcRtD3doLB4P9seuubvkIPMfcGqychZwM 6I3yu+fyJfQNbG7RyZxj5XJvFlhzHaKcRwuMNGPOTKgdPJufH+mANtXUIyVXdpWbhrZU LMmNWd11a4bYyVKbGJPhC2QHOtBOLOjdc3/pHmK2hxoUDMSiaJdBbsXLobFSDMcqJekY AwkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VbURqT/hIwISYpnd7Ewfv41kiT2pdXc627ZF5Jq5I3E=; b=qFUuM+mP4nYApUWs4nMr/9wv8lVsCLqq/unrMFddiIsnksdyOxyGJBaZpnvjsbTmqc sQyy3KIhDiMlFt5k5wohtxh41W7NVqu0uyf+wLnT2zPj5OYYewPTe4ztK8UkncqzhB3+ JE2ZbZbczwrSlclKc4C9TYj/FJ21PqusMCRyOjqbCE8shMWzn5qod1MhZlUGVRnbVxXT y9H2QvqJH3zbnBd0vfOeQUoZ0V6iPgmu1QeE6I1NcEbkGxP7QyOrf4Y7U/q99vClQl+c oo2ddw20AA310ALcuWodCQl2VY9qXEyU3WPUODgt3JkY9mlLaTpW3rdIIy6q07T7ijs3 8S8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jn3dXdAU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t4si564403ejs.400.2019.11.26.06.26.53; Tue, 26 Nov 2019 06:27:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jn3dXdAU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728062AbfKZNyd (ORCPT + 99 others); Tue, 26 Nov 2019 08:54:33 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:43650 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727374AbfKZNyc (ORCPT ); Tue, 26 Nov 2019 08:54:32 -0500 Received: by mail-pg1-f196.google.com with SMTP id b1so9030328pgq.10; Tue, 26 Nov 2019 05:54:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VbURqT/hIwISYpnd7Ewfv41kiT2pdXc627ZF5Jq5I3E=; b=jn3dXdAUXjCfoTNIr3OuAUBdVoonrWEKqBMAuY8e4g0tBuHvsaniCAg1vun5q/XJb6 m68Oi1JcNA3elKzuyziqT9UmhDJTzPJpqSWbwePveSiW79D06dNmHVP2kqiBG2nv5kpy Te0vcwffP3luJ+ZHivGiNFFeEN9dc9huhdQUNFWmWy8nCLldOjp/AZCtf3eKe2+3YirG ohOCO29qxyFBYmw27rU4q4LA7GKX2yKZl48dalyIhFvqJ5hQYmrgtML0ZH4jtlMrS99A nP/LTkgHeEo3B17svNxg2O708y4rNEcRUEImbCV9bm/Q2ytpsQrRDZ2lqrUeb7y6xjAe KJHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VbURqT/hIwISYpnd7Ewfv41kiT2pdXc627ZF5Jq5I3E=; b=OTOKcgN1pnYOZmZwDdMVYi125QxBeG9CiRdQLTsIjkoFKbLB9nPuQakTDzAeIZTgCu L6Kw7ezQYOXqYjrSrUq1/l2qpTR+RXbJTIhN3jej4TFUV15WpNe8LupKGFigACVO03Ro Ihcl06XBYtfKsw89VF91Nl6NG3f41cy77q+UhKZX0ASrMD2LGMyUqoXy+fbPHFdTMuik V50bSqQ5ylR3SWhhmgEva2x15oZTRY95moo16rv9J2MH+zZBDWw8BEK5/+otoYKBwBKy 7/4Qz11F7Wu90HIE9BmqlSxAUEMzZ8MXLe876zTQezh7VOd9+Cmacy5gxg5J+e85jpqR ZhMA== X-Gm-Message-State: APjAAAVvsk8GyJCpo7RqQjv0Co0v1+g4QrX0t0uBolOQdxrGLzxKzzvt 4wUISZmoXfj/tQdBhrYapYwrA2vZvo0= X-Received: by 2002:a63:6b87:: with SMTP id g129mr30172249pgc.438.1574776471317; Tue, 26 Nov 2019 05:54:31 -0800 (PST) Received: from debian.net.fpt ([2405:4800:58f7:2f79:ce3b:4b9:a68f:959f]) by smtp.gmail.com with ESMTPSA id v3sm13018499pfi.26.2019.11.26.05.54.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2019 05:54:30 -0800 (PST) From: Phong Tran 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 Message-Id: <20191126135413.19929-2-tranmanphong@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191126135413.19929-1-tranmanphong@gmail.com> References: <20191125.110708.76766634808358006.davem@davemloft.net> <20191126135413.19929-1-tranmanphong@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org correct usage prototype of callback in tasklet_init(). Report by https://github.com/KSPP/linux/issues/20 Signed-off-by: Phong Tran --- 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