diff mbox series

btrfs: send: cleanup unneeded variable in changed_verity

Message ID 20241010-btrfs-return-cleanup-v1-1-3d7a7649530a@heusel.eu (mailing list archive)
State New, archived
Headers show
Series btrfs: send: cleanup unneeded variable in changed_verity | expand

Commit Message

Christian Heusel Oct. 10, 2024, 1:25 p.m. UTC
As all changed_ functions need to return something, just return 0
directly here, as the verity status is passed via the context.

Suggested-by: David Sterba <dsterba@suse.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410092305.WbyqspH8-lkp@intel.com/
Signed-off-by: Christian Heusel <christian@heusel.eu>
---
 fs/btrfs/send.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)


---
base-commit: 9852d85ec9d492ebef56dc5f229416c925758edc
change-id: 20241010-btrfs-return-cleanup-57ebbbf53cbe

Best regards,
--
Christian Heusel <christian@heusel.eu>

Comments

David Sterba Oct. 10, 2024, 3:32 p.m. UTC | #1
On Thu, Oct 10, 2024 at 03:25:25PM +0200, Christian Heusel wrote:
> As all changed_ functions need to return something, just return 0
> directly here, as the verity status is passed via the context.
> 
> Suggested-by: David Sterba <dsterba@suse.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202410092305.WbyqspH8-lkp@intel.com/
> Signed-off-by: Christian Heusel <christian@heusel.eu>

Thank you, added to for-next.
diff mbox series

Patch

diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 7f48ba6c1c77a0862932bdeffdf7b350267ca544..3f7e100a63cd5e444f8cd76c24114a5855a86e61 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -7167,13 +7167,11 @@  static int changed_extent(struct send_ctx *sctx,

 static int changed_verity(struct send_ctx *sctx, enum btrfs_compare_tree_result result)
 {
-	int ret = 0;
-
 	if (!sctx->cur_inode_new_gen && !sctx->cur_inode_deleted) {
 		if (result == BTRFS_COMPARE_TREE_NEW)
 			sctx->cur_inode_needs_verity = true;
 	}
-	return ret;
+	return 0;
 }

 static int dir_changed(struct send_ctx *sctx, u64 dir)