From: kernel test robot <lkp@intel.com>
To: Shiyang Ruan <ruansy.fnst@fujitsu.com>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
"Darrick J. Wong" <djwong@kernel.org>
Subject: [linux-next:master 6752/7019] fs/xfs/xfs_file.c:1314:21: sparse: sparse: incorrect type in assignment (different base types)
Date: Fri, 1 Jul 2022 12:04:12 +0800 [thread overview]
Message-ID: <202207011147.1SRZhlxk-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 6cc11d2a1759275b856e464265823d94aabd5eaf
commit: 97f19d0009777c7f330f559360d6697b7d534ed3 [6752/7019] xfs: support CoW in fsdax mode
config: sparc-randconfig-s031-20220629 (https://download.01.org/0day-ci/archive/20220701/202207011147.1SRZhlxk-lkp@intel.com/config)
compiler: sparc-linux-gcc (GCC) 11.3.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-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=97f19d0009777c7f330f559360d6697b7d534ed3
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 97f19d0009777c7f330f559360d6697b7d534ed3
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc SHELL=/bin/bash fs/xfs/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
fs/xfs/xfs_file.c:1273:1: sparse: sparse: symbol 'xfs_dax_fault' was not declared. Should it be static?
>> fs/xfs/xfs_file.c:1314:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted vm_fault_t [usertype] ret @@ got int @@
fs/xfs/xfs_file.c:1314:21: sparse: expected restricted vm_fault_t [usertype] ret
fs/xfs/xfs_file.c:1314:21: sparse: got int
vim +1314 fs/xfs/xfs_file.c
1282
1283 /*
1284 * Locking for serialisation of IO during page faults. This results in a lock
1285 * ordering of:
1286 *
1287 * mmap_lock (MM)
1288 * sb_start_pagefault(vfs, freeze)
1289 * invalidate_lock (vfs/XFS_MMAPLOCK - truncate serialisation)
1290 * page_lock (MM)
1291 * i_lock (XFS - extent map serialisation)
1292 */
1293 static vm_fault_t
1294 __xfs_filemap_fault(
1295 struct vm_fault *vmf,
1296 enum page_entry_size pe_size,
1297 bool write_fault)
1298 {
1299 struct inode *inode = file_inode(vmf->vma->vm_file);
1300 struct xfs_inode *ip = XFS_I(inode);
1301 vm_fault_t ret;
1302
1303 trace_xfs_filemap_fault(ip, pe_size, write_fault);
1304
1305 if (write_fault) {
1306 sb_start_pagefault(inode->i_sb);
1307 file_update_time(vmf->vma->vm_file);
1308 }
1309
1310 if (IS_DAX(inode)) {
1311 pfn_t pfn;
1312
1313 xfs_ilock(XFS_I(inode), XFS_MMAPLOCK_SHARED);
> 1314 ret = xfs_dax_fault(vmf, pe_size, write_fault, &pfn);
1315 if (ret & VM_FAULT_NEEDDSYNC)
1316 ret = dax_finish_sync_fault(vmf, pe_size, pfn);
1317 xfs_iunlock(XFS_I(inode), XFS_MMAPLOCK_SHARED);
1318 } else {
1319 if (write_fault) {
1320 xfs_ilock(XFS_I(inode), XFS_MMAPLOCK_SHARED);
1321 ret = iomap_page_mkwrite(vmf,
1322 &xfs_buffered_write_iomap_ops);
1323 xfs_iunlock(XFS_I(inode), XFS_MMAPLOCK_SHARED);
1324 } else {
1325 ret = filemap_fault(vmf);
1326 }
1327 }
1328
1329 if (write_fault)
1330 sb_end_pagefault(inode->i_sb);
1331 return ret;
1332 }
1333
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-07-01 4:04 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=202207011147.1SRZhlxk-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=djwong@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=ruansy.fnst@fujitsu.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox