[linux-next:master 2106/4407] fs/f2fs/super.c:470:12: warning: unused function 'f2fs_compress_set_level'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   b4bb878f3eb3e604ebfe83bbc17eb7af8d99cbf4
commit: ec0d0eb347b05377ad2e03c51cb1d08d6ed35619 [2106/4407] f2fs: compress: deny setting unsupported compress algorithm
config: mips-randconfig-r033-20210119 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 22b68440e1647e16b5ee24b924986207173c02d1)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ec0d0eb347b05377ad2e03c51cb1d08d6ed35619
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout ec0d0eb347b05377ad2e03c51cb1d08d6ed35619
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> fs/f2fs/super.c:470:12: warning: unused function 'f2fs_compress_set_level'
   static int f2fs_compress_set_level(struct f2fs_sb_info const char
   ^
   fatal error: error in backend: Nested variants found in inline asm string: ' .set push
   .set mips64r2
   .if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/bitops.h", .line = 105, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
   1: ll $0, $1
   or $0, $2
   sc $0, $1
   beqz $0, 1b
   .set pop
   '
   clang-12: error: clang frontend command failed with exit code 70 (use -v to see invocation)
   clang version 12.0.0 (git://gitmirror/llvm_project 22b68440e1647e16b5ee24b924986207173c02d1)
   Target: mipsel-unknown-linux-gnu
   Thread model: posix
   InstalledDir: /opt/cross/clang-22b68440e1/bin
   clang-12: note: diagnostic msg:
   Makefile arch fs include kernel scripts source usr


vim +/f2fs_compress_set_level +470 fs/f2fs/super.c

ed318a6cc0b62044 Eric Biggers 2020-05-12  468  
0ba061b9e957791e Chao Yu      2020-12-09  469  #ifdef CONFIG_F2FS_FS_COMPRESSION
0ba061b9e957791e Chao Yu      2020-12-09 @470  static int f2fs_compress_set_level(struct f2fs_sb_info *sbi, const char *str,
0ba061b9e957791e Chao Yu      2020-12-09  471  						int type)
0ba061b9e957791e Chao Yu      2020-12-09  472  {
0ba061b9e957791e Chao Yu      2020-12-09  473  	unsigned int level;
0ba061b9e957791e Chao Yu      2020-12-09  474  	int len;
0ba061b9e957791e Chao Yu      2020-12-09  475  
0ba061b9e957791e Chao Yu      2020-12-09  476  	if (type == COMPRESS_LZ4)
0ba061b9e957791e Chao Yu      2020-12-09  477  		len = 3;
0ba061b9e957791e Chao Yu      2020-12-09  478  	else if (type == COMPRESS_ZSTD)
0ba061b9e957791e Chao Yu      2020-12-09  479  		len = 4;
0ba061b9e957791e Chao Yu      2020-12-09  480  	else
0ba061b9e957791e Chao Yu      2020-12-09  481  		return 0;
0ba061b9e957791e Chao Yu      2020-12-09  482  
0ba061b9e957791e Chao Yu      2020-12-09  483  	if (strlen(str) == len)
0ba061b9e957791e Chao Yu      2020-12-09  484  		return 0;
0ba061b9e957791e Chao Yu      2020-12-09  485  
0ba061b9e957791e Chao Yu      2020-12-09  486  	str += len;
0ba061b9e957791e Chao Yu      2020-12-09  487  
0ba061b9e957791e Chao Yu      2020-12-09  488  	if (str[0] != ':') {
0ba061b9e957791e Chao Yu      2020-12-09  489  		f2fs_info(sbi, "wrong format, e.g. <alg_name>:<compr_level>");
0ba061b9e957791e Chao Yu      2020-12-09  490  		return -EINVAL;
0ba061b9e957791e Chao Yu      2020-12-09  491  	}
0ba061b9e957791e Chao Yu      2020-12-09  492  	if (kstrtouint(str + 1, 10, &level))
0ba061b9e957791e Chao Yu      2020-12-09  493  		return -EINVAL;
0ba061b9e957791e Chao Yu      2020-12-09  494  	if (type == COMPRESS_LZ4) {
0ba061b9e957791e Chao Yu      2020-12-09  495  #ifdef CONFIG_F2FS_FS_LZ4HC
0ba061b9e957791e Chao Yu      2020-12-09  496  		if (level < LZ4HC_MIN_CLEVEL || level > LZ4HC_MAX_CLEVEL) {
0ba061b9e957791e Chao Yu      2020-12-09  497  			f2fs_info(sbi, "invalid lz4hc compress level: %d", level);
0ba061b9e957791e Chao Yu      2020-12-09  498  			return -EINVAL;
0ba061b9e957791e Chao Yu      2020-12-09  499  		}
0ba061b9e957791e Chao Yu      2020-12-09  500  #else
0ba061b9e957791e Chao Yu      2020-12-09  501  		f2fs_info(sbi, "doesn't support lz4hc compression");
0ba061b9e957791e Chao Yu      2020-12-09  502  		return 0;
0ba061b9e957791e Chao Yu      2020-12-09  503  #endif
0ba061b9e957791e Chao Yu      2020-12-09  504  	} else if (type == COMPRESS_ZSTD) {
0ba061b9e957791e Chao Yu      2020-12-09  505  #ifdef CONFIG_F2FS_FS_ZSTD
0ba061b9e957791e Chao Yu      2020-12-09  506  		if (!level || level > ZSTD_maxCLevel()) {
0ba061b9e957791e Chao Yu      2020-12-09  507  			f2fs_info(sbi, "invalid zstd compress level: %d", level);
0ba061b9e957791e Chao Yu      2020-12-09  508  			return -EINVAL;
0ba061b9e957791e Chao Yu      2020-12-09  509  		}
0ba061b9e957791e Chao Yu      2020-12-09  510  #else
0ba061b9e957791e Chao Yu      2020-12-09  511  		f2fs_info(sbi, "doesn't support zstd compression");
0ba061b9e957791e Chao Yu      2020-12-09  512  #endif
0ba061b9e957791e Chao Yu      2020-12-09  513  	}
0ba061b9e957791e Chao Yu      2020-12-09  514  	F2FS_OPTION(sbi).compress_level = level;
0ba061b9e957791e Chao Yu      2020-12-09  515  	return 0;
0ba061b9e957791e Chao Yu      2020-12-09  516  }
0ba061b9e957791e Chao Yu      2020-12-09  517  #endif
0ba061b9e957791e Chao Yu      2020-12-09  518  

:::::: The code at line 470 was first introduced by commit
:::::: 0ba061b9e957791e8120b6acb589a26fa7bbbb53 f2fs: compress: support compress level

:::::: TO: Chao Yu <yuchao0@xxxxxxxxxx>
:::::: CC: Jaegeuk Kim <jaegeuk@xxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux