From: Christophe JAILLET Date: Sun, 18 Jun 2023 09:11:58 +0000 (+0200) Subject: HID: Reorder fields in 'struct hid_input' X-Git-Tag: v6.6-rc1~96^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=574d06ceb88fb735a7d88c22e6531f4849aada51;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Jiri Kosina --- diff --git a/include/linux/hid.h b/include/linux/hid.h index 9e8f87800e21a..be9e16cb8bd1b 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 {