* fs/btrfs/send.c:6877:5-8: Unneeded variable: "ret". Return "0" on line 6883
@ 2024-10-09 16:04 kernel test robot
2024-10-10 11:53 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2024-10-09 16:04 UTC (permalink / raw)
To: Boris Burkov; +Cc: oe-kbuild-all, linux-kernel, David Sterba
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 75b607fab38d149f232f01eae5e6392b394dd659
commit: 38622010a6de3a62cc72688348548854ed82dcf5 btrfs: send: add support for fs-verity
date: 2 years ago
config: i386-randconfig-052-20241009 (https://download.01.org/0day-ci/archive/20241009/202410092305.WbyqspH8-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
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/202410092305.WbyqspH8-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> fs/btrfs/send.c:6877:5-8: Unneeded variable: "ret". Return "0" on line 6883
vim +6877 fs/btrfs/send.c
6874
6875 static int changed_verity(struct send_ctx *sctx, enum btrfs_compare_tree_result result)
6876 {
> 6877 int ret = 0;
6878
6879 if (!sctx->cur_inode_new_gen && !sctx->cur_inode_deleted) {
6880 if (result == BTRFS_COMPARE_TREE_NEW)
6881 sctx->cur_inode_needs_verity = true;
6882 }
> 6883 return ret;
6884 }
6885
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: fs/btrfs/send.c:6877:5-8: Unneeded variable: "ret". Return "0" on line 6883
2024-10-09 16:04 fs/btrfs/send.c:6877:5-8: Unneeded variable: "ret". Return "0" on line 6883 kernel test robot
@ 2024-10-10 11:53 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2024-10-10 11:53 UTC (permalink / raw)
To: linux-btrfs
Cc: Boris Burkov, oe-kbuild-all, linux-kernel, David Sterba,
kernel test robot
On Thu, Oct 10, 2024 at 12:04:53AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 75b607fab38d149f232f01eae5e6392b394dd659
> commit: 38622010a6de3a62cc72688348548854ed82dcf5 btrfs: send: add support for fs-verity
> date: 2 years ago
> config: i386-randconfig-052-20241009 (https://download.01.org/0day-ci/archive/20241009/202410092305.WbyqspH8-lkp@intel.com/config)
> compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
>
> 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/202410092305.WbyqspH8-lkp@intel.com/
>
> cocci warnings: (new ones prefixed by >>)
> >> fs/btrfs/send.c:6877:5-8: Unneeded variable: "ret". Return "0" on line 6883
>
> vim +6877 fs/btrfs/send.c
>
> 6874
> 6875 static int changed_verity(struct send_ctx *sctx, enum btrfs_compare_tree_result result)
> 6876 {
> > 6877 int ret = 0;
> 6878
> 6879 if (!sctx->cur_inode_new_gen && !sctx->cur_inode_deleted) {
> 6880 if (result == BTRFS_COMPARE_TREE_NEW)
> 6881 sctx->cur_inode_needs_verity = true;
> 6882 }
> > 6883 return ret;
Trivial fix if somebody wants to take it. All changed_ callbacks must
return a value but here the verity status is passed via the context so
this should be 'return 0'.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-10 11:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-09 16:04 fs/btrfs/send.c:6877:5-8: Unneeded variable: "ret". Return "0" on line 6883 kernel test robot
2024-10-10 11:53 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox