Skip to contentSkip to conversation

gpiolib: acpi: Add missing __init(const) markers to initcall-s

PATCH RESEND Superseded Hans de Goede 2 participants 4 messages Mar 25, 2020 – Apr 16, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover gpiolib: acpi: Add missing __init(const) markers to initcall-s

Hi Linus,

I know it has not been that long ago since I send this out, but still I have the feeling this one seems to have fallen through the cracks?

It has already been Acked by Mika, so if you can queue it up in linux-gpio/for-next that would be great.

Regards,

Hans

#1 lore raw

PATCH RESEND 1/1 gpiolib: acpi: Add missing __init(const) markers to initcall-s

The gpiolib ACPI code uses 2 initcall-s and the called function (and used DMI table) is missing __init(const) markers.

This commit fixes this freeing up some extra memory once the kernel has completed booting.

---
 drivers/gpio/gpiolib-acpi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpio/gpiolib-acpi.c +3 -3
index 0017367e94ee..9276051663da 100644
@@ -1353,7 +1353,7 @@ int acpi_gpio_count(struct device *dev, const char *con_id)
 }
 
 /* Run deferred acpi_gpiochip_request_irqs() */
-static int acpi_gpio_handle_deferred_request_irqs(void)
+static int __init acpi_gpio_handle_deferred_request_irqs(void)
 {
 	struct acpi_gpio_chip *acpi_gpio, *tmp;
 
@@ -1371,7 +1371,7 @@ static int acpi_gpio_handle_deferred_request_irqs(void)
 /* We must use _sync so that this runs after the first deferred_probe run */
 late_initcall_sync(acpi_gpio_handle_deferred_request_irqs);
 
-static const struct dmi_system_id gpiolib_acpi_quirks[] = {
+static const struct dmi_system_id gpiolib_acpi_quirks[] __initconst = {
 	{
 		/*
 		 * The Minix Neo Z83-4 has a micro-USB-B id-pin handler for
@@ -1455,7 +1455,7 @@ static const struct dmi_system_id gpiolib_acpi_quirks[] = {
 	{} /* Terminating entry */
 };
 
-static int acpi_gpio_setup_params(void)
+static int __init acpi_gpio_setup_params(void)
 {
 	const struct acpi_gpiolib_dmi_quirk *quirk = NULL;
 	const struct dmi_system_id *id;
Signature · 1 line
2.26.0.rc2
#3 lore raw
In reply to Hans de Goede
Quoted 5 lines · Hans de Goede

I know it has not been that long ago since I send this out, but still I have the feeling this one seems to have fallen through the cracks?

It has already been Acked by Mika, so if you can queue it up in linux-gpio/for-next that would be great.

It requires the fixes I just sent to Torvalds to be applied first. I simply need that stuff to be upstream before I can apply this. That is why it is deferred.

Sometimes it happens that random fixes are dependent on critical fixes, then the critical fixes need to land upstream before the random fix can be applied, this is one of those cases.

Yours,
Linus Walleij