Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3912428rwb; Tue, 20 Sep 2022 06:30:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4z8L3VJxd9w/KTSrVjVy31t7qm9loAYmPMD03pDGIKiD00aslTdH8ewr//zuqaFRbF6Q3o X-Received: by 2002:a17:90a:9281:b0:203:19a9:e57e with SMTP id n1-20020a17090a928100b0020319a9e57emr3959719pjo.97.1663680652434; Tue, 20 Sep 2022 06:30:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663680652; cv=none; d=google.com; s=arc-20160816; b=qGuM8i/V8ZJ70icg7yGBHQ9HcOqsiuO7u5kJFrg1o/TuXOtqrSXMAr/Pak8she0GtB D6AGLRt+B/WuxImLdQf69o+gUrkncZmQD7SgDBRTTEwFBNAYnRg8Ew3gIS+9nrwDKCBq DiZLpT9DcAz22Bydo5uJPkkXcpNoi8gTxexqlkNtDV9gy56aWx8cNLfevC/bCx3W77yG OW7hggi7JCT94lmDszvWSd1YPw/B/acj2jl6DJb8/WZOmFUa1T1nY+HMcme3jlLcomjx SDwRwEAFxlEpIctGjG8ZgOWBF8HkWL1nM6JXDFvq6xnI8rAeGoV+1oguqEyNS6HbRbZl w9SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=VUknUsDsmRwSramlHU9UIJD51nUMOQR7aajwIQHchP4=; b=azHiwpx5brqkUWsQb8zW6LdQ8tPQ+IjjknoahUjimnwvyAq/7b/x4U64ayD/yBg6p7 7Zqb+TLrULLEL7PFac8TD2Xqotc2QZ+4CJnZVSqZv2thwqZ+69WxeGa7c2A4V2xIwUou Bpx10PkjIgRlZucRokizh66oUiApX1qBT3n0FcfmTBA09JW5RvVSF5pNd0cdXWud7Tw/ jZ8qIc6V9Qmkl8klayLo/VTPqUE2ixIqZf6TUOQvHGsoV1kNFAwQ+aaSIHaHhIc2TIVX zu6FdYPtmASNWs6i8bsv3A1vGXKfx46MYd5vxDceoQXOF1aj6cEd6pBK9QZaHmIid0AT ZxaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r18-20020a170902e3d200b00174419b27f3si1466009ple.605.2022.09.20.06.30.38; Tue, 20 Sep 2022 06:30:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231265AbiITMf5 (ORCPT + 99 others); Tue, 20 Sep 2022 08:35:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231300AbiITMfi (ORCPT ); Tue, 20 Sep 2022 08:35:38 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 194F675480 for ; Tue, 20 Sep 2022 05:35:32 -0700 (PDT) Received: from dggpeml500023.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MX1B51QzRzlVsg; Tue, 20 Sep 2022 20:31:25 +0800 (CST) Received: from [10.67.110.112] (10.67.110.112) by dggpeml500023.china.huawei.com (7.185.36.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 20 Sep 2022 20:35:31 +0800 Subject: Re: [PATCH] mm/secretmem: remove reduntant return value To: David Hildenbrand , CC: , References: <20220920012205.246217-1-xiujianfeng@huawei.com> <3196b824-bcee-0c44-bfd3-f6cd8a1e6719@redhat.com> From: xiujianfeng Message-ID: Date: Tue, 20 Sep 2022 20:35:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <3196b824-bcee-0c44-bfd3-f6cd8a1e6719@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.110.112] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500023.china.huawei.com (7.185.36.114) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, 在 2022/9/20 20:10, David Hildenbrand 写道: > On 20.09.22 03:22, Xiu Jianfeng wrote: >> The return value @ret is always 0, so remove it and return 0 directly. >> >> Signed-off-by: Xiu Jianfeng >> --- >>   mm/secretmem.c | 6 ++---- >>   1 file changed, 2 insertions(+), 4 deletions(-) >> >> diff --git a/mm/secretmem.c b/mm/secretmem.c >> index 6a44efb673b2..04c3ac9448a1 100644 >> --- a/mm/secretmem.c >> +++ b/mm/secretmem.c >> @@ -278,10 +278,8 @@ static struct file_system_type secretmem_fs = { >>   static int __init secretmem_init(void) >>   { >> -    int ret = 0; >> - >>       if (!secretmem_enable) >> -        return ret; >> +        return 0; >>       secretmem_mnt = kern_mount(&secretmem_fs); >>       if (IS_ERR(secretmem_mnt)) > > On top of which tree is that? > > 6.0-rc6 has here: > > if (IS_ERR(secretmem_mnt)) >     ret = PTR_ERR(secretmem_mnt); > Sorry, it's on linux-next tree, I should have used [PATCH -next]:)