lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 5 Jul 2019 14:40:12 +0200
From:   Bartosz Golaszewski <bgolaszewski@...libre.com>
To:     YueHaibing <yuehaibing@...wei.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Thierry Reding <thierry.reding@...il.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-gpio <linux-gpio@...r.kernel.org>,
        linux-tegra@...r.kernel.org
Subject: Re: [PATCH] gpio: tegra: Fix build error without CONFIG_DEBUG_FS

pt., 5 lip 2019 o 14:34 YueHaibing <yuehaibing@...wei.com> napisaƂ(a):
>
> If CONFIG_DEBUG_FS is not set, building fails:
>
> drivers/gpio/gpio-tegra.c: In function tegra_gpio_probe:
> drivers/gpio/gpio-tegra.c:665:2: error: implicit declaration of function debugfs_create_file;
>  did you mean bus_create_file? [-Werror=implicit-function-declaration]
>   debugfs_create_file("tegra_gpio", 0444, NULL, tgi,
>   ^~~~~~~~~~~~~~~~~~~
>   bus_create_file
> drivers/gpio/gpio-tegra.c:666:9: error: tegra_dbg_gpio_fops undeclared (first use in this function);
>  did you mean tegra_gpio_pm_ops?
>         &tegra_dbg_gpio_fops);
>          ^~~~~~~~~~~~~~~~~~~
>          tegra_gpio_pm_ops
>
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Fixes: a4de43049a1d ("gpio: tegra: Clean-up debugfs initialisation")
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> ---
>  drivers/gpio/gpio-tegra.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
> index 59b99d8..40fd6bd 100644
> --- a/drivers/gpio/gpio-tegra.c
> +++ b/drivers/gpio/gpio-tegra.c
> @@ -662,8 +662,10 @@ static int tegra_gpio_probe(struct platform_device *pdev)
>                 }
>         }
>
> +#ifdef CONFIG_DEBUG_FS
>         debugfs_create_file("tegra_gpio", 0444, NULL, tgi,
>                             &tegra_dbg_gpio_fops);
> +#endif
>
>         return 0;
>  }
> --
> 2.7.4
>
>

Nack, there are inline stubs for all debugfs functions in
./include/linux/debugfs.h if CONFIG_DEBUG_FS is not selected. Just
move the #include <linux/debugfs.h> to the top of the source file.

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