summaryrefslogtreecommitdiff
path: root/mm/shmem.c
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2022-04-28 23:15:58 -0700
committerakpm <akpm@linux-foundation.org>2022-04-28 23:15:58 -0700
commit9096bbe951ddd3f9dc813e73b5bde6d5715d1cdb (patch)
treee40c74c06263e23fe42beab0af99d458c98c9ba4 /mm/shmem.c
parent21f0dd88f23dc9dc46b781f8ec9acf975dca4e6e (diff)
downloadlwn-9096bbe951ddd3f9dc813e73b5bde6d5715d1cdb.tar.gz
lwn-9096bbe951ddd3f9dc813e73b5bde6d5715d1cdb.zip
mm: shmem: make shmem_init return void
The return value of shmem_init is never used. So we can make it return void now. [akpm@linux-foundation.org: remove `return;' from void-returning function, per Muchun Song] Link: https://lkml.kernel.org/r/20220328112707.22217-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Cc: Muchun Song <songmuchun@bytedance.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/shmem.c')
-rw-r--r--mm/shmem.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index 4b2fea33158e..e504d734177b 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -3888,7 +3888,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;
@@ -3913,14 +3913,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)
@@ -3998,14 +3997,12 @@ 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;
}
int shmem_unuse(unsigned int type)