Skip to content

Commit 457bb79

Browse files
SlouchyButtondavem330
authored andcommitted
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 <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Sabrina Dubroca <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5fe71fd commit 457bb79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/net/macsec.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ struct metadata_dst;
3838

3939
typedef union salt {
4040
struct {
41-
u32 ssci;
42-
u64 pn;
41+
ssci_t ssci;
42+
__be64 pn;
4343
} __packed;
4444
u8 bytes[MACSEC_SALT_LEN];
4545
} __packed salt_t;

0 commit comments

Comments
 (0)