Re: [PATCH] brcmsmac: avoid function pointer casts

From: Arend Van Spriel
Date: Thu Feb 15 2024 - 08:52:24 EST


On February 15, 2024 11:33:30 AM Kalle Valo <kvalo@xxxxxxxxxx> wrote:

Arnd Bergmann <arnd@xxxxxxxxxx> wrote:

From: Arnd Bergmann <arnd@xxxxxxxx>

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@xxxxxxxx>

I can add 'wifi:' during commit. Arend, ack?

Here it is:

Acked-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>


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

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



Attachment: smime.p7s
Description: S/MIME Cryptographic Signature