Skip to content

Commit 574d06c

Browse files
tititiou36Jiri Kosina
authored andcommitted
HID: Reorder fields in 'struct hid_input'
Group some variables based on their sizes to reduce hole and avoid padding. On x86_64, this shrinks the size of 'struct hid_input' from 72 to 64 bytes. It saves a few bytes of memory and is more cache-line friendly. Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 276e14e commit 574d06c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/hid.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,9 +556,9 @@ struct hid_input {
556556
struct hid_report *report;
557557
struct input_dev *input;
558558
const char *name;
559-
bool registered;
560559
struct list_head reports; /* the list of reports */
561560
unsigned int application; /* application usage for this input */
561+
bool registered;
562562
};
563563

564564
enum hid_type {

0 commit comments

Comments
 (0)