All of lore.kernel.org
 help / color / mirror / Atom feed
* [ebiggers:f2fs-pending 1/1] fs/f2fs/super.c:520:21: error: call to undeclared function 'fscrypt_is_dummy_policy_set'; ISO C99 and later do not support implicit function declarations
@ 2022-05-26  6:21 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-05-26  6:21 UTC (permalink / raw)
  To: Eric Biggers; +Cc: llvm, kbuild-all, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git f2fs-pending
head:   14c933f493ea41e28bbe5317af611dc01d66b489
commit: 14c933f493ea41e28bbe5317af611dc01d66b489 [1/1] f2fs: use the updated test_dummy_encryption helper functions
config: hexagon-randconfig-r045-20220524 (https://download.01.org/0day-ci/archive/20220526/202205261436.whb9q09P-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 3d546191ad9d7d2ad2c7928204b9de51deafa675)
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/commit/?id=14c933f493ea41e28bbe5317af611dc01d66b489
        git remote add ebiggers https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git
        git fetch --no-tags ebiggers f2fs-pending
        git checkout 14c933f493ea41e28bbe5317af611dc01d66b489
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash fs/f2fs/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> fs/f2fs/super.c:520:21: error: call to undeclared function 'fscrypt_is_dummy_policy_set'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           if (is_remount && !fscrypt_is_dummy_policy_set(policy)) {
                              ^
   fs/f2fs/super.c:520:21: note: did you mean 'fscrypt_free_dummy_policy'?
   include/linux/fscrypt.h:477:1: note: 'fscrypt_free_dummy_policy' declared here
   fscrypt_free_dummy_policy(struct fscrypt_dummy_policy *dummy_policy)
   ^
>> fs/f2fs/super.c:525:8: error: call to undeclared function 'fscrypt_parse_test_dummy_encryption'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           err = fscrypt_parse_test_dummy_encryption(&param, policy);
                 ^
   fs/f2fs/super.c:525:8: note: did you mean 'fscrypt_show_test_dummy_encryption'?
   include/linux/fscrypt.h:470:20: note: 'fscrypt_show_test_dummy_encryption' declared here
   static inline void fscrypt_show_test_dummy_encryption(struct seq_file *seq,
                      ^
>> fs/f2fs/super.c:538:8: error: call to undeclared function 'fscrypt_add_test_dummy_key'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           err = fscrypt_add_test_dummy_key(sb, policy);
                 ^
   3 errors generated.


vim +/fscrypt_is_dummy_policy_set +520 fs/f2fs/super.c

   489	
   490	static int f2fs_set_test_dummy_encryption(struct super_block *sb,
   491						  const char *opt,
   492						  const substring_t *arg,
   493						  bool is_remount)
   494	{
   495		struct f2fs_sb_info *sbi = F2FS_SB(sb);
   496		struct fs_parameter param = {
   497			.type = fs_value_is_string,
   498			.string = arg->from ? arg->from : "",
   499		};
   500		struct fscrypt_dummy_policy *policy =
   501			&F2FS_OPTION(sbi).dummy_enc_policy;
   502		int err;
   503	
   504		if (!IS_ENABLED(CONFIG_FS_ENCRYPTION)) {
   505			f2fs_warn(sbi, "test_dummy_encryption option not supported");
   506			return -EINVAL;
   507		}
   508	
   509		if (!f2fs_sb_has_encrypt(sbi)) {
   510			f2fs_err(sbi, "Encrypt feature is off");
   511			return -EINVAL;
   512		}
   513	
   514		/*
   515		 * This mount option is just for testing, and it's not worthwhile to
   516		 * implement the extra complexity (e.g. RCU protection) that would be
   517		 * needed to allow it to be set or changed during remount.  We do allow
   518		 * it to be specified during remount, but only if there is no change.
   519		 */
 > 520		if (is_remount && !fscrypt_is_dummy_policy_set(policy)) {
   521			f2fs_warn(sbi, "Can't set test_dummy_encryption on remount");
   522			return -EINVAL;
   523		}
   524	
 > 525		err = fscrypt_parse_test_dummy_encryption(&param, policy);
   526		if (err) {
   527			if (err == -EEXIST)
   528				f2fs_warn(sbi,
   529					  "Can't change test_dummy_encryption on remount");
   530			else if (err == -EINVAL)
   531				f2fs_warn(sbi, "Value of option \"%s\" is unrecognized",
   532					  opt);
   533			else
   534				f2fs_warn(sbi, "Error processing option \"%s\" [%d]",
   535					  opt, err);
   536			return -EINVAL;
   537		}
 > 538		err = fscrypt_add_test_dummy_key(sb, policy);
   539		if (err) {
   540			f2fs_warn(sbi, "Error adding test dummy encryption key [%d]",
   541				  err);
   542			return err;
   543		}
   544		f2fs_warn(sbi, "Test dummy encryption mode enabled");
   545		return 0;
   546	}
   547	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-26  6:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-26  6:21 [ebiggers:f2fs-pending 1/1] fs/f2fs/super.c:520:21: error: call to undeclared function 'fscrypt_is_dummy_policy_set'; ISO C99 and later do not support implicit function declarations kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.