aboutsummaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorSimon Horman <horms@kernel.org>2024-10-09 10:40:10 +0100
committerJakub Kicinski <kuba@kernel.org>2024-10-14 17:27:10 -0700
commit76d37e4fd638a582cf13bec243ebab0af3658d07 (patch)
treee1ca05fc59afd24d1364bcd86d07892802f043ca /net/ipv4/tcp_output.c
parent01b6b9315f15f199a206c8b3bd3e051584237d7e (diff)
downloadlinux-76d37e4fd638a582cf13bec243ebab0af3658d07.tar.gz
linux-76d37e4fd638a582cf13bec243ebab0af3658d07.tar.bz2
linux-76d37e4fd638a582cf13bec243ebab0af3658d07.zip
tg3: Address byte-order miss-matches
Address byte-order miss-matches flagged by Sparse. In tg3_load_firmware_cpu() and tg3_get_device_address() this is done using appropriate types to store big endian values. In the cases of tg3_test_nvram(), where buf is an array which contains values of several different types, cast to __le32 before converting values to host byte order. Reported by Sparse as: .../tg3.c:3745:34: warning: cast to restricted __be32 .../tg3.c:13096:21: warning: cast to restricted __le32 .../tg3.c:13096:21: warning: cast from restricted __be32 .../tg3.c:13101:21: warning: cast to restricted __le32 .../tg3.c:13101:21: warning: cast from restricted __be32 .../tg3.c:17070:63: warning: incorrect type in argument 3 (different base types) .../tg3.c:17070:63: expected restricted __be32 [usertype] *val .../tg3.c:17070:63: got unsigned int * dr.../tg3.c:17071:63: warning: incorrect type in argument 3 (different base types) .../tg3.c:17071:63: expected restricted __be32 [usertype] *val .../tg3.c:17071:63: got unsigned int * Also, address white-space issues on lines modified for the above. And, for consistency, lines adjacent to them. Compile tested only. No functional change intended. Signed-off-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20241009-tg3-sparse-v1-1-6af38a7bf4ff@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4/tcp_output.c')
0 files changed, 0 insertions, 0 deletions