From patchwork Tue Sep 20 01:22:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiu Jianfeng X-Patchwork-Id: 12981196 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F764C54EE9 for ; Tue, 20 Sep 2022 01:25:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C70EB80007; Mon, 19 Sep 2022 21:25:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C20B1940007; Mon, 19 Sep 2022 21:25:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AE8F980007; Mon, 19 Sep 2022 21:25:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 9C585940007 for ; Mon, 19 Sep 2022 21:25:48 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 7476FC05A4 for ; Tue, 20 Sep 2022 01:25:48 +0000 (UTC) X-FDA: 79930721976.14.2F4AB26 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf30.hostedemail.com (Postfix) with ESMTP id 422A08000D for ; Tue, 20 Sep 2022 01:25:46 +0000 (UTC) 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 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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663637146; a=rsa-sha256; cv=none; b=k6BKwYlrMTZ6apB4pcvX4tzqkjVIMHCDHQpHNyuOvvaVRskmHUNC20fdlZbCyNJwtS3RI3 y2Cflei+yImk4j/9ugdmVbGOSWiX2fZzgbSIQLWSRCO8ft2yrCyYC24W5iatULj+1TxEge OpIOKqq5v2zJs2bEFcI5YHl0q/HJ7k0= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf30.hostedemail.com: domain of xiujianfeng@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=xiujianfeng@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663637146; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references; bh=WVIBTVkXmd/vruEuUlh0YpAHtiiEFC0a4HPAH8/5fhc=; b=6e50E6RJr0/C/oocFD195XyoiJ9Nk7h4d9G1TOd8Tqip9iteTTbwjxNOaRBj/GkINOlHHC c2JXf7YkyfRMlRTEdcfuwKwiAgCvbNu4zSERV8d7gu7kpGl9KRPJl6IJqPqzXBQGyVTsbJ MrBbzedZ7FJuL2SH1xh9/dJaWdxKIM8= X-Stat-Signature: tntxmq15pnb9gosntswdf33js1uwyhm3 X-Rspamd-Queue-Id: 422A08000D X-Rspam-User: Authentication-Results: imf30.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf30.hostedemail.com: domain of xiujianfeng@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=xiujianfeng@huawei.com X-Rspamd-Server: rspam03 X-HE-Tag: 1663637146-585566 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: 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);