Message ID | 20201102112410.1049272-18-lee.jones@linaro.org (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [01/41] wil6210: wmi: Correct misnamed function parameter 'ptr_' | expand |
Lee Jones <lee.jones@linaro.org> wrote: > Fixes the following W=1 kernel build warning(s): > > drivers/net/wireless/intersil/hostap/hostap_hw.c: In function ‘prism2_init_local_data’: > drivers/net/wireless/intersil/hostap/hostap_hw.c:3173:48: warning: cast between incompatible function types from ‘void (*)(struct tasklet_struct *)’ to ‘void (*)(long unsigned int)’ [-Wcast-function-type] > drivers/net/wireless/intersil/hostap/hostap_hw.c:3175:2: note: in expansion of macro ‘HOSTAP_TASKLET_INIT’ > > NB: Repeats lots of times - snipped for brevity > > Cc: Jouni Malinen <j@w1.fi> > Cc: Kalle Valo <kvalo@codeaurora.org> > Cc: "David S. Miller" <davem@davemloft.net> > Cc: Jakub Kicinski <kuba@kernel.org> > Cc: linux-wireless@vger.kernel.org > Cc: netdev@vger.kernel.org > Signed-off-by: Lee Jones <lee.jones@linaro.org> Already fixed in wireless-drivers-next Recorded preimage for 'drivers/net/wireless/intersil/hostap/hostap_hw.c' error: Failed to merge in the changes. Applying: intersil: hostap_hw: Prevent incompatible function type cast Using index info to reconstruct a base tree... M drivers/net/wireless/intersil/hostap/hostap_hw.c Falling back to patching base and 3-way merge... Auto-merging drivers/net/wireless/intersil/hostap/hostap_hw.c CONFLICT (content): Merge conflict in drivers/net/wireless/intersil/hostap/hostap_hw.c Patch failed at 0001 intersil: hostap_hw: Prevent incompatible function type cast The copy of the patch that failed is found in: .git/rebase-apply/patch Patch set to Superseded.
diff --git a/drivers/net/wireless/intersil/hostap/hostap_hw.c b/drivers/net/wireless/intersil/hostap/hostap_hw.c index 22cfb64526448..c877b677505ed 100644 --- a/drivers/net/wireless/intersil/hostap/hostap_hw.c +++ b/drivers/net/wireless/intersil/hostap/hostap_hw.c @@ -36,6 +36,7 @@ #include <linux/proc_fs.h> #include <linux/seq_file.h> #include <linux/if_arp.h> +#include <linux/interrupt.h> #include <linux/delay.h> #include <linux/random.h> #include <linux/wait.h> @@ -3169,22 +3170,16 @@ prism2_init_local_data(struct prism2_helper_functions *funcs, int card_idx, /* Initialize tasklets for handling hardware IRQ related operations * outside hw IRQ handler */ -#define HOSTAP_TASKLET_INIT(q, f, d) \ -do { memset((q), 0, sizeof(*(q))); (q)->func = (void(*)(unsigned long))(f); } \ -while (0) - HOSTAP_TASKLET_INIT(&local->bap_tasklet, hostap_bap_tasklet, - (unsigned long) local); - - HOSTAP_TASKLET_INIT(&local->info_tasklet, hostap_info_tasklet, - (unsigned long) local); + + tasklet_setup(&local->bap_tasklet, hostap_bap_tasklet); + + tasklet_setup(&local->info_tasklet, hostap_info_tasklet); hostap_info_init(local); - HOSTAP_TASKLET_INIT(&local->rx_tasklet, - hostap_rx_tasklet, (unsigned long) local); + tasklet_setup(&local->rx_tasklet, hostap_rx_tasklet); skb_queue_head_init(&local->rx_list); - HOSTAP_TASKLET_INIT(&local->sta_tx_exc_tasklet, - hostap_sta_tx_exc_tasklet, (unsigned long) local); + tasklet_setup(&local->sta_tx_exc_tasklet, hostap_sta_tx_exc_tasklet); skb_queue_head_init(&local->sta_tx_exc_list); INIT_LIST_HEAD(&local->cmd_queue);
Fixes the following W=1 kernel build warning(s): drivers/net/wireless/intersil/hostap/hostap_hw.c: In function ‘prism2_init_local_data’: drivers/net/wireless/intersil/hostap/hostap_hw.c:3173:48: warning: cast between incompatible function types from ‘void (*)(struct tasklet_struct *)’ to ‘void (*)(long unsigned int)’ [-Wcast-function-type] drivers/net/wireless/intersil/hostap/hostap_hw.c:3175:2: note: in expansion of macro ‘HOSTAP_TASKLET_INIT’ NB: Repeats lots of times - snipped for brevity Cc: Jouni Malinen <j@w1.fi> Cc: Kalle Valo <kvalo@codeaurora.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jakub Kicinski <kuba@kernel.org> Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones <lee.jones@linaro.org> --- .../net/wireless/intersil/hostap/hostap_hw.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-)