From: kernel test robot <lkp@intel.com>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Kent Overstreet <kent.overstreet@linux.dev>
Subject: [bcachefs:bcachefs-testing 136/137] fs/bcachefs/btree_trans_commit.c:999:19: warning: shift count is negative
Date: Sun, 10 Mar 2024 02:06:41 +0800 [thread overview]
Message-ID: <202403100245.i6zMVKd9-lkp@intel.com> (raw)
tree: https://evilpiepirate.org/git/bcachefs.git bcachefs-testing
head: d7b003a90209bd1fc2e539148dcf9eb64ae3ca89
commit: b62187885a0702d5233b59b91b19672f44ffab40 [136/137] bcachefs: map_bit()
config: i386-buildonly-randconfig-002-20240309 (https://download.01.org/0day-ci/archive/20240310/202403100245.i6zMVKd9-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240310/202403100245.i6zMVKd9-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/202403100245.i6zMVKd9-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/bcachefs/btree_trans_commit.c:999:19: warning: shift count is negative [-Wshift-count-negative]
999 | invalid_flags |= map_bit(~flags, BCH_TRANS_COMMIT_no_journal_res, BKEY_INVALID_WRITE);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/bcachefs/util.h:770:2: note: expanded from macro 'map_bit'
770 | signed_shift((_src) & _src_mask, ilog2(_dst_mask) - ilog2(_src_mask)); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/bcachefs/util.h:766:10: note: expanded from macro 'signed_shift'
766 | : (_w) >> (_s))
| ^ ~~~~
fs/bcachefs/btree_trans_commit.c:1000:19: warning: shift count is negative [-Wshift-count-negative]
1000 | invalid_flags |= map_bit(~flags, BCH_TRANS_COMMIT_no_journal_res, BKEY_INVALID_COMMIT);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/bcachefs/util.h:770:2: note: expanded from macro 'map_bit'
770 | signed_shift((_src) & _src_mask, ilog2(_dst_mask) - ilog2(_src_mask)); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/bcachefs/util.h:766:10: note: expanded from macro 'signed_shift'
766 | : (_w) >> (_s))
| ^ ~~~~
2 warnings generated.
vim +999 fs/bcachefs/btree_trans_commit.c
981
982 int __bch2_trans_commit(struct btree_trans *trans, unsigned flags)
983 {
984 struct btree_insert_entry *errored_at = NULL;
985 struct bch_fs *c = trans->c;
986 int ret = 0;
987
988 if (!trans->nr_updates &&
989 !trans->journal_entries_u64s)
990 goto out_reset;
991
992 memset(&trans->fs_usage_delta, 0, sizeof(trans->fs_usage_delta));
993
994 ret = bch2_trans_commit_run_triggers(trans);
995 if (ret)
996 goto out_reset;
997
998 enum bkey_invalid_flags invalid_flags = 0;
> 999 invalid_flags |= map_bit(~flags, BCH_TRANS_COMMIT_no_journal_res, BKEY_INVALID_WRITE);
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-03-09 18:07 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=202403100245.i6zMVKd9-lkp@intel.com \
--to=lkp@intel.com \
--cc=kent.overstreet@linux.dev \
--cc=llvm@lists.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 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).