linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phong Tran <tranmanphong@gmail.com>
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 3/4] iwlegacy: Fix -Wcast-function-type
Date: Wed, 27 Nov 2019 00:55:28 +0700	[thread overview]
Message-ID: <20191126175529.10909-4-tranmanphong@gmail.com> (raw)
In-Reply-To: <20191126175529.10909-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/intel/iwlegacy/3945-mac.c | 5 +++--
 drivers/net/wireless/intel/iwlegacy/4965-mac.c | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

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


  parent reply	other threads:[~2019-11-26 17:56 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 ` [PATCH 3/3] drivers: net: realtek: " Phong Tran
2019-11-25 17:33   ` 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   ` Phong Tran [this message]
2019-11-27  5:05     ` [Patch v2 3/4] iwlegacy: " 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=20191126175529.10909-4-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).