aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/net/cfg80211-wext.h
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2022-11-08 14:21:24 -0600
committerKalle Valo <kvalo@kernel.org>2022-11-16 11:31:47 +0200
commit2c0e077db65a9410a2f0a36526918c77098a85a6 (patch)
tree8fff9c85de29318b20419589b42916ef70a1e1f0 /include/net/cfg80211-wext.h
parentwifi: rtl8xxxu: Use u32_get_bits in *_identify_chip (diff)
downloadwireguard-linux-2c0e077db65a9410a2f0a36526918c77098a85a6.tar.xz
wireguard-linux-2c0e077db65a9410a2f0a36526918c77098a85a6.zip
wifi: orinoco: 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 43 warnings like these: drivers/net/wireless/intersil/orinoco/wext.c:1379:27: warning: cast from 'int (*)(struct net_device *, struct iw_request_info *, struct iw_param *, 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(SIOCGIWPOWER, (iw_handler)orinoco_ioctl_getpower), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The orinoco 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. No significant binary differences were seen before/after changes. These changes were made partly manually and partly with the help of Coccinelle. Link: https://github.com/KSPP/linux/issues/234 Link: https://reviews.llvm.org/D134831 [1] Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/e564003608a1f2ad86283370ef816805c92b30f6.1667934775.git.gustavoars@kernel.org
Diffstat (limited to 'include/net/cfg80211-wext.h')
0 files changed, 0 insertions, 0 deletions