Skip to content

Commit 2c6c34e

Browse files
committed
gpiolib: acpi: Improve struct acpi_gpio_info memory footprint
The struct acpi_gpio_info has two boolean members that are located not close to each other making two gaps due to alignment requirements. Group them to improve memory footprint. `pahole` difference before and after (on 32-bit): - /* size: 36, cachelines: 1, members: 9 */ - /* sum members: 30, holes: 2, sum holes: 6 */ + /* size: 32, cachelines: 1, members: 9 */ + /* sum members: 30, holes: 1, sum holes: 2 */ Acked-by: Mika Westerberg <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Andy Shevchenko <[email protected]>
1 parent 0af2f6b commit 2c6c34e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpio/gpiolib-acpi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,21 @@ struct acpi_gpio_chip {
9696
* @adev: reference to ACPI device which consumes GPIO resource
9797
* @flags: GPIO initialization flags
9898
* @gpioint: if %true this GPIO is of type GpioInt otherwise type is GpioIo
99+
* @wake_capable: wake capability as provided by ACPI
99100
* @pin_config: pin bias as provided by ACPI
100101
* @polarity: interrupt polarity as provided by ACPI
101102
* @triggering: triggering type as provided by ACPI
102-
* @wake_capable: wake capability as provided by ACPI
103103
* @debounce: debounce timeout as provided by ACPI
104104
* @quirks: Linux specific quirks as provided by struct acpi_gpio_mapping
105105
*/
106106
struct acpi_gpio_info {
107107
struct acpi_device *adev;
108108
enum gpiod_flags flags;
109109
bool gpioint;
110+
bool wake_capable;
110111
int pin_config;
111112
int polarity;
112113
int triggering;
113-
bool wake_capable;
114114
unsigned int debounce;
115115
unsigned int quirks;
116116
};

0 commit comments

Comments
 (0)