Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5458063pxb; Mon, 28 Mar 2022 12:45:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrsFNopKI7FUjKHdGAM0p1mLN7ZTVPm7kD7MFQ2zFpK8e9CU5IcybOnpuUeZQlT/mzooZF X-Received: by 2002:aca:3a08:0:b0:2ef:99d5:8f44 with SMTP id h8-20020aca3a08000000b002ef99d58f44mr418490oia.2.1648496727258; Mon, 28 Mar 2022 12:45:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648496727; cv=none; d=google.com; s=arc-20160816; b=D/IY2gbDky4pK2lO8lO6yk/aMVtfpablG56LcCv36Bjsd1sNz7lf9sX0z6amUuuSXu dkW6l+i41GjA/hIAbxi2WZaEocK3madYg/2JjvDAR19SqIxKJECBAcn9Sd0NRlDlP1sU ARLnykf+SOBAxA+K08Vt+j28s43z549VuEPlXRu6Om5craheYKX31tpD3JqLc7UuN6EJ POjkQ+jGI1MY+ZvcUyuUlSIvMzAndLHl8jDwSSTfjx15+jUZB6vsPY1SO1G8T0QnzmPc 3drjH7fjwTdLj8Hrx2Vd88jfb8dzG7HuuoQJvRtAnFYL5cZlLQyK4Xx4FredWevkWdf6 Rn7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=kNRsvEz61H0iMOD3lGgM/vj2LP3XHDRUPTzWzDM+jWY=; b=p6Y9VTnQ6YH+86ctMPK/SK90aV7RWM8DTeQePBaV/IJNJlX3UM4fE5njMsG7mrMHJf vNWMEQ7HMQWPgnd8M73hNPlFWWEoKO/c9gKCCSTtDGPIlnmwTQrhRnVDE3cb0i4mtYmb W4ET8KLJ20uw0ZYehfz9PZFwEXEFpTpW6C3vV+NfJgV4xtFVHLZXf6KQ4q0B/+s8mUHh XVWpe7Nax6IeTozkr/GNqsXoikDsVnB7M0s9nfLIZljdaDuZxS+lpN3VxUShz1xp9cFQ 4vnoQIAZQBdc9EQNj6xAfCvchR121xdc6JzO2OAaj/SoyNRun0j7/kXGBqcVv59Ixtom N+nQ== 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 n8-20020a056870348800b000da716e61e8si11055224oah.113.2022.03.28.12.45.14; Mon, 28 Mar 2022 12:45:27 -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 S241541AbiC1Lpm (ORCPT + 99 others); Mon, 28 Mar 2022 07:45:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242661AbiC1Lf0 (ORCPT ); Mon, 28 Mar 2022 07:35:26 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53F59F76 for ; Mon, 28 Mar 2022 04:26:33 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4KRr1w24myzCrNB; Mon, 28 Mar 2022 19:24:20 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Mon, 28 Mar 2022 19:26:31 +0800 From: Miaohe Lin To: , CC: , , Subject: [PATCH] mm: shmem: make shmem_init return void Date: Mon, 28 Mar 2022 19:27:07 +0800 Message-ID: <20220328112707.22217-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 of shmem_init is never used. So we can make it return void now. Signed-off-by: Miaohe Lin --- include/linux/shmem_fs.h | 2 +- mm/shmem.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index ab51d3cd39bd..3e915cc550bc 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h @@ -56,7 +56,7 @@ static inline struct shmem_inode_info *SHMEM_I(struct inode *inode) * Functions in mm/shmem.c called directly from elsewhere: */ extern const struct fs_parameter_spec shmem_fs_parameters[]; -extern int shmem_init(void); +extern void shmem_init(void); extern int shmem_init_fs_context(struct fs_context *fc); extern struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags); diff --git a/mm/shmem.c b/mm/shmem.c index 529c9ad3e926..26e09a022087 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -3879,7 +3879,7 @@ static struct file_system_type shmem_fs_type = { .fs_flags = FS_USERNS_MOUNT, }; -int __init shmem_init(void) +void __init shmem_init(void) { int error; @@ -3904,14 +3904,13 @@ int __init shmem_init(void) else shmem_huge = SHMEM_HUGE_NEVER; /* just in case it was patched */ #endif - return 0; + return; out1: unregister_filesystem(&shmem_fs_type); out2: shmem_destroy_inodecache(); shm_mnt = ERR_PTR(error); - return error; } #if defined(CONFIG_TRANSPARENT_HUGEPAGE) && defined(CONFIG_SYSFS) @@ -3989,14 +3988,14 @@ static struct file_system_type shmem_fs_type = { .fs_flags = FS_USERNS_MOUNT, }; -int __init shmem_init(void) +void __init shmem_init(void) { BUG_ON(register_filesystem(&shmem_fs_type) != 0); shm_mnt = kern_mount(&shmem_fs_type); BUG_ON(IS_ERR(shm_mnt)); - return 0; + return; } int shmem_unuse(unsigned int type) -- 2.23.0