linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] f2fs: fix defined but not used build warnings
@ 2018-07-07  3:50 Randy Dunlap
  2018-07-10  1:09 ` Chao Yu
  0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2018-07-07  3:50 UTC (permalink / raw)
  To: Linux FS Devel, linux-f2fs-devel, Jaegeuk Kim, Chao Yu

From: Randy Dunlap <rdunlap@infradead.org>

Fix build warnings in f2fs when CONFIG_PROC_FS is not enabled
by marking the unused functions as __maybe_unused.

../fs/f2fs/sysfs.c:519:12: warning: 'segment_info_seq_show' defined but not used [-Wunused-function]
../fs/f2fs/sysfs.c:546:12: warning: 'segment_bits_seq_show' defined but not used [-Wunused-function]
../fs/f2fs/sysfs.c:570:12: warning: 'iostat_info_seq_show' defined but not used [-Wunused-function]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: Chao Yu <yuchao0@huawei.com>
Cc: linux-f2fs-devel@lists.sourceforge.net
---
 fs/f2fs/sysfs.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

--- linux-next-20180706.orig/fs/f2fs/sysfs.c
+++ linux-next-20180706/fs/f2fs/sysfs.c
@@ -9,6 +9,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/compiler.h>
 #include <linux/proc_fs.h>
 #include <linux/f2fs_fs.h>
 #include <linux/seq_file.h>
@@ -516,7 +517,8 @@ static struct kobject f2fs_feat = {
 	.kset	= &f2fs_kset,
 };
 
-static int segment_info_seq_show(struct seq_file *seq, void *offset)
+static int __maybe_unused segment_info_seq_show(struct seq_file *seq,
+						void *offset)
 {
 	struct super_block *sb = seq->private;
 	struct f2fs_sb_info *sbi = F2FS_SB(sb);
@@ -543,7 +545,8 @@ static int segment_info_seq_show(struct
 	return 0;
 }
 
-static int segment_bits_seq_show(struct seq_file *seq, void *offset)
+static int __maybe_unused segment_bits_seq_show(struct seq_file *seq,
+						void *offset)
 {
 	struct super_block *sb = seq->private;
 	struct f2fs_sb_info *sbi = F2FS_SB(sb);
@@ -567,7 +570,8 @@ static int segment_bits_seq_show(struct
 	return 0;
 }
 
-static int iostat_info_seq_show(struct seq_file *seq, void *offset)
+static int __maybe_unused iostat_info_seq_show(struct seq_file *seq,
+					       void *offset)
 {
 	struct super_block *sb = seq->private;
 	struct f2fs_sb_info *sbi = F2FS_SB(sb);

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] f2fs: fix defined but not used build warnings
  2018-07-07  3:50 [PATCH] f2fs: fix defined but not used build warnings Randy Dunlap
@ 2018-07-10  1:09 ` Chao Yu
  2018-07-12  3:35   ` Randy Dunlap
  0 siblings, 1 reply; 5+ messages in thread
From: Chao Yu @ 2018-07-10  1:09 UTC (permalink / raw)
  To: Randy Dunlap, Linux FS Devel, linux-f2fs-devel, Jaegeuk Kim

On 2018/7/7 11:50, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
> 
> Fix build warnings in f2fs when CONFIG_PROC_FS is not enabled
> by marking the unused functions as __maybe_unused.
> 
> ../fs/f2fs/sysfs.c:519:12: warning: 'segment_info_seq_show' defined but not used [-Wunused-function]
> ../fs/f2fs/sysfs.c:546:12: warning: 'segment_bits_seq_show' defined but not used [-Wunused-function]
> ../fs/f2fs/sysfs.c:570:12: warning: 'iostat_info_seq_show' defined but not used [-Wunused-function]
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Jaegeuk Kim <jaegeuk@kernel.org>
> Cc: Chao Yu <yuchao0@huawei.com>
> Cc: linux-f2fs-devel@lists.sourceforge.net

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] f2fs: fix defined but not used build warnings
  2018-07-10  1:09 ` Chao Yu
