Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1579166ybc; Sun, 24 Nov 2019 01:44:57 -0800 (PST) X-Google-Smtp-Source: APXvYqw4KI0irrmmobnMSz3v0HaL9I0psoZDNmmx+dSNqSa9UshB+e3bvJcO3s6taThAfRDN/Uxe X-Received: by 2002:a17:906:6043:: with SMTP id p3mr31553291ejj.103.1574588697265; Sun, 24 Nov 2019 01:44:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574588697; cv=none; d=google.com; s=arc-20160816; b=cZSiuWKyoIO9vb6EA8dQvy31y5/bcKzLMOHakWek8smtmE4tIm36Qnjs2cgHtz4P3/ NRWzwTmXUvxGiambUs+LlK8qkEJrXfZRN0hVltM38ZF4f/iGV3dNft/g9gsKZLYdgU/O pjF6Is59HJq/a7CeC5+oOQPbpuIqJufqFBh4YGos6O3C9r9sZ88vlSCSVY0Ct2Ns8i+C W0mqVAMdWXE+HX7EAIBQmni9cknXMNLfpXL4S3oYhx5CtOIdmry5F5sWC/x0xwWBMvT0 42iCT8s9Jh39er4AkpyliVlBrseynLmVOYMRRkOowTl4RUOW1vyM0cczymRv54DrKdv2 YOSA== 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=Fv51DMlGqD9FZ0x4Yb8tL4M0VywmGrWikcN80HTtJdA=; b=EBixTNEWNsI5n8PueeW7bvBI79UCls5AWK4RtYLqm6uEydrjxGgZK8z7f+Ig/mUgsw 5mthZclBtrUiGP7agHxJQfSv15dzyNv+1r6MrWmi/cZdNtumtvvPjaqsmcCM42lpujnC Qh60h4gVAFYY3t8KD9AxM+JOfxUi0hBYQvieANMsfJCwRhBjj8NLpui4GZQfBwYgm+MA fiSrNcJQ5a0+dxqCJ4c5nconSAWzM/LpSm+NTX+1HsbXxQIuE4SAE7Y1MmMTk1mEPDMe yZryxmb9xV0fTOU6lJq/H+JSLwK7kN9kaP/s0pdG66Rw245QsVAZBhSVhitUuCoUDoKM tfxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=slL0xsiM; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-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 c16si2229111ejb.343.2019.11.24.01.44.33; Sun, 24 Nov 2019 01:44:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-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=slL0xsiM; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-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 S1727105AbfKXJnf (ORCPT + 99 others); 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-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 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@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); } -- 2.20.1