Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4505453ybc; Tue, 26 Nov 2019 09:58:17 -0800 (PST) X-Google-Smtp-Source: APXvYqw2ENJ8EiyrexlJzxGi9WTlIHSwpZkzTPjqC70/SYk6BXJDlpJxu550va9uPPVO5FvsPs8K X-Received: by 2002:a50:9f65:: with SMTP id b92mr26759266edf.63.1574791096964; Tue, 26 Nov 2019 09:58:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574791096; cv=none; d=google.com; s=arc-20160816; b=o9Quv+Ce03UAHHlCntdPsnDzYaj4TQMSoySveC7YurZAOzYeNMoWWP727880/Nc/Wh gUbV2CfdT4KfPE0EairsQkeO+yw5QB++dEpaTV82Uvs0ww0MNQxYQmE7jKtCIvnIY1Ze moJO4syvqH7jCGjQpxTDDdUjPyyHeLItMv8jtUaR55oYA6dockHvE/4GlR8JRy/lsyeY yle2JeqeAeL12O+/cj2ka9QChf8aYYgqReYtrpS8Rr1hcKYOueaFLrGSqC6rzRNChoei ksu2HGENI2NZRjs7HFxAJ2LMZ5MxhbAMvCiPXb5pIqufEcCwJE2pzpzc5Wdo9RCZpvxL bg2g== 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=/r+BkUfLmBH3CeGijVoAyUPn7ui6aiDwXGoFCaRj4zU=; b=bwjwjjcX1e0UldFjUNpPIWLKR0Abo9G0auD12aCtJpbyVQp2yrjRNZXQKy6tHtuO0D CocxeStrOOOD39AatzeI0vrGLK34O0MnslwWfYOYQJeHhaFSQmTsVDYXrTHHGwof9aCE CxHBnSmUb2zE2TzEdPlyIrhIMl0+j+kBuKZ5/T3bg9HOkAnv902Kzv9Vscp89hqFf3dl 2G8DbhEslmmCCadnfwCqkPEZrxsRxuBJKmgG2W5WPdUlZiiD5mHTNkaeHhkIUHIKDAR6 fI3w17CpFoDvn34rXMuO/To0qNMx1vvOUSJom781g02OZQwRiCCI+ODTuGXTZtS5LNPj YO5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mQvsTYyc; 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 h22si8432395edv.412.2019.11.26.09.57.38; Tue, 26 Nov 2019 09:58:16 -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=mQvsTYyc; 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 S1727231AbfKZR4C (ORCPT + 99 others); Tue, 26 Nov 2019 12:56:02 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:38019 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726101AbfKZR4C (ORCPT ); Tue, 26 Nov 2019 12:56:02 -0500 Received: by mail-pg1-f194.google.com with SMTP id t3so8925225pgl.5; Tue, 26 Nov 2019 09:56: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=/r+BkUfLmBH3CeGijVoAyUPn7ui6aiDwXGoFCaRj4zU=; b=mQvsTYyccYh79x0L8dgi0htAPzlYiCAtixC4wckft7r/7mfyb4LLox8Ws9HIuO8bHJ C+Jdai1uct571FnAEJZDweiuZ385wZmjbnKiqsqTR7Os8lH6reBb0QNkX59mFcJxWZKW uIQL4nCO4BzJmB2FxCodrdQ1stsRZ72hRyqtgUANcSdp2HJi4ceLn+4/Da9fjg/c1L1j W5CC9sapTB5Xdvhnw2YGyVYgvj3IwjRmh1QmE3cpEEPgnNafQDVPLjbDXAd9YdGtHjB5 aiNkRBZ95isGeSte1MUDyqGw8tyvOl577mzJ0UCU6rdMFXH88hkv/bUQ37IkcPSHif90 exzA== 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=/r+BkUfLmBH3CeGijVoAyUPn7ui6aiDwXGoFCaRj4zU=; b=U1I/HRQh8q0I688CrrwpJcfxUkqcwxqzhDd/SFgi+YAztHVROLRvqUEn/WsLum7BHA ASJnIi1NYr+XqFJA1RMgpKLsR0QEqR13tZN6AlR7z2eHsNs7ULFskMnb188uRVgKusIj 6U83rOlpGIV1S0XeTRqK24AKohnWJsFdX3tZzAR5QJgnTLWZQmbdBto75FU3cyHfDJur jiWYmHifxzPrmYG6h0b43s1tGbo7WEymOclJ+UzZOLufLi0zREhJ7XP/jSRgH48OBKu2 9nauzF62Sbt2/aqJbiysMEx3YsFkd5T0IEdXCRNVtu82d4OUBgZkDlO/LFYcBFJv9LL1 tW7w== X-Gm-Message-State: APjAAAVn0PPdiOL86XtbSG4lLjprWIRgtNkwSdRK8hiWjUW+uRO/yZef NtHV2UP+KVE6OHIc9MnJ4Hk= X-Received: by 2002:a63:1b4e:: with SMTP id b14mr41447886pgm.280.1574790961263; Tue, 26 Nov 2019 09:56:01 -0800 (PST) Received: from debian.net.fpt ([2405:4800:58f7:2f79:ce3b:4b9:a68f:959f]) by smtp.gmail.com with ESMTPSA id q6sm781577pfl.140.2019.11.26.09.55.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2019 09:56:00 -0800 (PST) From: Phong Tran To: Larry.Finger@lwfinger.net, jakub.kicinski@netronome.com, kvalo@codeaurora.org Cc: tranmanphong@gmail.com, Wright.Feng@cypress.com, arend.vanspriel@broadcom.com, davem@davemloft.net, emmanuel.grumbach@intel.com, franky.lin@broadcom.com, johannes.berg@intel.com, keescook@chromium.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, luciano.coelho@intel.com, netdev@vger.kernel.org, p.figiel@camlintechnologies.com, pieter-paul.giesberts@broadcom.com, pkshih@realtek.com, rafal@milecki.pl, sara.sharon@intel.com, shahar.s.matityahu@intel.com, yhchuang@realtek.com, yuehaibing@huawei.com Subject: [Patch v2 2/4] ipw2x00: Fix -Wcast-function-type Date: Wed, 27 Nov 2019 00:55:27 +0700 Message-Id: <20191126175529.10909-3-tranmanphong@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191126175529.10909-1-tranmanphong@gmail.com> References: <20191125150215.29263-1-tranmanphong@gmail.com> <20191126175529.10909-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 +++-- 2 files changed, 7 insertions(+), 5 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; -- 2.20.1