[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 8 Aug 2021 10:56:29 +0800
From: Baolin Wang <baolin.wang@...ux.alibaba.com>
To: Yang Shi <shy828301@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Linux MM <linux-mm@...ck.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 5/5] mm: migrate: Remove redundant goto labels
> On Thu, Aug 5, 2021 at 8:19 PM Baolin Wang
> <baolin.wang@...ux.alibaba.com> wrote:
>>
>> Hi Yang,
>>
>>> On Thu, Aug 5, 2021 at 8:06 AM Baolin Wang
>>> <baolin.wang@...ux.alibaba.com> wrote:
>>>>
>>>> Remove redundant goto labels to simplify the code.
>>>
>>> TBH I don't see too much benefit. The "goto" makes the functions have
>>> a single exit point.
>>
>> Yes, I agree that the 'goto' statement can make things easier when a
>> function exits from multiple locations and some common work such as
>> cleanup has to be done, as well as introducing complexity to reading the
>> code. So per the coding style documentation, "If there is no cleanup
>> needed then just return directly", which can make code more readable I
>> think :)
>>
>> But I have no strong opinion on this, I can drop this patch if you still
>> think this is unnecessary. Thanks for your review and comments.
>
> Thanks, IMHO I'd like to drop it for now.
OK, will do. Thanks.
Powered by blists - more mailing lists