WSL2-Linux-Kernel/drivers/staging/ks7010
Gustavo A. R. Silva 8ce256540f staging: ks7010: Avoid clashing function prototypes
When built with Control Flow Integrity, function prototypes between
caller and function declaration must match. These mismatches are visible
at compile time with the new -Wcast-function-type-strict in Clang[1].

Fix a total of 27 warnings like these:

drivers/staging/ks7010/ks_wlan_net.c:2415:2: warning: cast from 'int (*)(struct net_device *, struct iw_request_info *, struct iw_point *, char *)' to 'iw_handler' (aka 'int (*)(struct net_device *, struct iw_request_info *, union iwreq_data *, char *)') converts to incompatible function type [-Wcast-function-type-strict]
        (iw_handler)ks_wlan_get_firmware_version,/* 3 KS_WLAN_GET_FIRM_VERSION */
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The ks_wlan_net Wireless Extension handler callbacks (iw_handler) use a
union for the data argument. Actually use the union and perform explicit
member selection in the function body instead of having a function
prototype mismatch. There are no resulting binary differences
before/after changes.

These changes were made partly manually and partly with the help of
Coccinelle.

Link: https://reviews.llvm.org/D134831 [1]
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/8d2ceee1248b5a76e9b6c379f578e65482c91168.1667934775.git.gustavoars@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-09 14:39:03 +01:00
..
Kconfig staging: ks7010: select CRYPTO_HASH/CRYPTO_MICHAEL_MIC 2021-10-13 15:10:21 +02:00
Makefile
TODO staging: ks7010: Update the TODO file for this driver 2022-10-22 09:58:50 +02:00
eap_packet.h
ks7010_sdio.c staging/ks7010: Remove redundant 'flush_workqueue()' calls 2022-02-15 17:05:43 +01:00
ks_hostif.c staging: ks7010: remove null check after call container_of() 2022-05-19 17:42:41 +02:00
ks_hostif.h staging: ks7010: Wrap macro definitions in parenthesis 2021-06-18 13:02:54 +02:00
ks_wlan.h staging/ks7010: replace SME taslet with work 2022-04-12 15:53:50 +02:00
ks_wlan_ioctl.h
ks_wlan_net.c staging: ks7010: Avoid clashing function prototypes 2022-11-09 14:39:03 +01:00