From: YueHaibing <yuehaibing@huawei.com>
To: <axboe@kernel.dk>
Cc: <linux-kernel@vger.kernel.org>, <linux-block@vger.kernel.org>
Subject: Re: [PATCH] DAC960: hide unused procfs helpers
Date: Fri, 13 Jul 2018 17:19:48 +0800 [thread overview]
Message-ID: <052d5583-8b72-e052-36f9-2156df2be4f5@huawei.com> (raw)
In-Reply-To: <20180713071610.14276-1-yuehaibing@huawei.com>
Pls ignore this, there has a fix.
[PATCH] block/DAC960.c: fix defined but not used build warnings
On 2018/7/13 15:16, YueHaibing wrote:
> When CONFIG_PROC_FS isn't set, gcc warning this:
>
> drivers/block/DAC960.c:6429:12: warning: ‘dac960_proc_show’ defined but not used [-Wunused-function]
> static int dac960_proc_show(struct seq_file *m, void *v)
> ^
> drivers/block/DAC960.c:6449:12: warning: ‘dac960_initial_status_proc_show’ defined but not used [-Wunused-function]
> static int dac960_initial_status_proc_show(struct seq_file *m, void *v)
> ^
> drivers/block/DAC960.c:6456:12: warning: ‘dac960_current_status_proc_show’ defined but not used [-Wunused-function]
> static int dac960_current_status_proc_show(struct seq_file *m, void *v)
> ^
> fix this by adding #ifdef around them.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/block/DAC960.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
> index f651806..7a05831 100644
> --- a/drivers/block/DAC960.c
> +++ b/drivers/block/DAC960.c
> @@ -6426,6 +6426,7 @@ static bool DAC960_V2_ExecuteUserCommand(DAC960_Controller_T *Controller,
> return true;
> }
>
> +#ifdef CONFIG_PROC_FS
> static int dac960_proc_show(struct seq_file *m, void *v)
> {
> unsigned char *StatusMessage = "OK\n";
> @@ -6485,6 +6486,7 @@ static int dac960_current_status_proc_show(struct seq_file *m, void *v)
> seq_printf(m, "%.*s", Controller->CurrentStatusLength, Controller->CurrentStatusBuffer);
> return 0;
> }
> +#endif
>
> static int dac960_user_command_proc_show(struct seq_file *m, void *v)
> {
>
prev parent reply other threads:[~2018-07-13 9:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-13 7:16 YueHaibing
2018-07-13 9:19 ` 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=052d5583-8b72-e052-36f9-2156df2be4f5@huawei.com \
--to=yuehaibing@huawei.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome