mbox series

[v4,0/6] part3 trivial adjustments for return variable coding style

Message ID cover.1716310365.git.anand.jain@oracle.com (mailing list archive)
Headers show
Series part3 trivial adjustments for return variable coding style | expand

Message

Anand Jain May 21, 2024, 5:11 p.m. UTC
This is v4 of part 3 of the series, containing renaming with optimization of the
return variable.

v3 part3:
  https://lore.kernel.org/linux-btrfs/cover.1715783315.git.anand.jain@oracle.com/
v2 part2:
  https://lore.kernel.org/linux-btrfs/cover.1713370756.git.anand.jain@oracle.com/
v1:
  https://lore.kernel.org/linux-btrfs/cover.1710857863.git.anand.jain@oracle.com/

Anand Jain (6):
  btrfs: rename err to ret in btrfs_cleanup_fs_roots()
  btrfs: rename ret to err in btrfs_recover_relocation()
  btrfs: rename ret to ret2 in btrfs_recover_relocation()
  btrfs: rename err to ret in btrfs_recover_relocation()
  btrfs: rename err to ret in btrfs_drop_snapshot()
  btrfs: rename err to ret in btrfs_find_orphan_roots()

 fs/btrfs/disk-io.c     | 37 ++++++++++++++--------------
 fs/btrfs/extent-tree.c | 48 ++++++++++++++++++------------------
 fs/btrfs/relocation.c  | 56 +++++++++++++++++++-----------------------
 fs/btrfs/root-tree.c   | 33 +++++++++++++------------
 4 files changed, 85 insertions(+), 89 deletions(-)

Comments

David Sterba May 21, 2024, 6:10 p.m. UTC | #1
On Wed, May 22, 2024 at 01:11:06AM +0800, Anand Jain wrote:
> This is v4 of part 3 of the series, containing renaming with optimization of the
> return variable.
> 
> v3 part3:
>   https://lore.kernel.org/linux-btrfs/cover.1715783315.git.anand.jain@oracle.com/
> v2 part2:
>   https://lore.kernel.org/linux-btrfs/cover.1713370756.git.anand.jain@oracle.com/
> v1:
>   https://lore.kernel.org/linux-btrfs/cover.1710857863.git.anand.jain@oracle.com/
> 
> Anand Jain (6):
>   btrfs: rename err to ret in btrfs_cleanup_fs_roots()
>   btrfs: rename ret to err in btrfs_recover_relocation()
>   btrfs: rename ret to ret2 in btrfs_recover_relocation()
>   btrfs: rename err to ret in btrfs_recover_relocation()
>   btrfs: rename err to ret in btrfs_drop_snapshot()
>   btrfs: rename err to ret in btrfs_find_orphan_roots()

1-5 look ok to me, for patch 6 there's the ret = 0 reset question sent
to v3.
David Sterba May 23, 2024, 5:18 p.m. UTC | #2
On Tue, May 21, 2024 at 08:10:03PM +0200, David Sterba wrote:
> On Wed, May 22, 2024 at 01:11:06AM +0800, Anand Jain wrote:
> > This is v4 of part 3 of the series, containing renaming with optimization of the
> > return variable.
> > 
> > v3 part3:
> >   https://lore.kernel.org/linux-btrfs/cover.1715783315.git.anand.jain@oracle.com/
> > v2 part2:
> >   https://lore.kernel.org/linux-btrfs/cover.1713370756.git.anand.jain@oracle.com/
> > v1:
> >   https://lore.kernel.org/linux-btrfs/cover.1710857863.git.anand.jain@oracle.com/
> > 
> > Anand Jain (6):
> >   btrfs: rename err to ret in btrfs_cleanup_fs_roots()
> >   btrfs: rename ret to err in btrfs_recover_relocation()
> >   btrfs: rename ret to ret2 in btrfs_recover_relocation()
> >   btrfs: rename err to ret in btrfs_recover_relocation()
> >   btrfs: rename err to ret in btrfs_drop_snapshot()
> >   btrfs: rename err to ret in btrfs_find_orphan_roots()
> 
> 1-5 look ok to me, for patch 6 there's the ret = 0 reset question sent
> to v3.

You can add 1-5 to for-next with

Reviewed-by: David Sterba <dsterba@suse.com>

and only resend 6.
Anand Jain May 24, 2024, 3:09 a.m. UTC | #3
On 5/24/24 01:18, David Sterba wrote:
> On Tue, May 21, 2024 at 08:10:03PM +0200, David Sterba wrote:
>> On Wed, May 22, 2024 at 01:11:06AM +0800, Anand Jain wrote:
>>> This is v4 of part 3 of the series, containing renaming with optimization of the
>>> return variable.
>>>
>>> v3 part3:
>>>    https://lore.kernel.org/linux-btrfs/cover.1715783315.git.anand.jain@oracle.com/
>>> v2 part2:
>>>    https://lore.kernel.org/linux-btrfs/cover.1713370756.git.anand.jain@oracle.com/
>>> v1:
>>>    https://lore.kernel.org/linux-btrfs/cover.1710857863.git.anand.jain@oracle.com/
>>>
>>> Anand Jain (6):
>>>    btrfs: rename err to ret in btrfs_cleanup_fs_roots()
>>>    btrfs: rename ret to err in btrfs_recover_relocation()
>>>    btrfs: rename ret to ret2 in btrfs_recover_relocation()
>>>    btrfs: rename err to ret in btrfs_recover_relocation()
>>>    btrfs: rename err to ret in btrfs_drop_snapshot()
>>>    btrfs: rename err to ret in btrfs_find_orphan_roots()
>>
>> 1-5 look ok to me, for patch 6 there's the ret = 0 reset question sent
>> to v3.
> 
> You can add 1-5 to for-next with
> 
> Reviewed-by: David Sterba <dsterba@suse.com>
> 

Pushed 1-5.

> and only resend 6.

IMO, in the patch 6, the

  if (ret > 1)
     ret = 0;

section is already simple and typical for the ret > 1 cases.
Could you pls check my response in v3.

Thanks, Anand