lkml.org 
[lkml]   [2024]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: wifi: brcmsmac: avoid function pointer casts
From
Date
Arnd Bergmann <arnd@kernel.org> wrote:

> From: Arnd Bergmann <arnd@arndb.de>
>
> An old cleanup went a little too far and causes a warning with clang-16
> and higher as it breaks control flow integrity (KCFI) rules:
>
> drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.c:64:34: error: cast from 'void (*)(struct brcms_phy *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict]
> 64 | brcms_init_timer(physhim->wl, (void (*)(void *))fn,
> | ^~~~~~~~~~~~~~~~~~~~
>
> Change this one instance back to passing a void pointer so it can be
> used with the timer callback interface.
>
> Fixes: d89a4c80601d ("staging: brcm80211: removed void * from softmac phy")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>

Patch applied to wireless-next.git, thanks.

e1ea6db35fc3 wifi: brcmsmac: avoid function pointer casts

--
https://patchwork.kernel.org/project/linux-wireless/patch/20240213100548.457854-1-arnd@kernel.org/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


\
 
 \ /
  Last update: 2024-05-27 15:07    [W:1.050 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site