All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phong Tran <tranmanphong@gmail.com>
To: jakub.kicinski@netronome.com, kvalo@codeaurora.org,
	davem@davemloft.net, luciano.coelho@intel.com,
	shahar.s.matityahu@intel.com, johannes.berg@intel.com,
	emmanuel.grumbach@intel.com, sara.sharon@intel.com,
	Larry.Finger@lwfinger.net, yhchuang@realtek.com,
	yuehaibing@huawei.com, pkshih@realtek.com,
	arend.vanspriel@broadcom.com, rafal@milecki.pl,
	franky.lin@broadcom.com, pieter-paul.giesberts@broadcom.com,
	p.figiel@camlintechnologies.com, Wright.Feng@cypress.com,
	keescook@chromium.org
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, Phong Tran <tranmanphong@gmail.com>
Subject: [PATCH 3/3] drivers: net: realtek: Fix -Wcast-function-type
Date: Mon, 25 Nov 2019 22:02:15 +0700	[thread overview]
Message-ID: <20191125150215.29263-3-tranmanphong@gmail.com> (raw)
In-Reply-To: <20191125150215.29263-1-tranmanphong@gmail.com>

correct usage prototype of callback in tasklet_init().
Report by https://github.com/KSPP/linux/issues/20

Signed-off-by: Phong Tran <tranmanphong@gmail.com>
---
 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


  parent reply	other threads:[~2019-11-25 15:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-25 15:02 [PATCH 1/3] drivers: net: b43legacy: Fix -Wcast-function-type Phong Tran
2019-11-25 15:02 ` [PATCH 2/3] drivers: net: intel: " Phong Tran
2019-11-25 17:30   ` Larry Finger
2019-11-25 17:56     ` Kalle Valo
2019-11-25 15:02 ` Phong Tran [this message]
2019-11-25 17:33   ` [PATCH 3/3] drivers: net: realtek: " Larry Finger
2019-11-25 17:26 ` [PATCH 1/3] drivers: net: b43legacy: " Larry Finger
2019-11-25 17:28   ` Jakub Kicinski
2019-11-25 17:29   ` Kalle Valo
2019-11-26 17:55 ` [Patch v2 0/4] wireless: " Phong Tran
2019-11-26 17:55   ` [Patch v2 1/4] b43legacy: " Phong Tran
2019-11-27  5:05     ` Kees Cook
2019-12-18 18:55     ` Kalle Valo
2019-11-26 17:55   ` [Patch v2 2/4] ipw2x00: " Phong Tran
2019-11-27  5:05     ` Kees Cook
2019-11-26 17:55   ` [Patch v2 3/4] iwlegacy: " Phong Tran
2019-11-27  5:05     ` Kees Cook
2019-11-26 17:55   ` [Patch v2 4/4] rtlwifi: rtl_pci: " Phong Tran
2019-11-27  5:05     ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191125150215.29263-3-tranmanphong@gmail.com \
    --to=tranmanphong@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=Wright.Feng@cypress.com \
    --cc=arend.vanspriel@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=emmanuel.grumbach@intel.com \
    --cc=franky.lin@broadcom.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=johannes.berg@intel.com \
    --cc=keescook@chromium.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=p.figiel@camlintechnologies.com \
    --cc=pieter-paul.giesberts@broadcom.com \
    --cc=pkshih@realtek.com \
    --cc=rafal@milecki.pl \
    --cc=sara.sharon@intel.com \
    --cc=shahar.s.matityahu@intel.com \
    --cc=yhchuang@realtek.com \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.