From: YueHaibing <yuehaibing@huawei.com>
To: <rjw@rjwysocki.net>, <lenb@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH] ACPI: button: hide unused procfs helpers
Date: Fri, 13 Jul 2018 17:29:18 +0800 [thread overview]
Message-ID: <ade2d23b-bfc9-b828-aa18-ff5e1c87a40d@huawei.com> (raw)
In-Reply-To: <20180713071959.11220-1-yuehaibing@huawei.com>
sorry for noise,there has a fix:
[PATCH] acpi/button.c: fix defined but not used warning
https://lkml.org/lkml/2018/7/11/231
On 2018/7/13 15:19, YueHaibing wrote:
> When CONFIG_PROC_FS isn't set, gcc warning this:
>
> drivers/acpi/button.c:255:12: warning: ‘acpi_button_state_seq_show’ defined but not used [-Wunused-function]
> static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
> ^
> fix this by adding #ifdef around it.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/acpi/button.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
> index 2345a5e..8538e25 100644
> --- a/drivers/acpi/button.c
> +++ b/drivers/acpi/button.c
> @@ -252,6 +252,7 @@ static int acpi_lid_notify_state(struct acpi_device *device, int state)
> return ret;
> }
>
> +#ifdef CONFIG_PROC_FS
> static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
> {
> struct acpi_device *device = seq->private;
> @@ -262,6 +263,7 @@ static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
> state < 0 ? "unsupported" : (state ? "open" : "closed"));
> return 0;
> }
> +#endif
>
> static int acpi_button_add_fs(struct acpi_device *device)
> {
>
prev parent reply other threads:[~2018-07-13 9:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-13 7:19 YueHaibing
2018-07-13 9:29 ` YueHaibing [this message]
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=ade2d23b-bfc9-b828-aa18-ff5e1c87a40d@huawei.com \
--to=yuehaibing@huawei.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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
all inboxes | Powered by JetHome®