linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] gpiolib: acpi: Refactor to shrink the code by ~8%
@ 2025-04-03 15:59 Andy Shevchenko
  2025-04-03 15:59 ` [PATCH v2 1/6] gpiolib: acpi: Improve struct acpi_gpio_info memory footprint Andy Shevchenko
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Andy Shevchenko @ 2025-04-03 15:59 UTC (permalink / raw)
  To: Andy Shevchenko, Bartosz Golaszewski, linux-gpio, linux-acpi,
	linux-kernel
  Cc: Mika Westerberg, Linus Walleij, Bartosz Golaszewski

A simple refactoring of the GPIO ACPI library parts to get an impressive
~8% code shrink on x86_64 and ~2% on x86_32. Also reduces a C code a bit.

add/remove: 0/2 grow/shrink: 0/5 up/down: 0/-1221 (-1221)
Function                                     old     new   delta
acpi_gpio_property_lookup                    425     414     -11
acpi_find_gpio.__UNIQUE_ID_ddebug478          56       -     -56
acpi_dev_gpio_irq_wake_get_by.__UNIQUE_ID_ddebug480      56       -     -56
acpi_find_gpio                               354     216    -138
acpi_get_gpiod_by_index                      462     307    -155
__acpi_find_gpio                             877     638    -239
acpi_dev_gpio_irq_wake_get_by                695     129    -566
Total: Before=15375, After=14154, chg -7.94%

In v2:
- renamed par to params (Mika, Bart)

Andy Shevchenko (6):
  gpiolib: acpi: Improve struct acpi_gpio_info memory footprint
  gpiolib: acpi: Remove index parameter from acpi_gpio_property_lookup()
  gpiolib: acpi: Reduce memory footprint for struct acpi_gpio_params
  gpiolib: acpi: Rename par to params for better readability
  gpiolib: acpi: Reuse struct acpi_gpio_params in struct
    acpi_gpio_lookup
  gpiolib: acpi: Deduplicate some code in __acpi_find_gpio()

 drivers/gpio/gpiolib-acpi.c   | 146 +++++++++++++++++-----------------
 include/linux/gpio/consumer.h |   2 +-
 2 files changed, 72 insertions(+), 76 deletions(-)

-- 
2.47.2


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-04-09  7:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-03 15:59 [PATCH v2 0/6] gpiolib: acpi: Refactor to shrink the code by ~8% Andy Shevchenko
2025-04-03 15:59 ` [PATCH v2 1/6] gpiolib: acpi: Improve struct acpi_gpio_info memory footprint Andy Shevchenko
2025-04-03 15:59 ` [PATCH v2 2/6] gpiolib: acpi: Remove index parameter from acpi_gpio_property_lookup() Andy Shevchenko
2025-04-03 15:59 ` [PATCH v2 3/6] gpiolib: acpi: Reduce memory footprint for struct acpi_gpio_params Andy Shevchenko
2025-04-03 15:59 ` [PATCH v2 4/6] gpiolib: acpi: Rename par to params for better readability Andy Shevchenko
2025-04-03 15:59 ` [PATCH v2 5/6] gpiolib: acpi: Reuse struct acpi_gpio_params in struct acpi_gpio_lookup Andy Shevchenko
2025-04-03 15:59 ` [PATCH v2 6/6] gpiolib: acpi: Deduplicate some code in __acpi_find_gpio() Andy Shevchenko
2025-04-08 20:09   ` Kees Bakker
2025-04-09  7:31     ` Andy Shevchenko
2025-04-04  4:43 ` [PATCH v2 0/6] gpiolib: acpi: Refactor to shrink the code by ~8% Mika Westerberg
2025-04-07  6:41   ` Andy Shevchenko
2025-04-04  8:38 ` Bartosz Golaszewski
2025-04-04 10:23   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).