From patchwork Sun Nov 24 09:43:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phong Tran X-Patchwork-Id: 11259107 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DBE9E14ED for ; Sun, 24 Nov 2019 09:43:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BDFB7207DD for ; Sun, 24 Nov 2019 09:43:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kaajpFwk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726921AbfKXJnY (ORCPT ); Sun, 24 Nov 2019 04:43:24 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:38466 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726792AbfKXJnX (ORCPT ); Sun, 24 Nov 2019 04:43:23 -0500 Received: by mail-pl1-f196.google.com with SMTP id o8so769340pls.5; Sun, 24 Nov 2019 01:43:23 -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=kaajpFwknkI67k2TzOc7jKFjJ8P7mC+73sOvyDGVqRHnvtgpYOk73BRc9gBsuZvPnI kS9cvvXU6hYyx6irmwTXohLutr5JbXQZTkf+kblZIqJ8As3E2ZbHHGJwaPvgWv8n4IKW eOvTuwc9XPu8bPx3y3goeaKPJJ6x45He20aH1bBfXprV7vPAB7wts3tDerb89EPma7RR FH0o9mVGnji1fGmgivLVyEc8feTzOW9jsncXw4TAYtleYySXjNARB9iitQo+kgNwls55 D0abs1d4kX7nbO87Ivk+ARbF6SQAJZV8N7i4u9vGuvkY6G7U3dViS5qx7h4waCgqcIzR Ib9Q== 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=QOg0go0phSpqKkrPN+BAKsuuZLkyJb2llfX2zVWV6XN/rp0RU+sDiOiye+XDf9h83z WKW2fFd32AsOm7LVz29jqjVRNLiXBRW32KAAZ8lP2E8NfV0AHhxQg4LxS83jzRKaZIw9 kfAJSS4p8tdQwUdwacuR3FU/II3xRXAlYR5b0DEVUqCufLtol+NAIx/1LZyVKBWxeV9W ETIDtg8CmhrIi4snMekkLREQXKsK+/IOkchrvtpLGc+oiWGLkOg9/N/KBVELGcl5ZrjM IOJ2AP8SOm3CSG1E/d2yJO3hlM0/C+b9FshnZn+wbZiwPz42sLLmtjc771HWPTeIWdSO TYRA== X-Gm-Message-State: APjAAAXfgyIGJr4AyJJJzNrTP9WrXLKPUoRLW4ef/zvD54BwI91MKsW7 VRPbKQKCoJ0d+hQLVjcmjfP9DNM9 X-Google-Smtp-Source: APXvYqxywY5Zse9PkDjXWu8nk23uiy4DyBK5wQzT9H7FR/f5Yb9iOlOhfR6nc01VdGKJs2yb2SpCVw== X-Received: by 2002:a17:902:8201:: with SMTP id x1mr23185856pln.193.1574588602407; Sun, 24 Nov 2019 01:43:22 -0800 (PST) Received: from debian.net.fpt ([2405:4800:58f7:550c:6dad:1b5f:afc6:7758]) by smtp.gmail.com with ESMTPSA id c3sm4091213pfi.91.2019.11.24.01.43.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Nov 2019 01:43:21 -0800 (PST) From: Phong Tran To: davem@davemloft.net, keescook@chromium.org Cc: kvalo@codeaurora.org, saeedm@mellanox.com, jeffrey.t.kirsher@intel.com, luciano.coelho@intel.com, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Phong Tran Subject: [PATCH 1/5] drivers: net: hso: Fix -Wcast-function-type Date: Sun, 24 Nov 2019 16:43:02 +0700 Message-Id: <20191124094306.21297-2-tranmanphong@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191124094306.21297-1-tranmanphong@gmail.com> References: <20191124094306.21297-1-tranmanphong@gmail.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@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) { From patchwork Sun Nov 24 09:43:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phong Tran X-Patchwork-Id: 11259103 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DD36F13A4 for ; Sun, 24 Nov 2019 09:43:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BEF0020637 for ; Sun, 24 Nov 2019 09:43:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RX0LhMW0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726970AbfKXJn1 (ORCPT ); Sun, 24 Nov 2019 04:43:27 -0500 Received: from mail-pj1-f65.google.com ([209.85.216.65]:35241 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726792AbfKXJn0 (ORCPT ); Sun, 24 Nov 2019 04:43:26 -0500 Received: by mail-pj1-f65.google.com with SMTP id s8so5106499pji.2; Sun, 24 Nov 2019 01:43:26 -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=RX0LhMW0c34hZGGERWZdBTSwJLJJLYhk8AMFtl2DdGL3cMAd7SKwDMHT8u/cHh0BlD 49ujQVAeHoTVjwjEg7+JsYcLPh6gXUApIWpTecrRZAuBUjltNiKkGPDxpFj39tiTPok4 WXsUdaNlAsQwcooR+Gg0Aq0M/rNXZ1shMQzstKLCStpGlsrdPMFF3cpB76i2IxWIN8UZ knhbcdBLXpHOIpY7qY46j3/sfEOkhLCIU6xAu+ecvQdR2VA2bJP0ZUJ1q1r9oUh4ORJy 9Ci32TDpY7Excyx21/duoxiUV4ypov4V9Tb1+DsZEsUM+WBAL40/xTPXXxCKOTJZ693f vNdg== 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=YsbPl52qS0w5HZMfcKdr7wATs/Pi5znBDelaiidVbDG3Ye81VxU5ntI6NfMLo9TgnB zJO3WKsn6QyiNpOQIpzbwTqNVhe0S4gOHYh+TsHzZzEcYyaMgsP5b1uj7SUVRs5a4O4a sRyVh+52xKcYMm2Y0cVfcosmlPQDCRO8HxczYZ8jE/j6yW0R1lIGvXb2MaVXLYI54tJB LZRgh/NFhRnigtoJN1Jqw49ue1qlBK7peKcelRRycbf6I5BroorlcIOBs1hAq0riRGwD /UWi0DJROslBQqyVW9WyJQmEPG3QHI/1jZI8jYsPKO8f2Cr/1284nPK4q1zuDaHC++HZ k7Rg== X-Gm-Message-State: APjAAAVmTSaPEf067fK3iKWVh8bpjzHM9KSIo5TVAhP7MR7Ke4zU7h8U QlgRjFXaRpn0mtoRkHUrj18= X-Google-Smtp-Source: APXvYqw3R6TUZ4frJfO7zIs+k7QvzozCY9KnMn0pk5y5hemv7TyHcSNwnQY0dSTIac90wNDxouqt6A== X-Received: by 2002:a17:90a:e28a:: with SMTP id d10mr32053918pjz.116.1574588605847; Sun, 24 Nov 2019 01:43:25 -0800 (PST) Received: from debian.net.fpt ([2405:4800:58f7:550c:6dad:1b5f:afc6:7758]) by smtp.gmail.com with ESMTPSA id c3sm4091213pfi.91.2019.11.24.01.43.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Nov 2019 01:43:25 -0800 (PST) From: Phong Tran To: davem@davemloft.net, keescook@chromium.org Cc: kvalo@codeaurora.org, saeedm@mellanox.com, jeffrey.t.kirsher@intel.com, luciano.coelho@intel.com, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Phong Tran Subject: [PATCH 2/5] drivers: net: usbnet: Fix -Wcast-function-type Date: Sun, 24 Nov 2019 16:43:03 +0700 Message-Id: <20191124094306.21297-3-tranmanphong@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191124094306.21297-1-tranmanphong@gmail.com> References: <20191124094306.21297-1-tranmanphong@gmail.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@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); From patchwork Sun Nov 24 09:43:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phong Tran X-Patchwork-Id: 11259091 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8782314ED for ; Sun, 24 Nov 2019 09:43:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6A918207DD for ; Sun, 24 Nov 2019 09:43:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="X8dZyNbi" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727046AbfKXJnb (ORCPT ); Sun, 24 Nov 2019 04:43:31 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:42035 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727007AbfKXJna (ORCPT ); Sun, 24 Nov 2019 04:43:30 -0500 Received: by mail-pl1-f196.google.com with SMTP id j12so5120484plt.9; Sun, 24 Nov 2019 01:43:29 -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=kKcTzJuC8PJNnzJIm6q83P/GLVLCiZGhOohm6Nds3hc=; b=X8dZyNbi3pl+sJ8jfd2OCmlabAVhWAZlCWuunPrsoKiHbMoH55cymADTddbO3fJ/OC FjLO6PNcC2YgAA3vy4g7maWL+gPrWUJWX8mlwhKRDuoVIw+LafdRH30SolvbZdat0r2S XZd96YHHet9+YyzSCOfxydogbOHD6k9rWOEE50LgsbNlO2QKIA4ZFL+FZyf/aNnu7ndk bFsaGs2UHtadrPeu2cxRcwVAss2vBkPd7m4W4NMWqlRexLQImRlRmcEnmgBdVyO5nFGT QqF6iTNnHtMHN5H8k7weBSsmc21axWhI1TxDBNg20skeR77b19fUvNqP9RdrMrEk2vRl ECzg== 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=kKcTzJuC8PJNnzJIm6q83P/GLVLCiZGhOohm6Nds3hc=; b=dJ3vGUkTeYwlyp2Jytjq3VbneTMbbYo1+raC+sqG0Or54Xe5R0kq8jrtSaBV/mWOzG FTgzbqKjj378QZ5j9rIw+9qECEVP1iWGXor7+uSHZsbtRgE1gcMkzuVCDHPjStjmfEbJ NV3O5n2nZVozLr5ABFFKUKF3Z+aB4tLima3Fkeka2GDhY2mIPiJX+y0stVbQy5tIQ5rC 1gwge0D6+zlUMwfkg4y+8R11tmV8rMHN0THC2bBQlfIriGZpr7/gL9TJEmBuIvr4VJTJ Ojy985Pwjieek0aKJEdK1ojeGvegD3Su0zPRcPaYMVs+M722oH4ZvCdULHTXJK8fa0oz k7CQ== X-Gm-Message-State: APjAAAXsIebTBMs19cGHDdm/go7nYhbYPUzKe9RnrMsUFvXaqYSn5/6x XftC4Sbwgw5EVBa+AVmdPd0= X-Google-Smtp-Source: APXvYqyBvLowC9Q1fNUStc4e4FDdNQIEjGCU3mQc3EYLzwvXZT5VCgknE9UcRP6a4ceXHb32iNwn1Q== X-Received: by 2002:a17:90a:be05:: with SMTP id a5mr78858pjs.73.1574588609123; Sun, 24 Nov 2019 01:43:29 -0800 (PST) Received: from debian.net.fpt ([2405:4800:58f7:550c:6dad:1b5f:afc6:7758]) by smtp.gmail.com with ESMTPSA id c3sm4091213pfi.91.2019.11.24.01.43.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Nov 2019 01:43:28 -0800 (PST) From: Phong Tran To: davem@davemloft.net, keescook@chromium.org Cc: kvalo@codeaurora.org, saeedm@mellanox.com, jeffrey.t.kirsher@intel.com, luciano.coelho@intel.com, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Phong Tran Subject: [PATCH 3/5] drivers: net: b43legacy: Fix -Wcast-function-type Date: Sun, 24 Nov 2019 16:43:04 +0700 Message-Id: <20191124094306.21297-4-tranmanphong@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191124094306.21297-1-tranmanphong@gmail.com> References: <20191124094306.21297-1-tranmanphong@gmail.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@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 Tested-by: Larry Finger --- drivers/net/wireless/broadcom/b43legacy/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/broadcom/b43legacy/main.c b/drivers/net/wireless/broadcom/b43legacy/main.c index 4325e91736eb..8b6b657c4b85 100644 --- a/drivers/net/wireless/broadcom/b43legacy/main.c +++ b/drivers/net/wireless/broadcom/b43legacy/main.c @@ -1275,8 +1275,9 @@ static void handle_irq_ucode_debug(struct b43legacy_wldev *dev) } /* Interrupt handler bottom-half */ -static void b43legacy_interrupt_tasklet(struct b43legacy_wldev *dev) +static void b43legacy_interrupt_tasklet(unsigned long data) { + struct b43legacy_wldev *dev = (struct b43legacy_wldev *)data; u32 reason; u32 dma_reason[ARRAY_SIZE(dev->dma_reason)]; u32 merged_dma_reason = 0; @@ -3741,7 +3742,7 @@ static int b43legacy_one_core_attach(struct ssb_device *dev, b43legacy_set_status(wldev, B43legacy_STAT_UNINIT); wldev->bad_frames_preempt = modparam_bad_frames_preempt; tasklet_init(&wldev->isr_tasklet, - (void (*)(unsigned long))b43legacy_interrupt_tasklet, + b43legacy_interrupt_tasklet, (unsigned long)wldev); if (modparam_pio) wldev->__using_pio = true; From patchwork Sun Nov 24 09:43:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phong Tran X-Patchwork-Id: 11259099 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ABCCE13A4 for ; Sun, 24 Nov 2019 09:43:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8DAF720637 for ; Sun, 24 Nov 2019 09:43:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="slL0xsiM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727106AbfKXJnf (ORCPT ); Sun, 24 Nov 2019 04:43:35 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:39586 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727095AbfKXJnd (ORCPT ); Sun, 24 Nov 2019 04:43:33 -0500 Received: by mail-pf1-f195.google.com with SMTP id x28so5812562pfo.6; Sun, 24 Nov 2019 01:43:33 -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=Fv51DMlGqD9FZ0x4Yb8tL4M0VywmGrWikcN80HTtJdA=; b=slL0xsiM3n9/vMd772IIDIHdEn4ZpMhlEpSEO5kIyWf8N7s2RK9w+IzM1Yhtxhv/HH uGfO6Gj691Hqo6iMzIlW1Kou+qeHT2L8zyqxpQXmuOTNkxQncvsj+TyXfCA+g4tPejpL V9bxGfWndaGYgpEQMUIdLl47/jfItf0diEZM47JSLFteROpCnm2Cq1Ffzc1MHzn/oeER zeSmWdOhxhA2tUgFyCdZB1P8CVP5+eQGK358A/rcJ+J6rZboDtBvT9I3Cp7+ZbYk7bFp vhHdnAJj4+CIl7RyRc/G4ih68roeQBU0kIvt9A5rovy+xTtmbdiuIc3qKawKyPANLEkK gutQ== 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=Fv51DMlGqD9FZ0x4Yb8tL4M0VywmGrWikcN80HTtJdA=; b=cESdWpy9Dse23BcCFUTTgxcO16yIvxoxNJ8Uc5slIR7qc2UWT7UzlXlxL9iP25ZDRn DB/YeP0SL/g/wPPlqYgjPKj54L5aCKXJWgvKSTSTZe0DXC82XyIUGIsZUDLIQWQu2ou3 l/CrQlP7Yu1Lq7yIlaUywIRyDpjQCads1piAFFJwMrjdngcWF4dlrU24dYrCIcCX8gMr BpIAk1h6fjuTGhnoX/T/gs8akz+HQOzBofBFekASHTWFd2+nYFP/q+PfJP7eft22XMRt jBp2Jv0jscx/vCnhf6e33k2Ys/AJiqEsPMCG17HgvURP5t8LX2xhPkV9mM4ynd4kdMOR IWfQ== X-Gm-Message-State: APjAAAVVupFXlPd3A80+xdTxRXwSmnL4nvMGCv5vUUSDU2G8iGhbnrWO 518yOSvNRLQElzPAOV0pnK4= X-Google-Smtp-Source: APXvYqzC/diuSSTsN1pPS9oOawDgp9RIs5fNmfNpu8RQd1BgRuyGxBIdOvI/ogEqCh9+qvWeTjk0Uw== X-Received: by 2002:a63:445c:: with SMTP id t28mr26284435pgk.348.1574588612618; Sun, 24 Nov 2019 01:43:32 -0800 (PST) Received: from debian.net.fpt ([2405:4800:58f7:550c:6dad:1b5f:afc6:7758]) by smtp.gmail.com with ESMTPSA id c3sm4091213pfi.91.2019.11.24.01.43.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Nov 2019 01:43:31 -0800 (PST) From: Phong Tran To: davem@davemloft.net, keescook@chromium.org Cc: kvalo@codeaurora.org, saeedm@mellanox.com, jeffrey.t.kirsher@intel.com, luciano.coelho@intel.com, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Phong Tran Subject: [PATCH 4/5] drivers: net: intel: Fix -Wcast-function-type Date: Sun, 24 Nov 2019 16:43:05 +0700 Message-Id: <20191124094306.21297-5-tranmanphong@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191124094306.21297-1-tranmanphong@gmail.com> References: <20191124094306.21297-1-tranmanphong@gmail.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@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/wireless/intel/ipw2x00/ipw2100.c | 7 ++++--- drivers/net/wireless/intel/ipw2x00/ipw2200.c | 5 +++-- drivers/net/wireless/intel/iwlegacy/3945-mac.c | 5 +++-- drivers/net/wireless/intel/iwlegacy/4965-mac.c | 5 +++-- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c index 8dfbaff2d1fe..a162146a43a7 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c @@ -3206,8 +3206,9 @@ static void ipw2100_tx_send_data(struct ipw2100_priv *priv) } } -static void ipw2100_irq_tasklet(struct ipw2100_priv *priv) +static void ipw2100_irq_tasklet(unsigned long data) { + struct ipw2100_priv *priv = (struct ipw2100_priv *)data; struct net_device *dev = priv->net_dev; unsigned long flags; u32 inta, tmp; @@ -6007,7 +6008,7 @@ static void ipw2100_rf_kill(struct work_struct *work) spin_unlock_irqrestore(&priv->low_lock, flags); } -static void ipw2100_irq_tasklet(struct ipw2100_priv *priv); +static void ipw2100_irq_tasklet(unsigned long data); static const struct net_device_ops ipw2100_netdev_ops = { .ndo_open = ipw2100_open, @@ -6137,7 +6138,7 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev, INIT_DELAYED_WORK(&priv->rf_kill, ipw2100_rf_kill); INIT_DELAYED_WORK(&priv->scan_event, ipw2100_scan_event); - tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) + tasklet_init(&priv->irq_tasklet, ipw2100_irq_tasklet, (unsigned long)priv); /* NOTE: We do not start the deferred work for status checks yet */ diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c index ed0f06532d5e..ac5f797fb1ad 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c @@ -1945,8 +1945,9 @@ static void notify_wx_assoc_event(struct ipw_priv *priv) wireless_send_event(priv->net_dev, SIOCGIWAP, &wrqu, NULL); } -static void ipw_irq_tasklet(struct ipw_priv *priv) +static void ipw_irq_tasklet(unsigned long data) { + struct ipw_priv *priv = (struct ipw_priv *)data; u32 inta, inta_mask, handled = 0; unsigned long flags; int rc = 0; @@ -10680,7 +10681,7 @@ static int ipw_setup_deferred_work(struct ipw_priv *priv) INIT_WORK(&priv->qos_activate, ipw_bg_qos_activate); #endif /* CONFIG_IPW2200_QOS */ - tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) + tasklet_init(&priv->irq_tasklet, ipw_irq_tasklet, (unsigned long)priv); return ret; diff --git a/drivers/net/wireless/intel/iwlegacy/3945-mac.c b/drivers/net/wireless/intel/iwlegacy/3945-mac.c index 4fbcc7fba3cc..e2e9c3e8fff5 100644 --- a/drivers/net/wireless/intel/iwlegacy/3945-mac.c +++ b/drivers/net/wireless/intel/iwlegacy/3945-mac.c @@ -1376,8 +1376,9 @@ il3945_dump_nic_error_log(struct il_priv *il) } static void -il3945_irq_tasklet(struct il_priv *il) +il3945_irq_tasklet(unsigned long data) { + struct il_priv *il = (struct il_priv *)data; u32 inta, handled = 0; u32 inta_fh; unsigned long flags; @@ -3403,7 +3404,7 @@ il3945_setup_deferred_work(struct il_priv *il) timer_setup(&il->watchdog, il_bg_watchdog, 0); tasklet_init(&il->irq_tasklet, - (void (*)(unsigned long))il3945_irq_tasklet, + il3945_irq_tasklet, (unsigned long)il); } diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/wireless/intel/iwlegacy/4965-mac.c index ffb705b18fb1..5fe17039a337 100644 --- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c @@ -4344,8 +4344,9 @@ il4965_synchronize_irq(struct il_priv *il) } static void -il4965_irq_tasklet(struct il_priv *il) +il4965_irq_tasklet(unsigned long data) { + struct il_priv *il = (struct il_priv *)data; u32 inta, handled = 0; u32 inta_fh; unsigned long flags; @@ -6238,7 +6239,7 @@ il4965_setup_deferred_work(struct il_priv *il) timer_setup(&il->watchdog, il_bg_watchdog, 0); tasklet_init(&il->irq_tasklet, - (void (*)(unsigned long))il4965_irq_tasklet, + il4965_irq_tasklet, (unsigned long)il); } From patchwork Sun Nov 24 09:43:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phong Tran X-Patchwork-Id: 11259095 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 480B1913 for ; Sun, 24 Nov 2019 09:43:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2BACD20815 for ; Sun, 24 Nov 2019 09:43:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pbZ48E72" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726090AbfKXJni (ORCPT ); Sun, 24 Nov 2019 04:43:38 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:39590 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727124AbfKXJng (ORCPT ); Sun, 24 Nov 2019 04:43:36 -0500 Received: by mail-pf1-f194.google.com with SMTP id x28so5812608pfo.6; Sun, 24 Nov 2019 01:43:36 -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=XX2U608hnsjlr3CObVhxW7h8IxFeUeweX4fxE0/OsVM=; b=pbZ48E72WllRYYPjmsEdxnNoMrZOrFp+lMZ659AYkPhUHcQG7NnptIKEfSPw/85fX7 PjjXBPMUITuRK4nP2ilp6htpV9nHZC/wit+IO0Y5vsaMapojwHq52HihlGe1BLJGse+7 1vatoOIj4FkqjBLH2NVvZS6PMW39NuUmZEshfgZjzcqkUNWSSSstXbuPwEJ9XEqtFIXw pZNOFTrhShdekxUFT5HLUPn59pPcKAqcueuqUCKlVBHPqw7aj4ZFli0yNUf/SR0kdIz5 6VrXrnpVC5GRwprCECb1eO84NdF7UlxZJ2ZdtoGs+12OEkLsC8EvjSuj+/+HVORMuoqH Pt8Q== 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=XX2U608hnsjlr3CObVhxW7h8IxFeUeweX4fxE0/OsVM=; b=JozxIBtQtHdjOGqWTBrIqRjZaEkwbnNB82YMunLX7hWHL0z1xAeDoytS7j5ce0XvNs lERmn4ikiPD/AaLeY8mm9f4xpD11ubISYj/MNFA2eYjA+/WXph+wJclmKxSYfQ/DOSuL Q9I3VFJ2ntOI9uNF4Qu4j7Gm9NmFul41jmz6msna2mUXkDERJnUnF8/MSEVtAiHePNzv in+lFobJZDJAgJMuBbaoA+7PhVpQGIdBmriFD0sGiUPxhHVCG5qmSzXU2YYs83A/NBWm MfWjvqlvPLEJAHebPeBJkr/MXtkd31klySmEYSXakKIP0dMwlc6QQaO2WSfO8g0nhtOW d5hA== X-Gm-Message-State: APjAAAWgv9QN940FsFZ9Wuz3dwWReAt7MpcWgJTUJoB4yosXFA/bnswc qJ4+BP0oVlGhV82fM6ZHkN4= X-Google-Smtp-Source: APXvYqyDkLTF+5q1E0Qo6xZzpBxvOTU8cN84a55BpTsA4KJ4YdvSOZHeWg9UbeXT+Vj4T5foApOVlw== X-Received: by 2002:aa7:8207:: with SMTP id k7mr29000021pfi.130.1574588615992; Sun, 24 Nov 2019 01:43:35 -0800 (PST) Received: from debian.net.fpt ([2405:4800:58f7:550c:6dad:1b5f:afc6:7758]) by smtp.gmail.com with ESMTPSA id c3sm4091213pfi.91.2019.11.24.01.43.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Nov 2019 01:43:35 -0800 (PST) From: Phong Tran To: davem@davemloft.net, keescook@chromium.org Cc: kvalo@codeaurora.org, saeedm@mellanox.com, jeffrey.t.kirsher@intel.com, luciano.coelho@intel.com, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Phong Tran Subject: [PATCH 5/5] drivers: net: realtek: Fix -Wcast-function-type Date: Sun, 24 Nov 2019 16:43:06 +0700 Message-Id: <20191124094306.21297-6-tranmanphong@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191124094306.21297-1-tranmanphong@gmail.com> References: <20191124094306.21297-1-tranmanphong@gmail.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@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/wireless/realtek/rtlwifi/pci.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c index f88d26535978..25335bd2873b 100644 --- a/drivers/net/wireless/realtek/rtlwifi/pci.c +++ b/drivers/net/wireless/realtek/rtlwifi/pci.c @@ -1061,13 +1061,15 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id) return ret; } -static void _rtl_pci_irq_tasklet(struct ieee80211_hw *hw) +static void _rtl_pci_irq_tasklet(unsigned long data) { + struct ieee80211_hw *hw = (struct ieee80211_hw *)data; _rtl_pci_tx_chk_waitq(hw); } -static void _rtl_pci_prepare_bcn_tasklet(struct ieee80211_hw *hw) +static void _rtl_pci_prepare_bcn_tasklet(unsigned long data) { + struct ieee80211_hw *hw = (struct ieee80211_hw *)data; struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); @@ -1193,10 +1195,10 @@ static void _rtl_pci_init_struct(struct ieee80211_hw *hw, /*task */ tasklet_init(&rtlpriv->works.irq_tasklet, - (void (*)(unsigned long))_rtl_pci_irq_tasklet, + _rtl_pci_irq_tasklet, (unsigned long)hw); tasklet_init(&rtlpriv->works.irq_prepare_bcn_tasklet, - (void (*)(unsigned long))_rtl_pci_prepare_bcn_tasklet, + _rtl_pci_prepare_bcn_tasklet, (unsigned long)hw); INIT_WORK(&rtlpriv->works.lps_change_work, rtl_lps_change_work_callback);