Skip to content

Commit

Permalink
Input: yealink - define packet offset __be16 instead of u16
Browse files Browse the repository at this point in the history
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: Martin Kepplinger <[email protected]>
Signed-off-by: [email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
  • Loading branch information
merge authored and dtor committed Apr 11, 2017
1 parent bee8449 commit c5cb37d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/misc/yealink.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
struct yld_ctl_packet {
u8 cmd; /* command code, see below */
u8 size; /* 1-11, size of used data bytes. */
u16 offset; /* internal packet offset */
__be16 offset; /* internal packet offset */
u8 data[11];
s8 sum; /* negative sum of 15 preceding bytes */
} __attribute__ ((packed));
Expand Down

0 comments on commit c5cb37d

Please sign in to comment.