* [PATCH] gpio: synq: remove unused zynq_gpio_irq_reqres/zynq_gpio_irq_relres
@ 2023-06-16 14:50 Arnd Bergmann
2023-06-19 8:57 ` Linus Walleij
2023-06-19 12:50 ` Bartosz Golaszewski
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2023-06-16 14:50 UTC (permalink / raw)
To: Shubhrajyoti Datta, Linus Walleij, Bartosz Golaszewski,
Michal Simek, Manikanta Guntupalli
Cc: Arnd Bergmann, Srinivas Neeli, Andy Shevchenko, linux-gpio,
linux-arm-kernel, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
The driver now uses the generic request/release callbacks, so the custom
ones are no longer called. When building with -Woverride-init, gcc produces
a warning about the duplicate entries:
In file included from drivers/gpio/gpio-zynq.c:10:
include/linux/gpio/driver.h:621:43: error: initialized field overwritten [-Werror=override-init]
621 | .irq_request_resources = gpiochip_irq_reqres, \
| ^~~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-zynq.c:611:9: note: in expansion of macro 'GPIOCHIP_IRQ_RESOURCE_HELPERS'
611 | GPIOCHIP_IRQ_RESOURCE_HELPERS,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/gpio/driver.h:621:43: note: (near initialization for 'zynq_gpio_level_irqchip.irq_request_resources')
621 | .irq_request_resources = gpiochip_irq_reqres, \
| ^~~~~~~~~~~~~~~~~~~
drivers/gpio/gpio-zynq.c:625:9: note: in expansion of macro 'GPIOCHIP_IRQ_RESOURCE_HELPERS'
625 | GPIOCHIP_IRQ_RESOURCE_HELPERS,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/gpio/driver.h:622:43: error: initialized field overwritten [-Werror=override-init]
622 | .irq_release_resources = gpiochip_irq_relres
| ^~~~~~~~~~~~~~~~~~~
Removing the old ones has no effect on the driver but avoids the warnings.
Fixes: f569143935378 ("gpio: zynq: fix zynqmp_gpio not an immutable chip warning")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpio/gpio-zynq.c | 24 ------------------------
1 file changed, 24 deletions(-)
diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
index c334e46033bae..0a7264aabe488 100644
--- a/drivers/gpio/gpio-zynq.c
+++ b/drivers/gpio/gpio-zynq.c
@@ -575,26 +575,6 @@ static int zynq_gpio_set_wake(struct irq_data *data, unsigned int on)
return 0;
}
-static int zynq_gpio_irq_reqres(struct irq_data *d)
-{
- struct gpio_chip *chip = irq_data_get_irq_chip_data(d);
- int ret;
-
- ret = pm_runtime_resume_and_get(chip->parent);
- if (ret < 0)
- return ret;
-
- return gpiochip_reqres_irq(chip, d->hwirq);
-}
-
-static void zynq_gpio_irq_relres(struct irq_data *d)
-{
- struct gpio_chip *chip = irq_data_get_irq_chip_data(d);
-
- gpiochip_relres_irq(chip, d->hwirq);
- pm_runtime_put(chip->parent);
-}
-
/* irq chip descriptor */
static const struct irq_chip zynq_gpio_level_irqchip = {
.name = DRIVER_NAME,
@@ -604,8 +584,6 @@ static const struct irq_chip zynq_gpio_level_irqchip = {
.irq_unmask = zynq_gpio_irq_unmask,
.irq_set_type = zynq_gpio_set_irq_type,
.irq_set_wake = zynq_gpio_set_wake,
- .irq_request_resources = zynq_gpio_irq_reqres,
- .irq_release_resources = zynq_gpio_irq_relres,
.flags = IRQCHIP_EOI_THREADED | IRQCHIP_EOI_IF_HANDLED |
IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_IMMUTABLE,
GPIOCHIP_IRQ_RESOURCE_HELPERS,
@@ -619,8 +597,6 @@ static const struct irq_chip zynq_gpio_edge_irqchip = {
.irq_unmask = zynq_gpio_irq_unmask,
.irq_set_type = zynq_gpio_set_irq_type,
.irq_set_wake = zynq_gpio_set_wake,
- .irq_request_resources = zynq_gpio_irq_reqres,
- .irq_release_resources = zynq_gpio_irq_relres,
.flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_IMMUTABLE,
GPIOCHIP_IRQ_RESOURCE_HELPERS,
};
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] gpio: synq: remove unused zynq_gpio_irq_reqres/zynq_gpio_irq_relres
2023-06-16 14:50 [PATCH] gpio: synq: remove unused zynq_gpio_irq_reqres/zynq_gpio_irq_relres Arnd Bergmann
@ 2023-06-19 8:57 ` Linus Walleij
2023-06-19 12:50 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2023-06-19 8:57 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Shubhrajyoti Datta, Bartosz Golaszewski, Michal Simek,
Manikanta Guntupalli, Arnd Bergmann, Srinivas Neeli,
Andy Shevchenko, linux-gpio, linux-arm-kernel, linux-kernel
On Fri, Jun 16, 2023 at 4:50 PM Arnd Bergmann <arnd@kernel.org> wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The driver now uses the generic request/release callbacks, so the custom
> ones are no longer called. When building with -Woverride-init, gcc produces
> a warning about the duplicate entries:
>
> In file included from drivers/gpio/gpio-zynq.c:10:
> include/linux/gpio/driver.h:621:43: error: initialized field overwritten [-Werror=override-init]
> 621 | .irq_request_resources = gpiochip_irq_reqres, \
> | ^~~~~~~~~~~~~~~~~~~
> drivers/gpio/gpio-zynq.c:611:9: note: in expansion of macro 'GPIOCHIP_IRQ_RESOURCE_HELPERS'
> 611 | GPIOCHIP_IRQ_RESOURCE_HELPERS,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/gpio/driver.h:621:43: note: (near initialization for 'zynq_gpio_level_irqchip.irq_request_resources')
> 621 | .irq_request_resources = gpiochip_irq_reqres, \
> | ^~~~~~~~~~~~~~~~~~~
> drivers/gpio/gpio-zynq.c:625:9: note: in expansion of macro 'GPIOCHIP_IRQ_RESOURCE_HELPERS'
> 625 | GPIOCHIP_IRQ_RESOURCE_HELPERS,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/gpio/driver.h:622:43: error: initialized field overwritten [-Werror=override-init]
> 622 | .irq_release_resources = gpiochip_irq_relres
> | ^~~~~~~~~~~~~~~~~~~
>
> Removing the old ones has no effect on the driver but avoids the warnings.
>
> Fixes: f569143935378 ("gpio: zynq: fix zynqmp_gpio not an immutable chip warning")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Right.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] gpio: synq: remove unused zynq_gpio_irq_reqres/zynq_gpio_irq_relres
2023-06-16 14:50 [PATCH] gpio: synq: remove unused zynq_gpio_irq_reqres/zynq_gpio_irq_relres Arnd Bergmann
2023-06-19 8:57 ` Linus Walleij
@ 2023-06-19 12:50 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2023-06-19 12:50 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Shubhrajyoti Datta, Linus Walleij, Michal Simek,
Manikanta Guntupalli, Arnd Bergmann, Srinivas Neeli,
Andy Shevchenko, linux-gpio, linux-arm-kernel, linux-kernel
On Fri, Jun 16, 2023 at 4:50 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> The driver now uses the generic request/release callbacks, so the custom
> ones are no longer called. When building with -Woverride-init, gcc produces
> a warning about the duplicate entries:
>
> In file included from drivers/gpio/gpio-zynq.c:10:
> include/linux/gpio/driver.h:621:43: error: initialized field overwritten [-Werror=override-init]
> 621 | .irq_request_resources = gpiochip_irq_reqres, \
> | ^~~~~~~~~~~~~~~~~~~
> drivers/gpio/gpio-zynq.c:611:9: note: in expansion of macro 'GPIOCHIP_IRQ_RESOURCE_HELPERS'
> 611 | GPIOCHIP_IRQ_RESOURCE_HELPERS,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/gpio/driver.h:621:43: note: (near initialization for 'zynq_gpio_level_irqchip.irq_request_resources')
> 621 | .irq_request_resources = gpiochip_irq_reqres, \
> | ^~~~~~~~~~~~~~~~~~~
> drivers/gpio/gpio-zynq.c:625:9: note: in expansion of macro 'GPIOCHIP_IRQ_RESOURCE_HELPERS'
> 625 | GPIOCHIP_IRQ_RESOURCE_HELPERS,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/gpio/driver.h:622:43: error: initialized field overwritten [-Werror=override-init]
> 622 | .irq_release_resources = gpiochip_irq_relres
> | ^~~~~~~~~~~~~~~~~~~
>
> Removing the old ones has no effect on the driver but avoids the warnings.
>
> Fixes: f569143935378 ("gpio: zynq: fix zynqmp_gpio not an immutable chip warning")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/gpio/gpio-zynq.c | 24 ------------------------
> 1 file changed, 24 deletions(-)
>
> diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
> index c334e46033bae..0a7264aabe488 100644
> --- a/drivers/gpio/gpio-zynq.c
> +++ b/drivers/gpio/gpio-zynq.c
> @@ -575,26 +575,6 @@ static int zynq_gpio_set_wake(struct irq_data *data, unsigned int on)
> return 0;
> }
>
> -static int zynq_gpio_irq_reqres(struct irq_data *d)
> -{
> - struct gpio_chip *chip = irq_data_get_irq_chip_data(d);
> - int ret;
> -
> - ret = pm_runtime_resume_and_get(chip->parent);
> - if (ret < 0)
> - return ret;
> -
> - return gpiochip_reqres_irq(chip, d->hwirq);
> -}
> -
> -static void zynq_gpio_irq_relres(struct irq_data *d)
> -{
> - struct gpio_chip *chip = irq_data_get_irq_chip_data(d);
> -
> - gpiochip_relres_irq(chip, d->hwirq);
> - pm_runtime_put(chip->parent);
> -}
> -
> /* irq chip descriptor */
> static const struct irq_chip zynq_gpio_level_irqchip = {
> .name = DRIVER_NAME,
> @@ -604,8 +584,6 @@ static const struct irq_chip zynq_gpio_level_irqchip = {
> .irq_unmask = zynq_gpio_irq_unmask,
> .irq_set_type = zynq_gpio_set_irq_type,
> .irq_set_wake = zynq_gpio_set_wake,
> - .irq_request_resources = zynq_gpio_irq_reqres,
> - .irq_release_resources = zynq_gpio_irq_relres,
> .flags = IRQCHIP_EOI_THREADED | IRQCHIP_EOI_IF_HANDLED |
> IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_IMMUTABLE,
> GPIOCHIP_IRQ_RESOURCE_HELPERS,
> @@ -619,8 +597,6 @@ static const struct irq_chip zynq_gpio_edge_irqchip = {
> .irq_unmask = zynq_gpio_irq_unmask,
> .irq_set_type = zynq_gpio_set_irq_type,
> .irq_set_wake = zynq_gpio_set_wake,
> - .irq_request_resources = zynq_gpio_irq_reqres,
> - .irq_release_resources = zynq_gpio_irq_relres,
> .flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_IMMUTABLE,
> GPIOCHIP_IRQ_RESOURCE_HELPERS,
> };
> --
> 2.39.2
>
Applied, thanks!
Bart
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-19 12:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-16 14:50 [PATCH] gpio: synq: remove unused zynq_gpio_irq_reqres/zynq_gpio_irq_relres Arnd Bergmann
2023-06-19 8:57 ` Linus Walleij
2023-06-19 12:50 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox