]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
b43legacy: Fix -Wcast-function-type
authorPhong Tran <tranmanphong@gmail.com>
Tue, 26 Nov 2019 17:55:26 +0000 (00:55 +0700)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 18 Dec 2019 18:54:41 +0000 (20:54 +0200)
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>
drivers/net/wireless/broadcom/b43legacy/main.c

index 4325e91736eb374081abe9280a73cb7785361b2f..8b6b657c4b85b5bc4614a2fc565bcbc95a7af97f 100644 (file)
@@ -1275,8 +1275,9 @@ static void handle_irq_ucode_debug(struct b43legacy_wldev *dev)
 }
 
 /* Interrupt handler bottom-half */
-static void b43legacy_interrupt_tasklet(struct b43legacy_wldev *dev)
+static void b43legacy_interrupt_tasklet(unsigned long data)
 {
+       struct b43legacy_wldev *dev = (struct b43legacy_wldev *)data;
        u32 reason;
        u32 dma_reason[ARRAY_SIZE(dev->dma_reason)];
        u32 merged_dma_reason = 0;
@@ -3741,7 +3742,7 @@ static int b43legacy_one_core_attach(struct ssb_device *dev,
        b43legacy_set_status(wldev, B43legacy_STAT_UNINIT);
        wldev->bad_frames_preempt = modparam_bad_frames_preempt;
        tasklet_init(&wldev->isr_tasklet,
-                    (void (*)(unsigned long))b43legacy_interrupt_tasklet,
+                    b43legacy_interrupt_tasklet,
                     (unsigned long)wldev);
        if (modparam_pio)
                wldev->__using_pio = true;