[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202312140748.LI8Jmu2W-lkp@intel.com>
Date: Thu, 14 Dec 2023 07:45:59 +0800
From: kernel test robot <lkp@...el.com>
To: Kent Overstreet <kmo@...erainc.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: fs/bcachefs/backpointers.c:46:5-8: Unneeded variable: "ret". Return
" 0" on line 53
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5bd7ef53ffe5ca580e93e74eb8c81ed191ddc4bd
commit: b65db750e2bb9252321fd54c284edd73c1595a09 bcachefs: Enumerate fsck errors
date: 6 weeks ago
config: x86_64-randconfig-102-20231213 (https://download.01.org/0day-ci/archive/20231214/202312140748.LI8Jmu2W-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce: (https://download.01.org/0day-ci/archive/20231214/202312140748.LI8Jmu2W-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312140748.LI8Jmu2W-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> fs/bcachefs/backpointers.c:46:5-8: Unneeded variable: "ret". Return " 0" on line 53
--
>> fs/bcachefs/inode.c:404:5-8: Unneeded variable: "ret". Return " 0" on line 437
fs/bcachefs/inode.c:617:5-8: Unneeded variable: "ret". Return " 0" on line 623
--
>> fs/bcachefs/xattr.c:80:5-8: Unneeded variable: "ret". Return " 0" on line 104
vim +46 fs/bcachefs/backpointers.c
39
40 int bch2_backpointer_invalid(struct bch_fs *c, struct bkey_s_c k,
41 enum bkey_invalid_flags flags,
42 struct printbuf *err)
43 {
44 struct bkey_s_c_backpointer bp = bkey_s_c_to_backpointer(k);
45 struct bpos bucket = bp_pos_to_bucket(c, bp.k->p);
> 46 int ret = 0;
47
48 bkey_fsck_err_on(!bpos_eq(bp.k->p, bucket_pos_to_bp(c, bucket, bp.v->bucket_offset)),
49 c, err,
50 backpointer_pos_wrong,
51 "backpointer at wrong pos");
52 fsck_err:
> 53 return ret;
54 }
55
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists