All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [jlayton:bakeathon 10/13] fs/xfs/xfs_iops.c:562:33: warning: unused variable 'ctime'
Date: Wed, 11 Oct 2023 21:14:31 +0800	[thread overview]
Message-ID: <202310112104.mXxRmLH1-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git bakeathon
head:   fb68ac18df9442a3a064e632eff09cf184aacb23
commit: c976d1f74f46996460393051a6d6744a20795886 [10/13] xfs: switch to multigrain timestamps
config: arc-randconfig-001-20231011 (https://download.01.org/0day-ci/archive/20231011/202310112104.mXxRmLH1-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231011/202310112104.mXxRmLH1-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310112104.mXxRmLH1-lkp@intel.com/

All warnings (new ones prefixed by >>):

   fs/xfs/xfs_iops.c: In function 'xfs_vn_getattr':
>> fs/xfs/xfs_iops.c:562:33: warning: unused variable 'ctime' [-Wunused-variable]
     562 |         struct timespec64       ctime;
         |                                 ^~~~~


vim +/ctime +562 fs/xfs/xfs_iops.c

   548	
   549	STATIC int
   550	xfs_vn_getattr(
   551		struct mnt_idmap	*idmap,
   552		const struct path	*path,
   553		struct kstat		*stat,
   554		u32			request_mask,
   555		unsigned int		query_flags)
   556	{
   557		struct inode		*inode = d_inode(path->dentry);
   558		struct xfs_inode	*ip = XFS_I(inode);
   559		struct xfs_mount	*mp = ip->i_mount;
   560		vfsuid_t		vfsuid = i_uid_into_vfsuid(idmap, inode);
   561		vfsgid_t		vfsgid = i_gid_into_vfsgid(idmap, inode);
 > 562		struct timespec64	ctime;
   563	
   564		trace_xfs_getattr(ip);
   565	
   566		if (xfs_is_shutdown(mp))
   567			return -EIO;
   568	
   569		stat->size = XFS_ISIZE(ip);
   570		stat->dev = inode->i_sb->s_dev;
   571		stat->mode = inode->i_mode;
   572		stat->nlink = inode->i_nlink;
   573		stat->uid = vfsuid_into_kuid(vfsuid);
   574		stat->gid = vfsgid_into_kgid(vfsgid);
   575		stat->ino = ip->i_ino;
   576		stat->atime = inode_get_atime(inode);
   577		fill_mg_cmtime(stat, request_mask, inode);
   578	
   579		stat->blocks = XFS_FSB_TO_BB(mp, ip->i_nblocks + ip->i_delayed_blks);
   580	
   581		if (xfs_has_v3inodes(mp)) {
   582			if (request_mask & STATX_BTIME) {
   583				stat->result_mask |= STATX_BTIME;
   584				stat->btime = ip->i_crtime;
   585			}
   586		}
   587	
   588		/*
   589		 * Note: If you add another clause to set an attribute flag, please
   590		 * update attributes_mask below.
   591		 */
   592		if (ip->i_diflags & XFS_DIFLAG_IMMUTABLE)
   593			stat->attributes |= STATX_ATTR_IMMUTABLE;
   594		if (ip->i_diflags & XFS_DIFLAG_APPEND)
   595			stat->attributes |= STATX_ATTR_APPEND;
   596		if (ip->i_diflags & XFS_DIFLAG_NODUMP)
   597			stat->attributes |= STATX_ATTR_NODUMP;
   598	
   599		stat->attributes_mask |= (STATX_ATTR_IMMUTABLE |
   600					  STATX_ATTR_APPEND |
   601					  STATX_ATTR_NODUMP);
   602	
   603		switch (inode->i_mode & S_IFMT) {
   604		case S_IFBLK:
   605		case S_IFCHR:
   606			stat->blksize = BLKDEV_IOSIZE;
   607			stat->rdev = inode->i_rdev;
   608			break;
   609		case S_IFREG:
   610			if (request_mask & STATX_DIOALIGN) {
   611				struct xfs_buftarg	*target = xfs_inode_buftarg(ip);
   612				struct block_device	*bdev = target->bt_bdev;
   613	
   614				stat->result_mask |= STATX_DIOALIGN;
   615				stat->dio_mem_align = bdev_dma_alignment(bdev) + 1;
   616				stat->dio_offset_align = bdev_logical_block_size(bdev);
   617			}
   618			fallthrough;
   619		default:
   620			stat->blksize = xfs_stat_blksize(ip);
   621			stat->rdev = 0;
   622			break;
   623		}
   624	
   625		return 0;
   626	}
   627	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2023-10-11 13:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202310112104.mXxRmLH1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jlayton@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.