summaryrefslogtreecommitdiff
path: root/drivers/thermal/rockchip_thermal.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-06-09 10:03:28 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-06-09 10:03:28 -0700
commit842c3b3ddc5f4d17275edbaa09e23d712bf8b915 (patch)
treeb799b2ed574a7bd685e3e991116157eadb3f99b1 /drivers/thermal/rockchip_thermal.c
parent49beadbd47c270a00754c107a837b4f29df4c822 (diff)
downloadlwn-842c3b3ddc5f4d17275edbaa09e23d712bf8b915.tar.gz
lwn-842c3b3ddc5f4d17275edbaa09e23d712bf8b915.zip
mellanox: mlx5: avoid uninitialized variable warning with gcc-12
gcc-12 started warning about 'tracker' being used uninitialized: drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c: In function ‘mlx5_do_bond’: drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c:786:28: warning: ‘tracker’ is used uninitialized [-Wuninitialized] 786 | struct lag_tracker tracker; | ^~~~~~~ which seems to be because it doesn't track how the use (and initialization) is bound by the 'do_bond' flag. But admittedly that 'do_bond' usage is fairly complicated, and involves passing it around as an argument to helper functions, so it's somewhat understandable that gcc doesn't see how that all works. This function could be rewritten to make the use of that tracker variable more obviously safe, but for now I'm just adding the forced initialization of it. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/thermal/rockchip_thermal.c')
0 files changed, 0 insertions, 0 deletions