diff options
author | Gustavo A. R. Silva <gustavoars@kernel.org> | 2022-11-08 14:27:49 -0600 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2022-11-16 11:31:48 +0200 |
commit | 89e706459848a7cc80f222a1999c0bfcdf63289f (patch) | |
tree | 22bbd5bc28094c52b16b27441fd6d97ab09f9b46 /drivers/net/wwan/Makefile | |
parent | ff7efc66b7ea7bd2e575b3d56e24628b2f418315 (diff) | |
download | linux-89e706459848a7cc80f222a1999c0bfcdf63289f.tar.bz2 |
wifi: airo: 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 32 warnings like these:
../drivers/net/wireless/cisco/airo.c:7570:2: warning: cast from 'int (*)(struct net_device *, struct iw_request_info *, void *, 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) airo_config_commit, /* SIOCSIWCOMMIT */
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The airo 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://github.com/KSPP/linux/issues/236
Link: https://reviews.llvm.org/D134831 [1]
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/820abf91d12809904696ddb8925ec5e1e0da3e4c.1667934775.git.gustavoars@kernel.org
Diffstat (limited to 'drivers/net/wwan/Makefile')
0 files changed, 0 insertions, 0 deletions