mirror of https://github.com/torvalds/linux.git
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
Signed-off-by: Ales Nezbeda <anezbeda@redhat.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5fe71fda89
commit
457bb7970a
|
|
@ -38,8 +38,8 @@ struct metadata_dst;
|
||||||
|
|
||||||
typedef union salt {
|
typedef union salt {
|
||||||
struct {
|
struct {
|
||||||
u32 ssci;
|
ssci_t ssci;
|
||||||
u64 pn;
|
__be64 pn;
|
||||||
} __packed;
|
} __packed;
|
||||||
u8 bytes[MACSEC_SALT_LEN];
|
u8 bytes[MACSEC_SALT_LEN];
|
||||||
} __packed salt_t;
|
} __packed salt_t;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue