summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMikhail Lukianchikov <avermoal@gmail.com>2026-07-17 18:10:16 +0600
committerLee Jones <lee@kernel.org>2026-08-06 12:55:00 +0100
commitd97a98f434af98c1a46f5dc98b0f861187c52f63 (patch)
tree5f0f8db41f0f95f59c3f6275a9bd3c2ba4ad3a13 /include/linux
parentb1eb3de64d02cec71b419b9918d1697797fa156d (diff)
downloadlinux-d97a98f434af98c1a46f5dc98b0f861187c52f63.tar.gz
linux-d97a98f434af98c1a46f5dc98b0f861187c52f63.zip
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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mfd/viperboard.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/mfd/viperboard.h b/include/linux/mfd/viperboard.h
index 0557667fe544..5761ebdc81b3 100644
--- a/include/linux/mfd/viperboard.h
+++ b/include/linux/mfd/viperboard.h
@@ -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;