Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3282504rwb; Mon, 19 Sep 2022 18:49:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7rHjk+TziFWnFd6nd3TszsrUDGHnA6DBM+blAeNUuP5AN1RN/oAG2pSsSN3c8tPv/DO1em X-Received: by 2002:a05:6402:520a:b0:450:fcc3:d321 with SMTP id s10-20020a056402520a00b00450fcc3d321mr17843059edd.327.1663638570632; Mon, 19 Sep 2022 18:49:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663638570; cv=none; d=google.com; s=arc-20160816; b=JUzRmSTnWm1wWgles4520Z0RklaeV5swQ5N+ipHSrA4Q4gJGYOAVRjDbWwtdy7VmXI tMhw72/sixMkxzzOxElZW7jvopYTMl9w+NSQOiDaps4vurLAPdBDUFGRegOk6L9b3OpS V58PClsc2Os1gOzcdZ5o5uPXx0qSgfWbEeZTEoz3FiZ+YREeo+Guz3AvIQyLMMoPn8on JL3QS142dG6S/ks+NxXjRztI4pzF3KR6xVrmOHzd/fNMQgOh6X/fyrp2Z2gfdZdm75jd J6wSC/wBjjoCTqHK3rwMixi9XpFsXhjPmghl6mI5vhOvR2HxC9V+PuP5mh2EX0zyhE7G Xfuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=WVIBTVkXmd/vruEuUlh0YpAHtiiEFC0a4HPAH8/5fhc=; b=Ijb8NbUbQRx8MNsdwYOB5KozuD4HkWjF7ahsFUduFOh+Eh8Mo7p620x8DdriUeWP33 8FSbQbmA1KFloXc9SJ8HreO9lYku/FXTeBHgGepT2DLoLshVRmIxWUcweuuii/07veao yIkjvjCEV8deH6IY+1oQxVHHVo1zG+KTRGa6A8Fm8g/1ZzrDMXIQMZ8AEHcxG7vCsoSm o92tsPu44N4bd83FVhaZtzBPEbPuhOjMgBztJ3RsJNYLsAT5wgsxORPKwjT8kahW2Wf0 LUOlmylMMF1Q+t9Zpnl+zsrOGq+C2BLL+6dQKd8jAxoaTtsNr3QUmhAke1ORujDGWw/P IRAw== 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 v7-20020a056402184700b0045460be0b11si231679edy.233.2022.09.19.18.49.05; Mon, 19 Sep 2022 18:49:30 -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 S229782AbiITBZt (ORCPT + 99 others); Mon, 19 Sep 2022 21:25:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229640AbiITBZr (ORCPT ); Mon, 19 Sep 2022 21:25:47 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A05743625 for ; Mon, 19 Sep 2022 18:25:44 -0700 (PDT) Received: from dggpeml500023.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4MWkMV2MSJzHnyD; Tue, 20 Sep 2022 09:23:34 +0800 (CST) Received: from ubuntu1804.huawei.com (10.67.174.58) 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 09:25:42 +0800 From: Xiu Jianfeng To: CC: , Subject: [PATCH] mm/secretmem: remove reduntant return value Date: Tue, 20 Sep 2022 09:22:05 +0800 Message-ID: <20220920012205.246217-1-xiujianfeng@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.174.58] 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=-4.2 required=5.0 tests=BAYES_00,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 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)) @@ -290,6 +288,6 @@ static int __init secretmem_init(void) /* prevent secretmem mappings from ever getting PROT_EXEC */ secretmem_mnt->mnt_flags |= MNT_NOEXEC; - return ret; + return 0; } fs_initcall(secretmem_init); -- 2.17.1