Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1579052ybc; Sun, 24 Nov 2019 01:44:48 -0800 (PST) X-Google-Smtp-Source: APXvYqwO6or7v74gOcLX45ycEEUrkN5Ba4e5621/brFo4E8C2gMPla9Nd/2pqP45qUQyFAjGq4sY X-Received: by 2002:a50:ac7c:: with SMTP id w57mr11787963edc.155.1574588687907; Sun, 24 Nov 2019 01:44:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574588687; cv=none; d=google.com; s=arc-20160816; b=Kv/pgk3vgBIsAB4M9390eIkpPNiapKYZ8CWp1SV1l6n1nTznIWaPC5JThZ6vuuB5zc u604ypxyjQFgIyYkll8MhsAchqId47qoAululuEJym5mq2yzEJ2y45o75EDQ+RI9NDuw b0XM+FVd63rFxgsnXVLhu5ev7pD+lr+qmKMCWiIVC3Hab4KriQ7V2kOIwuLq4Me6q+u2 Dgp+1EcXOCuN6iN3YTxSBRI/Q7mw55oOQmq0TT5owpf8hRfa0jABjC1vfyqOUry/7Vo9 UnE7hV/zGFQ+qE8soA6uWP0gl3OsLl4AkMILGDe194z6348h4Zw0T3MiAWS/T+DFdViK lSrQ== 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=XX2U608hnsjlr3CObVhxW7h8IxFeUeweX4fxE0/OsVM=; b=WFWO0Tu/WdJg8xL4GHa3LFMj/lLrChH2a+UPK9diw39G8yXvzgS11jDgZNFbP5p5ze u8dsH8x1BNCREHXa+U49hVYS24wOE+HN1hIQQ11CjQAQugIfgEzbNTP2WkHPTT2huOmB 7Q7jUrGbm+8L5/WeQOs1fOtDuieCmuBH2DeUoL+uBSM3GQsYYInQZIvnqovr6aEKXKrx oYrWuSEnPi+r15aZKHDjv7w+DgoKUBFY1mdbzKsLwUzDKM3NhU+2DQqRSB1OD9QTEOEt 6HwHBfH1i/b4SKOAQZSE3GcTKO6x0waJnjD/HcgZ6qwmedwbUkKryHyNFLIdWYntQdor 9XQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pbZ48E72; 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 e24si2244170ejx.220.2019.11.24.01.44.06; Sun, 24 Nov 2019 01:44:47 -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=pbZ48E72; 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 S1727130AbfKXJni (ORCPT + 99 others); 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-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 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/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); -- 2.20.1