[PATCH 00/29] trivial adjustments for return variable coding style

Anand Jain
2024-03-19T14:56:19Z

Rename variable 'err'; instead, use 'ret', and the 'ret' helper variable
is renamed to 'ret2'.

https://btrfs.readthedocs.io/en/latest/dev/Development-notes.html#code

In functions where 'ret' is already used as a return helper (but not the
actual return), to avoid oversight, first rename the original 'ret'
variable to 'ret2', compile it, and then rename 'err' to 'ret'.

Anand Jain (29):
btrfs: btrfs_cleanup_fs_roots rename ret to ret2 and err to ret
btrfs: btrfs_initxattrs rename err to ret
btrfs: send_extent_data rename err to ret
btrfs: btrfs_rmdir rename err to ret
btrfs: btrfs_cont_expand rename err to ret
btrfs: btrfs_setsize rename err to ret2
btrfs: btrfs_find_orphan_roots rename ret to ret2 and err to ret
btrfs: btrfs_ioctl_snap_destroy rename err to ret
btrfs: __set_extent_bit rename err to ret
btrfs: convert_extent_bit rename err to ret
btrfs: __btrfs_end_transaction rename err to ret
btrfs: btrfs_write_marked_extents rename werr to ret err to ret2
btrfs: __btrfs_wait_marked_extents rename werr to ret err to ret2
btrfs: build_backref_tree rename err to ret and ret to ret2
btrfs: relocate_tree_blocks rename ret to ret2 and err to ret
btrfs: relocate_block_group rename ret to ret2 and err to ret
btrfs: create_reloc_inode rename err to ret
btrfs: btrfs_relocate_block_group rename ret to ret2 and err ro ret
btrfs: mark_garbage_root rename err to ret2
btrfs: btrfs_recover_relocation rename ret to ret2 and err to ret
btrfs: quick_update_accounting rename err to ret2
btrfs: btrfs_qgroup_rescan_worker rename ret to ret2 and err to ret
btrfs: lookup_extent_data_ref rename ret to ret2 and err to ret
btrfs: btrfs_drop_snapshot rename ret to ret2 and err to ret
btrfs: btrfs_drop_subtree rename retw to ret2
btrfs: btrfs_dirty_pages rename variable err to ret
btrfs: prepare_pages rename err to ret
btrfs: btrfs_direct_write rename err to ret
btrfs: fixup_tree_root_location rename ret to ret2 and err to ret

fs/btrfs/disk-io.c | 22 +--
fs/btrfs/extent-io-tree.c | 58 ++++----
fs/btrfs/extent-tree.c | 122 ++++++++---------
fs/btrfs/file.c | 80 +++++------
fs/btrfs/inode.c | 88 ++++++------
fs/btrfs/ioctl.c | 66 ++++-----
fs/btrfs/qgroup.c | 44 +++---
fs/btrfs/relocation.c | 280 +++++++++++++++++++-------------------
fs/btrfs/root-tree.c | 36 ++---
fs/btrfs/send.c | 4 +-
fs/btrfs/transaction.c | 56 ++++----
fs/btrfs/xattr.c | 10 +-
12 files changed, 434 insertions(+), 432 deletions(-)

--
2.38.1