diff options
| author | Nathan Chancellor <nathan@kernel.org> | 2026-11-15 21:45:22 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-11-17 18:45:09 -0800 |
| commit | 695d0824cb6b27ff1a1cdeabb2d5138f00b15251 (patch) | |
| tree | 977ba3def3c2384b7da966b8172aa47af6a55eca /tools/perf/scripts/python | |
| parent | 5ec918f8d66a0311c52cc767ade67e7019beb176 (diff) | |
qca_spi: Avoid unsequenced accesses to jiffies in qcaspi_netdev_tx_timeout()
After a recent improvement in clang to warn on unsequenced accesses to
volatile variables [1], an instance appears in
qcaspi_netdev_tx_timeout(), which can break the build with
CONFIG_WERROR=y / W=e:
drivers/net/ethernet/qualcomm/qca_spi.c:805:16: error: unsequenced accesses to volatile qualified 'jiffies' [-Werror,-Wunsequenced]
805 | jiffies, jiffies - dev_trans_start(dev));
| ~~~~~~~ ^
Per C11 5.1.2.3.2, accessing a volatile object is a side effect. Per C11
6.5.2, unsequenced side effects on the same scalar object are undefined
behavior. Per C11 6.5.2.2.10/12, the evaluation of arguments in a
function call is indeterminately sequenced, meaning any side effects in
the arguments are unsequenced.
Printing jiffies on its own is not that useful for debugging transmit
timeouts, so get rid of it to clear up the warning.
Cc: stable@vger.kernel.org
Fixes: 291ab06ecf67 ("net: qualcomm: new Ethernet over SPI driver for QCA7000")
Closes: https://github.com/ClangBuiltLinux/linux/issues/2197
Link: https://github.com/llvm/llvm-project/commit/955715460eaf9188c241c74750637fc82dfcc423 [1]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://patch.msgid.link/20261115-qca_spi-wunsequenced-v2-1-8cf32f12d546@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
