summaryrefslogtreecommitdiffstats
path: root/drivers/net/Makefile
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2022-11-08 14:26:47 -0600
committerKalle Valo <kvalo@kernel.org>2022-11-16 11:31:47 +0200
commitff7efc66b7ea7bd2e575b3d56e24628b2f418315 (patch)
tree73a2be4daca32392388eb3b6b472bcd381ff5585 /drivers/net/Makefile
parentfd7ef879a9835f9374fd611f2d6118e4a8f9b919 (diff)
downloadlinux-ff7efc66b7ea7bd2e575b3d56e24628b2f418315.tar.bz2
wifi: zd1201: 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 30 warnings like these: ../drivers/net/wireless/zydas/zd1201.c:1560:2: warning: cast from 'int (*)(struct net_device *, struct iw_request_info *, struct iw_freq *, 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) zd1201_set_freq, /* SIOCSIWFREQ */ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ The zd1201 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/233 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/5b7fbb1a22d5bfaa872263ca20297de9b431d1ec.1667934775.git.gustavoars@kernel.org
Diffstat (limited to 'drivers/net/Makefile')
0 files changed, 0 insertions, 0 deletions