Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Yuehaibing <yuehaibing@huawei.com>
To: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-gpio <linux-gpio@vger.kernel.org>,
	<linux-tegra@vger.kernel.org>
Subject: Re: [PATCH] gpio: tegra: Fix build error without CONFIG_DEBUG_FS
Date: Fri, 5 Jul 2019 20:44:11 +0800	[thread overview]
Message-ID: <74ffe8ea-e6fb-bd2a-42bd-08392eb27c69@huawei.com> (raw)
In-Reply-To: <CAMpxmJVZHJKQ7bbHo=T9R99qguF315bZ=YVRrCdqti2SyzAnDg@mail.gmail.com>

On 2019/7/5 20:40, Bartosz Golaszewski wrote:
> pt., 5 lip 2019 o 14:34 YueHaibing <yuehaibing@huawei.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@huawei.com>
>> Fixes: a4de43049a1d ("gpio: tegra: Clean-up debugfs initialisation")
>> Signed-off-by: YueHaibing <yuehaibing@huawei.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.

yes, agree this, but 'tegra_dbg_gpio_fops' is still undeclared.

> 
> Bart
> 
> .
> 


  reply	other threads:[~2019-07-05 12:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-05 12:32 [PATCH] gpio: tegra: Fix build error without CONFIG_DEBUG_FS YueHaibing
2019-07-05 12:40 ` Bartosz Golaszewski
2019-07-05 12:44   ` Yuehaibing [this message]
2019-07-05 12:56     ` Bartosz Golaszewski
2019-07-05 12:59       ` Bartosz Golaszewski
2019-07-06 22:34         ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=74ffe8ea-e6fb-bd2a-42bd-08392eb27c69@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=jonathanh@nvidia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox