ACPI: bus: Make container_of() no-op where it makes sense
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 25 Mar 2024 12:32:57 +0000 (14:32 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 4 Apr 2024 19:19:02 +0000 (21:19 +0200)
commit32666d9cb3ddcf0041b6377cbab68f4c2d7c4171
tree47e46bc36965434a6c3dc4f4bf5bf28936a78f0b
parent39cd87c4eb2b893354f3b850f916353f2658ae6f
ACPI: bus: Make container_of() no-op where it makes sense

Move list head node to be the first member in a few data structures
in order to make container_of() no-op at compile time. On x86_64 with
a custom (default + a few dozens of drivers enabled) configuration:

  add/remove: 0/0 grow/shrink: 5/12 up/down: 21/-124 (-103)
  ...
  Total: Before=39924675, After=39924572, chg -0.00%

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
include/acpi/acpi_bus.h