net: macsec: Add endianness annotations in salt struct
Subsystems (3)
PATCH 1/1 net: macsec: Add endianness annotations in salt struct
This change resolves warning produced by sparse tool as currently there is a mismatch between normal generic type in salt and endian annotated type in macsec driver code. Endian annotated types should be used here.
Sparse output:
warning: restricted ssci_t degrades to integer
warning: incorrect type in assignment (different base types)
expected restricted ssci_t [usertype] ssci
got unsigned int
warning: restricted __be64 degrades to integer
warning: incorrect type in assignment (different base types)
expected restricted __be64 [usertype] pn
got unsigned long long
--- include/net/macsec.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/net/macsec.h +2 -2
@@ -38,8 +38,8 @@ struct metadata_dst;typedef union salt {struct { -u32 ssci; -u64 pn; +ssci_t ssci; +__be64 pn; } __packed;u8 bytes[MACSEC_SALT_LEN ]; } __packed salt_t;
Signature · 1 line
2.47.1
Quoted 15 lines · Ales Nezbeda
This change resolves warning produced by sparse tool as currently there is a mismatch between normal generic type in salt and endian annotated type in macsec driver code. Endian annotated types should be used here.
Sparse output:
warning: restrictedssci_tdegrades to integer
warning: incorrect type in assignment (different base types)
expected restrictedssci_t[usertype] ssci
got unsigned int
warning: restricted__be64degrades to integer
warning: incorrect type in assignment (different base types)
expected restricted__be64[usertype] pn
got unsigned long long
Quoted 1 line
Signed-off-by Ales Nezbeda <[email protected]>
Quoted 15 lines · Ales Nezbeda
This change resolves warning produced by sparse tool as currently there is a mismatch between normal generic type in salt and endian annotated type in macsec driver code. Endian annotated types should be used here.
Sparse output:
warning: restrictedssci_tdegrades to integer
warning: incorrect type in assignment (different base types)
expected restrictedssci_t[usertype] ssci
got unsigned int
warning: restricted__be64degrades to integer
warning: incorrect type in assignment (different base types)
expected restricted__be64[usertype] pn
got unsigned long long
Quoted 4 lines
Signed-off-by Ales Nezbeda <[email protected]>--- include/net/macsec.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
Sabrina
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Quoted 15 lines · On Fri, 17 Jan 2025 12:22:28 +0100 you wrote:
This change resolves warning produced by sparse tool as currently there is a mismatch between normal generic type in salt and endian annotated type in macsec driver code. Endian annotated types should be used here.
Sparse output:
warning: restrictedssci_tdegrades to integer
warning: incorrect type in assignment (different base types)
expected restrictedssci_t[usertype] ssci
got unsigned int
warning: restricted__be64degrades to integer
warning: incorrect type in assignment (different base types)
expected restricted__be64[usertype] pn
got unsigned long long
Quoted 1 line
[...]
Here is the summary with links:
- [net-next] net: macsec: Add endianness annotations in salt struct
https://git.kernel.org/netdev/net-next/c/457bb7970a0f
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html