Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

b43legacy: Fix -Wcast-function-type

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

Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

authored by

Phong Tran and committed by
Kalle Valo
475eec11 37bc6c72

+3 -2
+3 -2
drivers/net/wireless/broadcom/b43legacy/main.c
··· 1275 1275 } 1276 1276 1277 1277 /* Interrupt handler bottom-half */ 1278 - static void b43legacy_interrupt_tasklet(struct b43legacy_wldev *dev) 1278 + static void b43legacy_interrupt_tasklet(unsigned long data) 1279 1279 { 1280 + struct b43legacy_wldev *dev = (struct b43legacy_wldev *)data; 1280 1281 u32 reason; 1281 1282 u32 dma_reason[ARRAY_SIZE(dev->dma_reason)]; 1282 1283 u32 merged_dma_reason = 0; ··· 3742 3741 b43legacy_set_status(wldev, B43legacy_STAT_UNINIT); 3743 3742 wldev->bad_frames_preempt = modparam_bad_frames_preempt; 3744 3743 tasklet_init(&wldev->isr_tasklet, 3745 - (void (*)(unsigned long))b43legacy_interrupt_tasklet, 3744 + b43legacy_interrupt_tasklet, 3746 3745 (unsigned long)wldev); 3747 3746 if (modparam_pio) 3748 3747 wldev->__using_pio = true;