History

HID: uhid: use __packed__ for uhid_feature_answer_req

We use __packed__ for all API structures so we can extend them without breaking alignment rules. We do try to explicitly align the structures, but to be safe we also use __packed__. uhid_feature_answer_req is already 64bit aligned so we can add __packed__ without breaking ABI.

David Herrmann committed 13 years ago

Commit fee5dfe1 parent f4254581 file · +1 −1Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/uhid.h+1−1
@@ -86,7 +86,7 @@ struct uhid_feature_answer_req { · 85 unmodified lines
86 __u16 err;86 __u16 err;
87 __u16 size;87 __u16 size;
88 __u8 data[UHID_DATA_MAX];88 __u8 data[UHID_DATA_MAX];
89};89} __attribute__((__packed__));
90 90
91struct uhid_event {91struct uhid_event {
92 __u32 type;92 __u32 type;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t