diff mbox series

[v1,6/6] ACPI: acpi_video: Fix holes in acpi_video_bus

Message ID 20231025111806.2416524-7-michal.wilczynski@intel.com
State New
Headers show
Series Replace acpi_driver with platform_driver | expand

Commit Message

Michal Wilczynski Oct. 25, 2023, 11:18 a.m. UTC
As identified by 'pahole' utility there are holes in acpi_video_bus
struct. Rearrange elements to get rid of the holes. Put elements
biggest in size first, and one-byte elements later.

Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
---
 drivers/acpi/acpi_video.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Andy Shevchenko Oct. 26, 2023, 12:25 p.m. UTC | #1
On Wed, Oct 25, 2023 at 02:18:06PM +0300, Michal Wilczynski wrote:
> As identified by 'pahole' utility there are holes in acpi_video_bus
> struct. Rearrange elements to get rid of the holes. Put elements
> biggest in size first, and one-byte elements later.

How does this affect the code generation (e.g., measured by bloat-o-meter)?
diff mbox series

Patch

diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index bfc7f51a527d..1e10d5b748b2 100644
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
@@ -155,19 +155,19 @@  struct acpi_video_enumerated_device {
 
 struct acpi_video_bus {
 	struct acpi_device *device;
+	struct acpi_video_enumerated_device *attached_array;
+	struct list_head video_device_list;
+	struct mutex device_list_lock;	/* protects video_device_list */
+	struct list_head entry;
+	struct input_dev *input;
+	struct notifier_block pm_nb;
 	bool backlight_registered;
 	u8 dos_setting;
-	struct acpi_video_enumerated_device *attached_array;
 	u8 attached_count;
 	u8 child_count;
 	struct acpi_video_bus_cap cap;
 	struct acpi_video_bus_flags flags;
-	struct list_head video_device_list;
-	struct mutex device_list_lock;	/* protects video_device_list */
-	struct list_head entry;
-	struct input_dev *input;
 	char phys[32];	/* for input device */
-	struct notifier_block pm_nb;
 };
 
 struct acpi_video_device_flags {