Skip to content
Commit 7e5ed9f5 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Greg Kroah-Hartman
Browse files

serial: Move sysrq members above



At the current place members those follow are:
:	upf_t			flags;
:	upstat_t		status;
:	int			hw_stopped;
:	unsigned int		mctrl;
:	unsigned int		timeout;
:	unsigned int		type;
:	const struct uart_ops	*ops;

Together, they give (*ops) 8-byte align on 64-bit platforms.
And `sysrq_ch` introduces 4-byte padding.

On the other side, above:
:	struct device		*dev;
:	unsigned char		hub6;
:	unsigned char		suspended;
:	unsigned char		unused[2];
:	const char		*name;

Adds another 4-byte padding.

Moving sysrq members just before `hub6` allows to save 8 bytes
per-uart_port on 64-bit platforms:
On my gcc, x86_64 sizeof(struct uart_port) goes from 528 to 520.

Signed-off-by: default avatarDmitry Safonov <dima@arista.com>
Link: https://lore.kernel.org/r/20191213000657.931618-3-dima@arista.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f06327d1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment