Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3211703ybc; Mon, 25 Nov 2019 10:43:03 -0800 (PST) X-Google-Smtp-Source: APXvYqwxF7/IuTCRD+SNqHH1Jd2Tf5BVLrxsYQ+Gk8KEe10PcwbqrYmZBHv4+2KvmtSRHGh/90/a X-Received: by 2002:a50:9353:: with SMTP id n19mr20291361eda.258.1574707382898; Mon, 25 Nov 2019 10:43:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574707382; cv=none; d=google.com; s=arc-20160816; b=syB6hcJ5HxaHxSAfJaEn9gDg2vJRaMpXTOu+c61alkEa7NnnLeJfWRH3YjATfa9ihl uEo7HyijJkvU1SjFMr1hFpy1SeYml0IwBUgfqkhEjcIjAAqEWI2Km3PRE2nqVQz1fZhu ksS0uniOdAuVhbkyMwjxqCFFBVfpO99rNshf06wn9rqQbjakNLVTmM+oBc+D2ZuavEWi /Y4WnWZQUKzLdGvIwVn2Bm+y0krFNQef7WoXEif0lSfWXW8ypyq32Q823YU9vJ2IzaWn ax0yKCcZYPPmqTd49VemoYDEKsAeTxxQ6ul44HRb2w9qis2tsPdw54lFOQjKC7WX6B1h 3aqg== 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=e4HNvCgeIsWWXZD/Eb73dwrTgcSGPA1KF9adoLiVXgQ=; b=ScC3iHS/HHGBib1JsCWyAY9/6Ejr1BI1m1AIwkrcPw5vJ9XdnZ60zS0Fn02vpsRw4a R909JZvnjpely460CBXzlthNKhgCGnq62CDwOsbWzVqxS+Dy1FqMgNGdzFVMMj9WHhMR j+CtGvmVNoWd8qhj7Nsa6skAayVa8LlcpHlQbw1ZvTiErBVMx/d28ZhsG6cLlYxXHCyi 39N/CmKbIfByEdYB4IffEM9R1i+LYgLel99sM7JF9V95yAsA2uu9Rqgr6MhnzhEcwWHn 6rYH2PLnGRFf9kfC18VRQN37kX5ISfESliOs8I7dgPiT7E/LdgTtbzi6Gr0+HQf26eec az+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=C0M56xig; 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 p13si5051829eju.398.2019.11.25.10.42.38; Mon, 25 Nov 2019 10:43:02 -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=C0M56xig; 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 S1728370AbfKYOzC (ORCPT + 99 others); Mon, 25 Nov 2019 09:55:02 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:40471 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728196AbfKYOzC (ORCPT ); Mon, 25 Nov 2019 09:55:02 -0500 Received: by mail-pg1-f196.google.com with SMTP id e17so7307372pgd.7; Mon, 25 Nov 2019 06:55:01 -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=e4HNvCgeIsWWXZD/Eb73dwrTgcSGPA1KF9adoLiVXgQ=; b=C0M56xig08BjM6UDtEp0uBL4EXLqykm2frcZoJ7E7GS3AAgxjKqdK3W5pbb8z6eGFN xIWz0cmyQq2FsOL/krgiZSu5ZThNhgjLXzH7EFrfGopafUVit7HugddBcsQirgJ4Izrs wf3ztUomTXDA92t6pts8yDdxxKuoT70kll2x0tFtYPr5g70QQQCkIxd9LeNYxIJol4W3 qufObs7ux04GuWcNfiy+H9lXQbFKd6427kSHUoa2BjnRnPkkD7sYyJsPWbI3pJ0I+hQl oJv4JQeLj1Hr5FCiOl5fU2b5rYsHFCtHHVgrnx61TF0kCcj1hwe4EgtL6jHdBoz83KjF 0bTw== 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=e4HNvCgeIsWWXZD/Eb73dwrTgcSGPA1KF9adoLiVXgQ=; b=fsfmp+Gzb6ast0qU2vnUCPsxTRNbzE7OpzrdeUp18XwtnBQrsM/dToA688+2dwBwVb VELeJ2OHQfNusLJt2C2r8oa44jaxnYF0eNPdn92aWo0EI4vUP0er1Wtlbo6dJjwpnxU5 /gOXB0HwKsHc6bR6sJPtBW7j6rLwAvtnjRvaOtxKAGv8Bp88fBMjT5eaIX2DipYJdjph bSba6SQRshvdt866DlET/KyfP9LSdCl1ZKonJ7hyYHeqS6RLQTnoBXxZLpSy74r0nFqt 8rU38Lp5RtYvwh7DRbbgFCq/25MVII6vTg5sWyhDvZgD7hGvmyYGhTh5oQp95CSDyli6 9z8A== X-Gm-Message-State: APjAAAXQNl9rks2U98bQP42Plgp0zy3+NPQxOJl26/3rKLpgeWG43PEs wtiUYqkPU81mtZ/l5sPGRwE= X-Received: by 2002:a62:5485:: with SMTP id i127mr27075376pfb.186.1574693701152; Mon, 25 Nov 2019 06:55:01 -0800 (PST) Received: from debian.net.fpt ([2405:4800:58f7:550c:6dad:1b5f:afc6:7758]) by smtp.gmail.com with ESMTPSA id j4sm8623602pgt.57.2019.11.25.06.54.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2019 06:55:00 -0800 (PST) From: Phong Tran To: davem@davemloft.net, gregkh@linuxfoundation.org, oneukum@suse.com Cc: alexios.zavras@intel.com, johan@kernel.org, allison@lohutok.net, tglx@linutronix.de, benquike@gmail.com, linux-usb@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Phong Tran Subject: [PATCH 2/2] drivers: net: usbnet: Fix -Wcast-function-type Date: Mon, 25 Nov 2019 21:54:43 +0700 Message-Id: <20191125145443.29052-2-tranmanphong@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191125145443.29052-1-tranmanphong@gmail.com> References: <20191125145443.29052-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/usbnet.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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); -- 2.20.1