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=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable 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 642D3C47257 for ; Fri, 8 May 2020 08:47:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 40054207DD for ; Fri, 8 May 2020 08:47:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 40054207DD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C831C8E0005; Fri, 8 May 2020 04:47:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C34598E0003; Fri, 8 May 2020 04:47:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B48778E0005; Fri, 8 May 2020 04:47:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0080.hostedemail.com [216.40.44.80]) by kanga.kvack.org (Postfix) with ESMTP id 9E0CC8E0003 for ; Fri, 8 May 2020 04:47:47 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 54BBF180AD80F for ; Fri, 8 May 2020 08:47:47 +0000 (UTC) X-FDA: 76792923774.29.knife28_6103d8090d61a X-HE-Tag: knife28_6103d8090d61a X-Filterd-Recvd-Size: 2497 Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Fri, 8 May 2020 08:47:46 +0000 (UTC) Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 7F7242C8CAB7887673CB; Fri, 8 May 2020 16:47:41 +0800 (CST) Received: from [127.0.0.1] (10.166.215.55) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.487.0; Fri, 8 May 2020 16:47:40 +0800 Subject: Re: [PATCH 1/1] mm: remove an unnecessary goto jump To: David Hildenbrand , Andrew Morton , linux-mm , linux-kernel References: <20200505115858.1718-1-thunder.leizhen@huawei.com> <6d06207c-5b1c-d526-ef01-e437c7696dd3@redhat.com> From: "Leizhen (ThunderTown)" Message-ID: Date: Fri, 8 May 2020 16:47:40 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <6d06207c-5b1c-d526-ef01-e437c7696dd3@redhat.com> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.166.215.55] X-CFilter-Loop: Reflected X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2020/5/8 16:06, David Hildenbrand wrote: > On 05.05.20 13:58, Zhen Lei wrote: >> This "goto" doesn't reduce any code, but bother the readers. > > "mm/page_io.c: mm: remove an unnecessary goto in generic_swapfile_activate" Do you mean change the subject? So is it: "mm/page_io.c: remove an unnecessary goto in generic_swapfile_activate()" ? > >> >> Signed-off-by: Zhen Lei >> --- >> mm/page_io.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/mm/page_io.c b/mm/page_io.c >> index 76965be1d40e..b1d4f4558e6b 100644 >> --- a/mm/page_io.c >> +++ b/mm/page_io.c >> @@ -235,10 +235,10 @@ int generic_swapfile_activate(struct swap_info_struct *sis, >> sis->highest_bit = page_no - 1; >> out: >> return ret; >> + > > nit: I'd just not mess with newlines here. OK, I will drop it. > >> bad_bmap: >> pr_err("swapon: swapfile has holes\n"); >> - ret = -EINVAL; >> - goto out; >> + return -EINVAL; >> } >> >> /* >> > > apart from that > > Reviewed-by: David Hildenbrand > >