mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 05:04:02 +02:00
mfd: viperboard: Fix native fields type in structures as little-endian
Sparse reports several warnings about incorrect type in assignment
(different base types) when building the i2c-viperboard.c driver:
warning: incorrect type in assignment (different base types)
expected unsigned short [usertype] addr
got restricted __le16 [usertype]
Signed-off-by: Mikhail Lukianchikov <avermoal@gmail.com>
Link: https://patch.msgid.link/20260717121015.11666-2-avermoal@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
b1eb3de64d
commit
d97a98f434
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
struct vprbrd_i2c_write_hdr {
|
||||
u8 cmd;
|
||||
u16 addr;
|
||||
__le16 addr;
|
||||
u8 len1;
|
||||
u8 len2;
|
||||
u8 last;
|
||||
|
|
@ -57,15 +57,15 @@ struct vprbrd_i2c_write_hdr {
|
|||
|
||||
struct vprbrd_i2c_read_hdr {
|
||||
u8 cmd;
|
||||
u16 addr;
|
||||
__le16 addr;
|
||||
u8 len0;
|
||||
u8 len1;
|
||||
u8 len2;
|
||||
u8 len3;
|
||||
u8 len4;
|
||||
u8 len5;
|
||||
u16 tf1; /* transfer 1 length */
|
||||
u16 tf2; /* transfer 2 length */
|
||||
__le16 tf1; /* transfer 1 length */
|
||||
__le16 tf2; /* transfer 2 length */
|
||||
} __packed;
|
||||
|
||||
struct vprbrd_i2c_status {
|
||||
|
|
@ -89,7 +89,7 @@ struct vprbrd_i2c_addr_msg {
|
|||
u8 cmd;
|
||||
u8 addr;
|
||||
u8 unknown1;
|
||||
u16 len;
|
||||
__le16 len;
|
||||
u8 unknown2;
|
||||
u8 unknown3;
|
||||
} __packed;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user