llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [djwong-xfs:direct-xfile-mapped-buffers 103/333] fs/xfs/xfs_rtalloc.c:1439:17: warning: Value stored to 'off' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
       [not found] <202111260911.JKJz6fEX-lkp@intel.com>
@ 2021-11-27 13:09 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-11-27 13:09 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: llvm, kbuild-all, Linux Kernel Mailing List, Darrick J. Wong

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git direct-xfile-mapped-buffers
head:   014cdddffcddd5b13402721de744b9ea76961d74
commit: bd7fa0e8c47bcda25664e1b2572d33a8d61d29c3 [103/333] xfs: make atomic extent swapping support realtime files
config: i386-randconfig-c001-20211031 (https://download.01.org/0day-ci/archive/20211126/202111260911.JKJz6fEX-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d321548c3ce987f4f21350ba1c81fdb5d4354224)
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/djwong/xfs-linux.git/commit/?id=bd7fa0e8c47bcda25664e1b2572d33a8d61d29c3
         git remote add djwong-xfs https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git
         git fetch --no-tags djwong-xfs direct-xfile-mapped-buffers
         git checkout bd7fa0e8c47bcda25664e1b2572d33a8d61d29c3
         # save the config file to linux build tree
         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 clang-analyzer

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


clang-analyzer warnings: (new ones prefixed by >>)

 >> fs/xfs/xfs_rtalloc.c:1439:17: warning: Value stored to 'off' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
            xfs_fileoff_t           off = XFS_B_TO_FSBT(mp, pos);
                                    ^~~

vim +/off +1439 fs/xfs/xfs_rtalloc.c

bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1422
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1423  /*
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1424   * For all realtime extents backing the given range of a file, search for
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1425   * unwritten mappings that are do not cover a full rt extent and convert them
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1426   * to zeroed written mappings.  The goal is to end up with one mapping per rt
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1427   * extent so that we can perform a remapping operation.  Callers must ensure
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1428   * that there are no dirty pages in the given range.
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1429   */
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1430  int
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1431  xfs_rtfile_convert_unwritten(
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1432  	struct xfs_inode	*ip,
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1433  	loff_t			pos,
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1434  	uint64_t		len)
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1435  {
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1436  	struct xfs_bmbt_irec	irec;
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1437  	struct xfs_trans	*tp;
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1438  	struct xfs_mount	*mp = ip->i_mount;
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01 @1439  	xfs_fileoff_t		off = XFS_B_TO_FSBT(mp, pos);
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1440  	xfs_fileoff_t           endoff;
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1441  	unsigned int            resblks;
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1442  	int                     ret;
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1443
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1444  	if (mp->m_sb.sb_rextsize == 1)
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1445  		return 0;
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1446
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01 @1447  	off = rounddown_64(XFS_B_TO_FSBT(mp, pos), mp->m_sb.sb_rextsize);
bd7fa0e8c47bcda Darrick J. Wong 2021-09-01  1448  	endoff = roundup_64(XFS_B_TO_FSB(mp, pos + len), mp->m_sb.sb_rextsize);

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

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

only message in thread, other threads:[~2021-11-27 13:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <202111260911.JKJz6fEX-lkp@intel.com>
2021-11-27 13:09 ` [djwong-xfs:direct-xfile-mapped-buffers 103/333] fs/xfs/xfs_rtalloc.c:1439:17: warning: Value stored to 'off' during its initialization is never read [clang-analyzer-deadcode.DeadStores] kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).