From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 301AFC4338F for ; Sun, 8 Aug 2021 02:56:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 06BB8606A5 for ; Sun, 8 Aug 2021 02:56:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230154AbhHHC4S (ORCPT ); Sat, 7 Aug 2021 22:56:18 -0400 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:38633 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229882AbhHHC4S (ORCPT ); Sat, 7 Aug 2021 22:56:18 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R941e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0UiGbLY0_1628391358; Received: from 30.39.238.167(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0UiGbLY0_1628391358) by smtp.aliyun-inc.com(127.0.0.1); Sun, 08 Aug 2021 10:55:58 +0800 Subject: Re: [PATCH 5/5] mm: migrate: Remove redundant goto labels To: Yang Shi Cc: Andrew Morton , Linux MM , Linux Kernel Mailing List References: <98937827-89ec-2a3b-b389-da28f8493cb1@linux.alibaba.com> From: Baolin Wang Message-ID: <95b8958c-3887-1267-9cca-d8e12549113b@linux.alibaba.com> Date: Sun, 8 Aug 2021 10:56:29 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Thu, Aug 5, 2021 at 8:19 PM Baolin Wang > wrote: >> >> Hi Yang, >> >>> On Thu, Aug 5, 2021 at 8:06 AM Baolin Wang >>> 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.