diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2023-06-18 12:11:58 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2023-08-14 12:21:22 +0300 |
commit | 574d06ceb88fb735a7d88c22e6531f4849aada51 (patch) | |
tree | 190ee3a54dda1a726b12a76e54e8175c8f12ff4b | |
parent | 276e14e6c3993317257e1787e93b7166fbc30905 (diff) | |
download | linux-574d06ceb88fb735a7d88c22e6531f4849aada51.tar.xz |
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 <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | include/linux/hid.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index 9e8f87800e21..be9e16cb8bd1 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -556,9 +556,9 @@ struct hid_input { struct hid_report *report; struct input_dev *input; const char *name; - bool registered; struct list_head reports; /* the list of reports */ unsigned int application; /* application usage for this input */ + bool registered; }; enum hid_type { |