* [PATCH] gpio: tegra: fix debugfs compile error
@ 2019-07-08 12:38 Arnd Bergmann
2019-07-08 13:06 ` Dmitry Osipenko
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2019-07-08 12:38 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Thierry Reding,
Jonathan Hunter
Cc: Arnd Bergmann, Dmitry Osipenko, linux-gpio, linux-tegra,
linux-kernel
Without this header, some configurations now run into a build failure:
drivers/gpio/gpio-tegra.c:665:2: error: implicit declaration of function 'debugfs_create_file'
[-Werror,-Wimplicit-function-declaration]
debugfs_create_file("tegra_gpio", 0444, NULL, tgi,
^
drivers/gpio/gpio-tegra.c:665:2: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
drivers/gpio/gpio-tegra.c:666:9: error: use of undeclared identifier 'tegra_dbg_gpio_fops'
Remove the #ifdef here and let the compiler drop the unused
functions itself when debugfs_create_file() is an empty inline
function.
Fixes: a4de43049a1d ("gpio: tegra: Clean-up debugfs initialisation")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpio/gpio-tegra.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 59b99d8c3647..dbcecbe5f52f 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -9,6 +9,7 @@
* Erik Gilling <konkers@google.com>
*/
+#include <linux/debugfs.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/irq.h>
@@ -22,6 +23,7 @@
#include <linux/irqchip/chained_irq.h>
#include <linux/pinctrl/consumer.h>
#include <linux/pm.h>
+#include <linux/seq_file.h>
#define GPIO_BANK(x) ((x) >> 5)
#define GPIO_PORT(x) (((x) >> 3) & 0x3)
@@ -508,10 +510,6 @@ static int tegra_gpio_irq_set_wake(struct irq_data *d, unsigned int enable)
}
#endif
-#ifdef CONFIG_DEBUG_FS
-
-#include <linux/debugfs.h>
-#include <linux/seq_file.h>
static int tegra_dbg_gpio_show(struct seq_file *s, void *unused)
{
@@ -538,7 +536,6 @@ static int tegra_dbg_gpio_show(struct seq_file *s, void *unused)
}
DEFINE_SHOW_ATTRIBUTE(tegra_dbg_gpio);
-#endif
static const struct dev_pm_ops tegra_gpio_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(tegra_gpio_suspend, tegra_gpio_resume)
--
2.20.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] gpio: tegra: fix debugfs compile error
2019-07-08 12:38 [PATCH] gpio: tegra: fix debugfs compile error Arnd Bergmann
@ 2019-07-08 13:06 ` Dmitry Osipenko
2019-07-08 13:19 ` Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Osipenko @ 2019-07-08 13:06 UTC (permalink / raw)
To: Arnd Bergmann, Linus Walleij, Bartosz Golaszewski, Thierry Reding,
Jonathan Hunter
Cc: linux-gpio, linux-tegra, linux-kernel
08.07.2019 15:38, Arnd Bergmann пишет:
> Without this header, some configurations now run into a build failure:
>
> drivers/gpio/gpio-tegra.c:665:2: error: implicit declaration of function 'debugfs_create_file'
> [-Werror,-Wimplicit-function-declaration]
> debugfs_create_file("tegra_gpio", 0444, NULL, tgi,
> ^
> drivers/gpio/gpio-tegra.c:665:2: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
> drivers/gpio/gpio-tegra.c:666:9: error: use of undeclared identifier 'tegra_dbg_gpio_fops'
>
> Remove the #ifdef here and let the compiler drop the unused
> functions itself when debugfs_create_file() is an empty inline
> function.
>
> Fixes: a4de43049a1d ("gpio: tegra: Clean-up debugfs initialisation")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/gpio/gpio-tegra.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
> index 59b99d8c3647..dbcecbe5f52f 100644
> --- a/drivers/gpio/gpio-tegra.c
> +++ b/drivers/gpio/gpio-tegra.c
> @@ -9,6 +9,7 @@
> * Erik Gilling <konkers@google.com>
> */
>
> +#include <linux/debugfs.h>
> #include <linux/err.h>
> #include <linux/init.h>
> #include <linux/irq.h>
> @@ -22,6 +23,7 @@
> #include <linux/irqchip/chained_irq.h>
> #include <linux/pinctrl/consumer.h>
> #include <linux/pm.h>
> +#include <linux/seq_file.h>
>
> #define GPIO_BANK(x) ((x) >> 5)
> #define GPIO_PORT(x) (((x) >> 3) & 0x3)
> @@ -508,10 +510,6 @@ static int tegra_gpio_irq_set_wake(struct irq_data *d, unsigned int enable)
> }
> #endif
>
> -#ifdef CONFIG_DEBUG_FS
> -
> -#include <linux/debugfs.h>
> -#include <linux/seq_file.h>
>
> static int tegra_dbg_gpio_show(struct seq_file *s, void *unused)
> {
> @@ -538,7 +536,6 @@ static int tegra_dbg_gpio_show(struct seq_file *s, void *unused)
> }
>
> DEFINE_SHOW_ATTRIBUTE(tegra_dbg_gpio);
> -#endif
>
> static const struct dev_pm_ops tegra_gpio_pm_ops = {
> SET_SYSTEM_SLEEP_PM_OPS(tegra_gpio_suspend, tegra_gpio_resume)
>
The offending patch should be reverted already, please see [1].
[1] https://patchwork.ozlabs.org/patch/1128007/#2210871
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] gpio: tegra: fix debugfs compile error
2019-07-08 13:06 ` Dmitry Osipenko
@ 2019-07-08 13:19 ` Arnd Bergmann
0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2019-07-08 13:19 UTC (permalink / raw)
To: Dmitry Osipenko
Cc: Linus Walleij, Bartosz Golaszewski, Thierry Reding,
Jonathan Hunter, open list:GPIO SUBSYSTEM,
open list:TEGRA ARCHITECTURE SUPPORT, Linux Kernel Mailing List
On Mon, Jul 8, 2019 at 3:06 PM Dmitry Osipenko <digetx@gmail.com> wrote:
> 08.07.2019 15:38, Arnd Bergmann пишет:
>
> The offending patch should be reverted already, please see [1].
>
> [1] https://patchwork.ozlabs.org/patch/1128007/#2210871
Ok, sounds good. With my patch on top, the other version is a little
nicer, but the revert is correct as well, and probably the safe choice
during the merge window.
Arnd
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-08 13:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-08 12:38 [PATCH] gpio: tegra: fix debugfs compile error Arnd Bergmann
2019-07-08 13:06 ` Dmitry Osipenko
2019-07-08 13:19 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox