[linux-next:master 5489/6048] fs/xfs/libxfs/xfs_bmap.c:3474:8: warning: variable 'error' set but not used

[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:   59fa6a163ffabc1bf25c5e0e33899e268a96d3cc
commit: 0961fddfdd3f8ccd6302af2e7718abbaf18c9fff [5489/6048] xfs: Compute bmap extent alignments in a separate function
config: nds32-randconfig-r014-20210125 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
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/next/linux-next.git/commit/?id=0961fddfdd3f8ccd6302af2e7718abbaf18c9fff
        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 0961fddfdd3f8ccd6302af2e7718abbaf18c9fff
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32 

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/xfs/libxfs/xfs_bmap.c: In function 'xfs_bmap_compute_alignments':
>> fs/xfs/libxfs/xfs_bmap.c:3474:8: warning: variable 'error' set but not used [-Wunused-but-set-variable]
    3474 |  int   error;
         |        ^~~~~
   fs/xfs/libxfs/xfs_bmap.c: In function 'xfs_bmap_del_extent_real':
   fs/xfs/libxfs/xfs_bmap.c:5077:18: warning: variable 'bno' set but not used [-Wunused-but-set-variable]
    5077 |    xfs_fsblock_t bno;
         |                  ^~~
   fs/xfs/libxfs/xfs_bmap.c:5283:58: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
    5283 |   xfs_trans_mod_dquot_byino(tp, ip, qfield, (long)-nblks);
         |                                                          ^

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for FRAME_POINTER
   Depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS
   Selected by
   - LATENCYTOP && DEBUG_KERNEL && STACKTRACE_SUPPORT && PROC_FS && !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86


vim +/error +3474 fs/xfs/libxfs/xfs_bmap.c

  3465	
  3466	static int
  3467	xfs_bmap_compute_alignments(
  3468		struct xfs_bmalloca	*ap,
  3469		struct xfs_alloc_arg	*args)
  3470	{
  3471		struct xfs_mount	*mp = args->mp;
  3472		xfs_extlen_t		align = 0; /* minimum allocation alignment */
  3473		int			stripe_align = 0;
> 3474		int			error;
  3475	
  3476		/* stripe alignment for allocation is determined by mount parameters */
  3477		if (mp->m_swidth && (mp->m_flags & XFS_MOUNT_SWALLOC))
  3478			stripe_align = mp->m_swidth;
  3479		else if (mp->m_dalign)
  3480			stripe_align = mp->m_dalign;
  3481	
  3482		if (ap->flags & XFS_BMAPI_COWFORK)
  3483			align = xfs_get_cowextsz_hint(ap->ip);
  3484		else if (ap->datatype & XFS_ALLOC_USERDATA)
  3485			align = xfs_get_extsz_hint(ap->ip);
  3486		if (align) {
  3487			error = xfs_bmap_extsize_align(mp, &ap->got, &ap->prev,
  3488							align, 0, ap->eof, 0, ap->conv,
  3489							&ap->offset, &ap->length);
  3490			ASSERT(!error);
  3491			ASSERT(ap->length);
  3492		}
  3493	
  3494		/* apply extent size hints if obtained earlier */
  3495		if (align) {
  3496			args->prod = align;
  3497			div_u64_rem(ap->offset, args->prod, &args->mod);
  3498			if (args->mod)
  3499				args->mod = args->prod - args->mod;
  3500		} else if (mp->m_sb.sb_blocksize >= PAGE_SIZE) {
  3501			args->prod = 1;
  3502			args->mod = 0;
  3503		} else {
  3504			args->prod = PAGE_SIZE >> mp->m_sb.sb_blocklog;
  3505			div_u64_rem(ap->offset, args->prod, &args->mod);
  3506			if (args->mod)
  3507				args->mod = args->prod - args->mod;
  3508		}
  3509	
  3510		return stripe_align;
  3511	}
  3512	

---
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