提交 c5cb37d0 编写于 作者: M Martin Kepplinger 提交者: Dmitry Torokhov

Input: yealink - define packet offset __be16 instead of u16

sparse says

 warning: incorrect type in assignment (different base types)
    expected unsigned short [unsigned] [usertype] offset
    got restricted __be16 [usertype] <noident>

for every usage of cpu_to_be16 in yealink.c. Defining it __be16 in the
first place shouldn't hurt.
Signed-off-by: NMartin Kepplinger <martin.kepplinger@ginzinger.com>
Signed-off-by: Henk.Vergonet@gmail.com
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 bee84493
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
struct yld_ctl_packet { struct yld_ctl_packet {
u8 cmd; /* command code, see below */ u8 cmd; /* command code, see below */
u8 size; /* 1-11, size of used data bytes. */ u8 size; /* 1-11, size of used data bytes. */
u16 offset; /* internal packet offset */ __be16 offset; /* internal packet offset */
u8 data[11]; u8 data[11];
s8 sum; /* negative sum of 15 preceding bytes */ s8 sum; /* negative sum of 15 preceding bytes */
} __attribute__ ((packed)); } __attribute__ ((packed));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册