summaryrefslogtreecommitdiffstats
path: root/drivers/peci
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2024-02-13 11:07:50 +0100
committerDavid S. Miller <davem@davemloft.net>2024-02-14 12:49:47 +0000
commit5d07e432cb387b9f7d4f0e07245705744c7fb05b (patch)
treeafa0888619895a9468f4642b0d4ccca17bc49dba /drivers/peci
parent6cf9ff463317217d95732a6cce6fbdd12508921a (diff)
downloadlinux-stable-5d07e432cb387b9f7d4f0e07245705744c7fb05b.tar.gz
linux-stable-5d07e432cb387b9f7d4f0e07245705744c7fb05b.tar.bz2
linux-stable-5d07e432cb387b9f7d4f0e07245705744c7fb05b.zip
bnad: fix work_queue type mismatch
clang-16 warns about a function pointer cast: drivers/net/ethernet/brocade/bna/bnad.c:1995:4: error: cast from 'void (*)(struct delayed_work *)' to 'work_func_t' (aka 'void (*)(struct work_struct *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] 1995 | (work_func_t)bnad_tx_cleanup); drivers/net/ethernet/brocade/bna/bnad.c:2252:4: error: cast from 'void (*)(void *)' to 'work_func_t' (aka 'void (*)(struct work_struct *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] 2252 | (work_func_t)(bnad_rx_cleanup)); The problem here is mixing up work_struct and delayed_work, which relies the former being the first member of the latter. Change the code to use consistent types here to address the warning and make it more robust against workqueue interface changes. Side note: the use of a delayed workqueue for cleaning up TX descriptors is probably a bad idea since this introduces a noticeable delay. The driver currently does not appear to use BQL, but if one wanted to add that, this would have to be changed as well. Fixes: 01b54b145185 ("bna: tx rx cleanup fix") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/peci')
0 files changed, 0 insertions, 0 deletions