Skip to content

Commit

Permalink
f2fs: fix defined but not used build warnings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rddunlap authored and Jaegeuk Kim committed Aug 1, 2018
1 parent a39e536 commit cb15d1e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions fs/f2fs/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -518,7 +519,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);
Expand All @@ -545,7 +547,8 @@ static int segment_info_seq_show(struct seq_file *seq, void *offset)
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);
Expand All @@ -569,7 +572,8 @@ static int segment_bits_seq_show(struct seq_file *seq, void *offset)
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);
Expand Down

0 comments on commit cb15d1e

Please sign in to comment.