pinctrl: renesas: Reorder struct sh_pfc_pin to remove hole
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 28 Oct 2020 15:16:32 +0000 (16:16 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 13 Nov 2020 14:37:41 +0000 (15:37 +0100)
On arm64, pointer size and alignment is 64-bit, hence a 4-byte hole is
present in between the enum_id and name members of the sh_pfc_pin
structure.  Get rid of this hole by sorting the structure's members by
decreasing size.

This saves up to 1.5 KiB per enabled SoC, and reduces the size of a
kernel including support for all R-Car Gen3 SoCs by more than 10 KiB.

This has no size impact on SH and arm32.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20201028151637.1734130-4-geert+renesas@glider.be
drivers/pinctrl/renesas/sh_pfc.h

index eff1bb872325ef3a7482aa9668fa4f5c184e5908..3b390dffacb4910d58a0abdc41f01f5ebb7909d9 100644 (file)
@@ -34,10 +34,10 @@ enum {
 #define SH_PFC_PIN_CFG_NO_GPIO         (1 << 31)
 
 struct sh_pfc_pin {
-       u16 pin;
-       u16 enum_id;
        const char *name;
        unsigned int configs;
+       u16 pin;
+       u16 enum_id;
 };
 
 #define SH_PFC_PIN_GROUP_ALIAS(alias, n)               \