* fs/bcachefs/bkey_methods.c:46:5-8: Unneeded variable: "ret". Return " 0" on line 53
@ 2024-01-19 13:31 kernel test robot
2024-01-19 21:40 ` Kent Overstreet
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2024-01-19 13:31 UTC (permalink / raw)
To: Kent Overstreet; +Cc: oe-kbuild-all, linux-kernel
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9d1694dc91ce7b80bc96d6d8eaf1a1eca668d847
commit: b65db750e2bb9252321fd54c284edd73c1595a09 bcachefs: Enumerate fsck errors
date: 3 months ago
config: hexagon-randconfig-r061-20240117 (https://download.01.org/0day-ci/archive/20240119/202401192156.IvrA7iSY-lkp@intel.com/config)
compiler: clang version 18.0.0git (https://github.com/llvm/llvm-project 9bde5becb44ea071f5e1fa1f5d4071dc8788b18c)
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/202401192156.IvrA7iSY-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> fs/bcachefs/bkey_methods.c:46:5-8: Unneeded variable: "ret". Return " 0" on line 53
fs/bcachefs/bkey_methods.c:219:5-8: Unneeded variable: "ret". Return " 0" on line 229
vim +46 fs/bcachefs/bkey_methods.c
42
43 static int empty_val_key_invalid(struct bch_fs *c, struct bkey_s_c k,
44 enum bkey_invalid_flags flags, struct printbuf *err)
45 {
> 46 int ret = 0;
47
48 bkey_fsck_err_on(bkey_val_bytes(k.k), c, err,
49 bkey_val_size_nonzero,
50 "incorrect value size (%zu != 0)",
51 bkey_val_bytes(k.k));
52 fsck_err:
> 53 return ret;
54 }
55
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: fs/bcachefs/bkey_methods.c:46:5-8: Unneeded variable: "ret". Return " 0" on line 53
2024-01-19 13:31 fs/bcachefs/bkey_methods.c:46:5-8: Unneeded variable: "ret". Return " 0" on line 53 kernel test robot
@ 2024-01-19 21:40 ` Kent Overstreet
0 siblings, 0 replies; 2+ messages in thread
From: Kent Overstreet @ 2024-01-19 21:40 UTC (permalink / raw)
To: kernel test robot; +Cc: oe-kbuild-all, linux-kernel
On Fri, Jan 19, 2024 at 09:31:24PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 9d1694dc91ce7b80bc96d6d8eaf1a1eca668d847
> commit: b65db750e2bb9252321fd54c284edd73c1595a09 bcachefs: Enumerate fsck errors
> date: 3 months ago
> config: hexagon-randconfig-r061-20240117 (https://download.01.org/0day-ci/archive/20240119/202401192156.IvrA7iSY-lkp@intel.com/config)
> compiler: clang version 18.0.0git (https://github.com/llvm/llvm-project 9bde5becb44ea071f5e1fa1f5d4071dc8788b18c)
>
> 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/202401192156.IvrA7iSY-lkp@intel.com/
>
> cocci warnings: (new ones prefixed by >>)
> >> fs/bcachefs/bkey_methods.c:46:5-8: Unneeded variable: "ret". Return " 0" on line 53
> fs/bcachefs/bkey_methods.c:219:5-8: Unneeded variable: "ret". Return " 0" on line 229
>
> vim +46 fs/bcachefs/bkey_methods.c
>
> 42
> 43 static int empty_val_key_invalid(struct bch_fs *c, struct bkey_s_c k,
> 44 enum bkey_invalid_flags flags, struct printbuf *err)
> 45 {
> > 46 int ret = 0;
> 47
> 48 bkey_fsck_err_on(bkey_val_bytes(k.k), c, err,
> 49 bkey_val_size_nonzero,
> 50 "incorrect value size (%zu != 0)",
> 51 bkey_val_bytes(k.k));
> 52 fsck_err:
> > 53 return ret;
> 54 }
> 55
This isn't an actual bug; ret and the fsck_err: labels are used by
fsck_err() and related macros - we need a way to annotate that ret isn't
unused if we want to silence this.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-19 21:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-19 13:31 fs/bcachefs/bkey_methods.c:46:5-8: Unneeded variable: "ret". Return " 0" on line 53 kernel test robot
2024-01-19 21:40 ` Kent Overstreet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox