media: rc: reduce useless padding in struct rc_dev etc
Subsystems (2)
Sean Young
maintainerPATCH v2 1/1 media: rc: reduce useless padding in struct rc_dev etc
Reorder the fields in these structs so that we waste less space due to padding. pahole shows that lirc_fh is 8 bytes smaller, and rc_dev is 32 bytes smaller.
Signed-off-by Sean Young <[email protected]>
--- drivers/media/rc/rc-core-priv.h | 4 +-- include/media/rc-core.h | 46 ++++++++++++++++----------------- 2 files changed, 25 insertions(+), 25 deletions(-)
drivers/media/rc/rc-core-priv.h +2 -2
@@ -85,8 +85,8 @@ struct ir_raw_event_ctrl {struct rc6_dec {int state;u8 header; -u32 body;bool toggle; +u32 body;unsigned count;unsigned wanted_bits; } rc6;
@@ -127,8 +127,8 @@ struct ir_raw_event_ctrl {struct mce_kbd_dec {/* locks key up timer */ spinlock_t keylock; -struct timer_list rx_timeout;int state; +struct timer_list rx_timeout;u8 header;u32 body;unsigned count;
include/media/rc-core.h +23 -23
131 lines not on this page · raw message
Signature · 1 line
2.48.1