From: Christophe JAILLET Date: Fri, 17 Feb 2023 20:22:57 +0000 (+0100) Subject: serial: 8250: Reorder fields in 'struct plat_serial8250_port' X-Git-Tag: v6.6.7~2984^2~81 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=85bce38a7e1f392f5051e67fd5fcfbffe71e9b81;p=platform%2Fkernel%2Flinux-starfive.git serial: 8250: Reorder fields in 'struct plat_serial8250_port' Group some variables based on their sizes to reduce hole and avoid padding. On x86_64, this shrinks the size of 'struct plat_serial8250_port' from 144 to 128 bytes. It saves a few bytes of memory. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/f3cb1efe1454e0615840fd331ee335bc441589a9.1676665358.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index 19376be..741ed48 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h @@ -18,16 +18,16 @@ struct plat_serial8250_port { unsigned long iobase; /* io base address */ void __iomem *membase; /* ioremap cookie or NULL */ resource_size_t mapbase; /* resource base */ + unsigned int uartclk; /* UART clock rate */ unsigned int irq; /* interrupt number */ unsigned long irqflags; /* request_irq flags */ - unsigned int uartclk; /* UART clock rate */ void *private_data; unsigned char regshift; /* register shift */ unsigned char iotype; /* UPIO_* */ unsigned char hub6; unsigned char has_sysrq; /* supports magic SysRq */ - upf_t flags; /* UPF_* flags */ unsigned int type; /* If UPF_FIXED_TYPE */ + upf_t flags; /* UPF_* flags */ unsigned int (*serial_in)(struct uart_port *, int); void (*serial_out)(struct uart_port *, int, int); void (*set_termios)(struct uart_port *,