From: kernel test robot <lkp@intel.com>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: oe-kbuild-all@lists.linux.dev,
Kent Overstreet <kent.overstreet@linux.dev>
Subject: [bcachefs:bcachefs-testing 137/139] fs/bcachefs/fs-io.c:967:13: warning: variable 'ret' set but not used
Date: Thu, 18 Jul 2024 08:40:39 +0800 [thread overview]
Message-ID: <202407180828.AzmspvTW-lkp@intel.com> (raw)
tree: https://evilpiepirate.org/git/bcachefs.git bcachefs-testing
head: 2fafde34d87cf01b1d403bc94515971fc719fd1e
commit: 0415bbece4236c59dae1abd0041b4cf7a5b5a46a [137/139] bcachefs: bch2_seek_hole() -> for_each_btree_key_in_subvolume_upto
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20240718/202407180828.AzmspvTW-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240718/202407180828.AzmspvTW-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/202407180828.AzmspvTW-lkp@intel.com/
All warnings (new ones prefixed by >>):
fs/bcachefs/fs-io.c: In function 'bch2_seek_hole':
>> fs/bcachefs/fs-io.c:967:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
967 | int ret;
| ^~~
vim +/ret +967 fs/bcachefs/fs-io.c
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 960
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 961 static loff_t bch2_seek_hole(struct file *file, u64 offset)
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 962 {
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 963 struct bch_inode_info *inode = file_bch_inode(file);
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 964 struct bch_fs *c = inode->v.i_sb->s_fs_info;
6fed42bb7750e21 Kent Overstreet 2021-03-16 965 subvol_inum inum = inode_inum(inode);
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 966 u64 isize, next_hole = MAX_LFS_FILESIZE;
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 @967 int ret;
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 968
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 969 isize = i_size_read(&inode->v);
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 970 if (offset >= isize)
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 971 return -ENXIO;
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 972
0415bbece4236c5 Kent Overstreet 2024-07-17 973 ret = bch2_trans_run(c,
0415bbece4236c5 Kent Overstreet 2024-07-17 974 for_each_btree_key_in_subvolume_upto(trans, iter, BTREE_ID_extents,
0415bbece4236c5 Kent Overstreet 2024-07-17 975 POS(inode->v.i_ino, offset >> 9),
0415bbece4236c5 Kent Overstreet 2024-07-17 976 POS(inode->v.i_ino, U64_MAX),
0415bbece4236c5 Kent Overstreet 2024-07-17 977 inum.subvol, BTREE_ITER_slots, k, ({
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 978 if (k.k->p.inode != inode->v.i_ino) {
543ef2ebcd90686 Kent Overstreet 2019-07-30 979 next_hole = bch2_seek_pagecache_hole(&inode->v,
4198bf03bed27aa Kent Overstreet 2023-08-03 980 offset, MAX_LFS_FILESIZE, 0, false);
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 981 break;
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 982 } else if (!bkey_extent_is_data(k.k)) {
543ef2ebcd90686 Kent Overstreet 2019-07-30 983 next_hole = bch2_seek_pagecache_hole(&inode->v,
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 984 max(offset, bkey_start_offset(k.k) << 9),
4198bf03bed27aa Kent Overstreet 2023-08-03 985 k.k->p.offset << 9, 0, false);
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 986
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 987 if (next_hole < k.k->p.offset << 9)
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 988 break;
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 989 } else {
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 990 offset = max(offset, bkey_start_offset(k.k) << 9);
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 991 }
0415bbece4236c5 Kent Overstreet 2024-07-17 992 0;
0415bbece4236c5 Kent Overstreet 2024-07-17 993 })));
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 994
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 995 if (next_hole > isize)
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 996 next_hole = isize;
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 997
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 998 return vfs_setpos(file, next_hole, MAX_LFS_FILESIZE);
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 999 }
1c6fdbd8f2465dd Kent Overstreet 2017-03-16 1000
:::::: The code at line 967 was first introduced by commit
:::::: 1c6fdbd8f2465ddfb73a01ec620cbf3d14044e1a bcachefs: Initial commit
:::::: TO: Kent Overstreet <kent.overstreet@gmail.com>
:::::: CC: Kent Overstreet <kent.overstreet@linux.dev>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-07-18 0:41 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=202407180828.AzmspvTW-lkp@intel.com \
--to=lkp@intel.com \
--cc=kent.overstreet@linux.dev \
--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.