f2fs: avoid unused f2fs_show_compress_options()
authorChao Yu <yuchao0@huawei.com>
Sat, 20 Feb 2021 09:38:41 +0000 (17:38 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 12 Mar 2021 21:16:41 +0000 (13:16 -0800)
LKP reports:

   fs/f2fs/super.c:1516:20: warning: unused function 'f2fs_show_compress_options' [-Wunused-function]
   static inline void f2fs_show_compress_options(struct seq_file *seq,

Fix this issue by covering f2fs_show_compress_options() with
CONFIG_F2FS_FS_COMPRESSION macro.

Fixes: 4c8ff7095bef ("f2fs: support data compression")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/super.c

index a17a4dd8d44984a7fbe28bbf9f38b93f94c22df3..e03b2f0f69d051848ee7438e1012d2bbabd175f8 100644 (file)
@@ -1616,6 +1616,7 @@ static inline void f2fs_show_quota_options(struct seq_file *seq,
 #endif
 }
 
+#ifdef CONFIG_F2FS_FS_COMPRESSION
 static inline void f2fs_show_compress_options(struct seq_file *seq,
                                                        struct super_block *sb)
 {
@@ -1661,6 +1662,7 @@ static inline void f2fs_show_compress_options(struct seq_file *seq,
        else if (F2FS_OPTION(sbi).compress_mode == COMPR_MODE_USER)
                seq_printf(seq, ",compress_mode=%s", "user");
 }
+#endif
 
 static int f2fs_show_options(struct seq_file *seq, struct dentry *root)
 {