llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [bcachefs:bcachefs-testing 136/137] fs/bcachefs/btree_trans_commit.c:999:19: warning: shift count is negative
@ 2024-03-09 18:06 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-03-09 18:06 UTC (permalink / raw)
  To: Kent Overstreet; +Cc: llvm, oe-kbuild-all, Kent Overstreet

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

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

only message in thread, other threads:[~2024-03-09 18:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-09 18:06 [bcachefs:bcachefs-testing 136/137] fs/bcachefs/btree_trans_commit.c:999:19: warning: shift count is negative 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).