[linux-next:master 5987/6579] fs/ext4/super.c:2689:51: sparse: sparse: incorrect type in argument 1 (different address spaces)

[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:   ea922272cbe547bdf58da2aaf240d59782c6a009
commit: e6e268cb682290da29e3c8408493a4474307b8cc [5987/6579] ext4: move quota configuration out of handle_mount_opt()
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20211211/202112111727.6cF6r7SQ-lkp@xxxxxxxxx/config)
compiler: m68k-linux-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=e6e268cb682290da29e3c8408493a4474307b8cc
        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 e6e268cb682290da29e3c8408493a4474307b8cc
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=m68k SHELL=/bin/bash fs/ext4/

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


sparse warnings: (new ones prefixed by >>)
>> fs/ext4/super.c:2689:51: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected char const *cs @@     got char [noderef] __rcu * @@
   fs/ext4/super.c:2689:51: sparse:     expected char const *cs
   fs/ext4/super.c:2689:51: sparse:     got char [noderef] __rcu *
   fs/ext4/super.c:2657:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *objp @@     got char [noderef] __rcu * @@
   fs/ext4/super.c:2657:38: sparse:     expected void const *objp
   fs/ext4/super.c:2657:38: sparse:     got char [noderef] __rcu *

vim +2689 fs/ext4/super.c

  2663	
  2664	/*
  2665	 * Check quota settings consistency.
  2666	 */
  2667	static int ext4_check_quota_consistency(struct fs_context *fc,
  2668						struct super_block *sb)
  2669	{
  2670	#ifdef CONFIG_QUOTA
  2671		struct ext4_fs_context *ctx = fc->fs_private;
  2672		struct ext4_sb_info *sbi = EXT4_SB(sb);
  2673		bool quota_feature = ext4_has_feature_quota(sb);
  2674		bool quota_loaded = sb_any_quota_loaded(sb);
  2675		int i;
  2676	
  2677		if (ctx->qname_spec && quota_loaded) {
  2678			if (quota_feature)
  2679				goto err_feature;
  2680	
  2681			for (i = 0; i < EXT4_MAXQUOTAS; i++) {
  2682				if (!(ctx->qname_spec & (1 << i)))
  2683					continue;
  2684	
  2685				if (!!sbi->s_qf_names[i] != !!ctx->s_qf_names[i])
  2686					goto err_jquota_change;
  2687	
  2688				if (sbi->s_qf_names[i] && ctx->s_qf_names[i] &&
> 2689				    strcmp(sbi->s_qf_names[i],
  2690					   ctx->s_qf_names[i]) != 0)
  2691					goto err_jquota_specified;
  2692			}
  2693		}
  2694	
  2695		if (ctx->s_jquota_fmt) {
  2696			if (sbi->s_jquota_fmt != ctx->s_jquota_fmt && quota_loaded)
  2697				goto err_quota_change;
  2698			if (quota_feature) {
  2699				ext4_msg(NULL, KERN_INFO, "Quota format mount options "
  2700					 "ignored when QUOTA feature is enabled");
  2701				return 0;
  2702			}
  2703		}
  2704		return 0;
  2705	
  2706	err_quota_change:
  2707		ext4_msg(NULL, KERN_ERR,
  2708			 "Cannot change quota options when quota turned on");
  2709		return -EINVAL;
  2710	err_jquota_change:
  2711		ext4_msg(NULL, KERN_ERR, "Cannot change journaled quota "
  2712			 "options when quota turned on");
  2713		return -EINVAL;
  2714	err_jquota_specified:
  2715		ext4_msg(NULL, KERN_ERR, "%s quota file already specified",
  2716			 QTYPE2NAME(i));
  2717		return -EINVAL;
  2718	err_feature:
  2719		ext4_msg(NULL, KERN_ERR, "Journaled quota options ignored "
  2720			 "when QUOTA feature is enabled");
  2721		return 0;
  2722	#else
  2723		return 0;
  2724	#endif
  2725	}
  2726	

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




[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