Re: [PATCH v2 13/13] name-rev: cleanup name_ref()
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Dec 9, 2019, 12:32 UTC
- Message-ID
- <20191209123203.GC2746@szeder.dev>
- In-Reply-To
- <20191127180102.167352-1-jonathantanmy@google.com>
On Wed, Nov 27, 2019 at 10:01:02AM -0800, Jonathan Tan wrote:
Show 11 quoted lines
> > 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.