aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@infradead.org>2018-07-06 23:50:57 -0400
committerJaegeuk Kim <jaegeuk@kernel.org>2018-08-01 14:52:36 -0400
commitcb15d1e43db0a6341c1e26ac6a2c74e61b74f1aa (patch)
treeba0ba9f62818408e8eb67d256dea7dac7bb51527
parenta39e5365835edcdb12140d423573c2b8ed39ebfb (diff)
f2fs: fix defined but not used build warnings
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 Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/sysfs.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index d3d0266a49da..bca1236fd6fa 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -9,6 +9,7 @@
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 */ 11 */
12#include <linux/compiler.h>
12#include <linux/proc_fs.h> 13#include <linux/proc_fs.h>
13#include <linux/f2fs_fs.h> 14#include <linux/f2fs_fs.h>
14#include <linux/seq_file.h> 15#include <linux/seq_file.h>
@@ -518,7 +519,8 @@ static struct kobject f2fs_feat = {
518 .kset = &f2fs_kset, 519 .kset = &f2fs_kset,
519}; 520};
520 521
521static int segment_info_seq_show(struct seq_file *seq, void *offset) 522static int __maybe_unused segment_info_seq_show(struct seq_file *seq,
523 void *offset)
522{ 524{
523 struct super_block *sb = seq->private; 525 struct super_block *sb = seq->private;
524 struct f2fs_sb_info *sbi = F2FS_SB(sb); 526 struct f2fs_sb_info *sbi = F2FS_SB(sb);
@@ -545,7 +547,8 @@ static int segment_info_seq_show(struct seq_file *seq, void *offset)
545 return 0; 547 return 0;
546} 548}
547 549
548static int segment_bits_seq_show(struct seq_file *seq, void *offset) 550static int __maybe_unused segment_bits_seq_show(struct seq_file *seq,
551 void *offset)
549{ 552{
550 struct super_block *sb = seq->private; 553 struct super_block *sb = seq->private;
551 struct f2fs_sb_info *sbi = F2FS_SB(sb); 554 struct f2fs_sb_info *sbi = F2FS_SB(sb);
@@ -569,7 +572,8 @@ static int segment_bits_seq_show(struct seq_file *seq, void *offset)
569 return 0; 572 return 0;
570} 573}
571 574
572static int iostat_info_seq_show(struct seq_file *seq, void *offset) 575static int __maybe_unused iostat_info_seq_show(struct seq_file *seq,
576 void *offset)
573{ 577{
574 struct super_block *sb = seq->private; 578 struct super_block *sb = seq->private;
575 struct f2fs_sb_info *sbi = F2FS_SB(sb); 579 struct f2fs_sb_info *sbi = F2FS_SB(sb);