summaryrefslogtreecommitdiff
path: root/drivers/net/sungem_phy.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2022-11-16 10:59:44 -0600
committerDavid S. Miller <davem@davemloft.net>2022-11-21 08:17:59 +0000
commit8719a1c30d3a1b4f347afca8e78be201d66d5c49 (patch)
tree310d6921a097a9461436bab8151d12d1e7f9c76f /drivers/net/sungem_phy.c
parent8bd8dcc5e47f0f9dc40187c3b8b42d992181eee1 (diff)
bna: 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 227 warnings like these: drivers/net/ethernet/brocade/bna/bna_enet.c:519:3: warning: cast from 'void (*)(struct bna_ethport *, enum bna_ethport_event)' to 'bfa_fsm_t' (aka 'void (*)(void *, int)') converts to incompatible function type [-Wcast-function-type-strict] bfa_fsm_set_state(ethport, bna_ethport_sm_down); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The bna state machine code heavily overloads its state machine functions, so these have been separated into their own sets of structs, enums, typedefs, and helper functions. There are almost zero binary code changes, all seem to be related to header file line numbers changing, or the addition of the new stats helper. Important to mention is that while I was manually implementing this changes I was staring at this[2] patch from Kees Cook. Thanks, Kees. :) Link: https://github.com/KSPP/linux/issues/240 [1] https://reviews.llvm.org/D134831 [2] https://lore.kernel.org/linux-hardening/20220929230334.2109344-1-keescook@chromium.org/ Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sungem_phy.c')
0 files changed, 0 insertions, 0 deletions