From: YueHaibing <yuehaibing@huawei.com>
To: Chao Yu <yuchao0@huawei.com>, <jaegeuk@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [PATCH] f2fs: hide unused procfs helpers
Date: Fri, 13 Jul 2018 17:17:54 +0800 [thread overview]
Message-ID: <7181036d-854d-2278-3039-e14542586b1a@huawei.com> (raw)
In-Reply-To: <643f0ef2-f74a-8ea9-b24c-fb1cc231b8ba@huawei.com>
On 2018/7/13 17:02, Chao Yu wrote:
> Hello,
>
> On 2018/7/13 11:53, YueHaibing wrote:
>> When CONFIG_PROC_FS isn't set, gcc warning this:
>>
>> fs/f2fs/sysfs.c:519:12: warning: ‘segment_info_seq_show’ defined but not used [-Wunused-function]
>> static int segment_info_seq_show(struct seq_file *seq, void *offset)
>> ^
>> fs/f2fs/sysfs.c:546:12: warning: ‘segment_bits_seq_show’ defined but not used [-Wunused-function]
>> static int segment_bits_seq_show(struct seq_file *seq, void *offset)
>> ^
>> fs/f2fs/sysfs.c:570:12: warning: ‘iostat_info_seq_show’ defined but not used [-Wunused-function]
>> static int iostat_info_seq_show(struct seq_file *seq, void *offset)
>>
>> We can fix the warning by adding the same #ifdef around them.
>
> Could you check below patch sent from Randy Dunlap? It has already fixed this
> issue, anyway, thanks for your patch. :)
>
> [PATCH] f2fs: fix defined but not used build warnings
thank you for your information.
>
> Thanks,
>
>>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> ---
>> fs/f2fs/sysfs.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
>> index 2e7e611..7d45e65 100644
>> --- a/fs/f2fs/sysfs.c
>> +++ b/fs/f2fs/sysfs.c
>> @@ -516,6 +516,7 @@ static struct kobject f2fs_feat = {
>> .kset = &f2fs_kset,
>> };
>>
>> +#ifdef CONFIG_PROC_FS
>> static int segment_info_seq_show(struct seq_file *seq, void *offset)
>> {
>> struct super_block *sb = seq->private;
>> @@ -608,6 +609,7 @@ static int iostat_info_seq_show(struct seq_file *seq, void *offset)
>>
>> return 0;
>> }
>> +#endif
>>
>> int __init f2fs_init_sysfs(void)
>> {
>>
>
>
> .
>
prev parent reply other threads:[~2018-07-13 9:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-13 3:53 YueHaibing
2018-07-13 9:02 ` Chao Yu
2018-07-13 9:17 ` 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=7181036d-854d-2278-3039-e14542586b1a@huawei.com \
--to=yuehaibing@huawei.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=yuchao0@huawei.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
all inboxes | Powered by JetHome®