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.7~2013^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=574d06ceb88fb735a7d88c22e6531f4849aada51;p=platform%2Fkernel%2Flinux-starfive.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 9e8f878..be9e16c 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 {