@ 2018-07-12  3:35   ` Randy Dunlap
  2018-07-12  4:15     ` Jaegeuk Kim
  2018-07-12  8:21     ` Chao Yu
  0 siblings, 2 replies; 5+ messages in thread
From: Randy Dunlap @ 2018-07-12  3:35 UTC (permalink / raw)
  To: Chao Yu, Linux FS Devel, linux-f2fs-devel, Jaegeuk Kim

On 07/09/2018 06:09 PM, Chao Yu wrote:
> On 2018/7/7 11:50, Randy Dunlap wrote:
>> From: Randy Dunlap <rdunlap@infradead.org>
>>
>> Fix build warnings in f2fs when CONFIG_PROC_FS is not enabled
>> by marking the unused functions as __maybe_unused.
>>
>> ../fs/f2fs/sysfs.c:519:12: warning: 'segment_info_seq_show' defined but not used [-Wunused-function]
>> ../fs/f2fs/sysfs.c:546:12: warning: 'segment_bits_seq_show' defined but not used [-Wunused-function]
>> ../fs/f2fs/sysfs.c:570:12: warning: 'iostat_info_seq_show' defined but not used [-Wunused-function]
>>
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc: Jaegeuk Kim <jaegeuk@kernel.org>
>> Cc: Chao Yu <yuchao0@huawei.com>
>> Cc: linux-f2fs-devel@lists.sourceforge.net
> 
> Reviewed-by: Chao Yu <yuchao0@huawei.com>

Hi,
Who would you like to merge this patch?  or could you do so?

thanks,
-- 
~Randy

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] f2fs: fix defined but not used build warnings
  2018-07-12  3:35   ` Randy Dunlap
@ 2018-07-12  4:15     ` Jaegeuk Kim
  2018-07-12  8:21     ` Chao Yu
  1 sibling, 0 replies; 5+ messages in thread
From: Jaegeuk Kim @ 2018-07-12  4:15 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Chao Yu, Linux FS Devel, linux-f2fs-devel

On 07/11, Randy Dunlap wrote:
> On 07/09/2018 06:09 PM, Chao Yu wrote:
> > On 2018/7/7 11:50, Randy Dunlap wrote:
> >> From: Randy Dunlap <rdunlap@infradead.org>
> >>
> >> Fix build warnings in f2fs when CONFIG_PROC_FS is not enabled
> >> by marking the unused functions as __maybe_unused.
> >>
> >> ../fs/f2fs/sysfs.c:519:12: warning: 'segment_info_seq_show' defined but not used [-Wunused-function]
> >> ../fs/f2fs/sysfs.c:546:12: warning: 'segment_bits_seq_show' defined but not used [-Wunused-function]
> >> ../fs/f2fs/sysfs.c:570:12: warning: 'iostat_info_seq_show' defined but not used [-Wunused-function]
> >>
> >> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> >> Cc: Jaegeuk Kim <jaegeuk@kernel.org>
> >> Cc: Chao Yu <yuchao0@huawei.com>
> >> Cc: linux-f2fs-devel@lists.sourceforge.net
> > 
> > Reviewed-by: Chao Yu <yuchao0@huawei.com>
> 
> Hi,
> Who would you like to merge this patch?  or could you do so?

Hi Randy,

I'll merge it in -next for Linus.

Thanks,

> 
> thanks,
> -- 
> ~Randy

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] f2fs: fix defined but not used build warnings
  2018-07-12  3:35   ` Randy Dunlap
  2018-07-12  4:15     ` Jaegeuk Kim
@ 2018-07-12  8:21     ` Chao Yu
  1 sibling, 0 replies; 5+ messages in thread
From: Chao Yu @ 2018-07-12  8:21 UTC (permalink / raw)
  To: Randy Dunlap, Linux FS Devel, linux-f2fs-devel, Jaegeuk Kim

On 2018/7/12 11:35, Randy Dunlap wrote:
> On 07/09/2018 06:09 PM, Chao Yu wrote:
>> On 2018/7/7 11:50, Randy Dunlap wrote:
>>> From: Randy Dunlap <rdunlap@infradead.org>
>>>
>>> Fix build warnings in f2fs when CONFIG_PROC_FS is not enabled
>>> by marking the unused functions as __maybe_unused.
>>>
>>> ../fs/f2fs/sysfs.c:519:12: warning: 'segment_info_seq_show' defined but not used [-Wunused-function]
>>> ../fs/f2fs/sysfs.c:546:12: warning: 'segment_bits_seq_show' defined but not used [-Wunused-function]
>>> ../fs/f2fs/sysfs.c:570:12: warning: 'iostat_info_seq_show' defined but not used [-Wunused-function]
>>>
>>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>>> Cc: Jaegeuk Kim <jaegeuk@kernel.org>
>>> Cc: Chao Yu <yuchao0@huawei.com>
>>> Cc: linux-f2fs-devel@lists.sourceforge.net
>>
>> Reviewed-by: Chao Yu <yuchao0@huawei.com>
> 
> Hi,
> Who would you like to merge this patch?  or could you do so?

Hello,

Jaegeuk will merge it. :)

Thanks,

> 
> thanks,
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-07-12  8:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-07  3:50 [PATCH] f2fs: fix defined but not used build warnings Randy Dunlap
2018-07-10  1:09 ` Chao Yu
2018-07-12  3:35   ` Randy Dunlap
2018-07-12  4:15     ` Jaegeuk Kim
2018-07-12  8:21     ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).