Subject: Re: [PATCH v2 13/13] name-rev: cleanup name_ref()

From: SZEDER Gábor <[email-masked]>
Date: Mon, 9 Dec 2019 13:32:03 +0100

On Wed, Nov 27, 2019 at 10:01:02AM -0800, Jonathan Tan wrote:
> > Earlier patches in this series moved a couple of conditions from the
> > recursive name_rev() function into its caller name_ref(), for no other
> > reason than to make eliminating the recursion a bit easier to follow.
> > 
> > Since the previous patch name_rev() is not recursive anymore, so let's
> > move all those conditions back into name_rev().
> 
> I don't really see the need for this code movement, to be honest. There
> is no big difference in doing the checks in one place or the other, and
> if you ask me, it might even be better to do it in the caller of
> name_rev(), and leave name_rev() to handle only the naming.

I think it does make sense: in my view the cutoff handling and calling
create_or_update_name() is part of "handling the naming", and it's
better when they are constrained to only a single function.