* [PATCH v2] erofs: mark z_erofs_lzma_init/erofs_pcpubuf_init w/ __init
@ 2023-03-03 6:37 Yangtao Li
2023-03-03 7:29 ` Yue Hu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yangtao Li @ 2023-03-03 6:37 UTC (permalink / raw)
To: xiang, chao, huyue2, jefflexu; +Cc: linux-erofs, linux-kernel, Yangtao Li
They are used during the erofs module init phase. Let's mark it as
__init like any other function.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
v2:
-change in internal.h
fs/erofs/decompressor_lzma.c | 2 +-
fs/erofs/internal.h | 4 ++--
fs/erofs/pcpubuf.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/erofs/decompressor_lzma.c b/fs/erofs/decompressor_lzma.c
index 091fd5adf818..307b37f0b9f5 100644
--- a/fs/erofs/decompressor_lzma.c
+++ b/fs/erofs/decompressor_lzma.c
@@ -47,7 +47,7 @@ void z_erofs_lzma_exit(void)
}
}
-int z_erofs_lzma_init(void)
+int __init z_erofs_lzma_init(void)
{
unsigned int i;
diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h
index 3f3561d37d1b..1db018f8c2e8 100644
--- a/fs/erofs/internal.h
+++ b/fs/erofs/internal.h
@@ -486,7 +486,7 @@ static inline void *erofs_vm_map_ram(struct page **pages, unsigned int count)
void *erofs_get_pcpubuf(unsigned int requiredpages);
void erofs_put_pcpubuf(void *ptr);
int erofs_pcpubuf_growsize(unsigned int nrpages);
-void erofs_pcpubuf_init(void);
+void __init erofs_pcpubuf_init(void);
void erofs_pcpubuf_exit(void);
int erofs_register_sysfs(struct super_block *sb);
@@ -545,7 +545,7 @@ static inline int z_erofs_fill_inode(struct inode *inode) { return -EOPNOTSUPP;
#endif /* !CONFIG_EROFS_FS_ZIP */
#ifdef CONFIG_EROFS_FS_ZIP_LZMA
-int z_erofs_lzma_init(void);
+int __init z_erofs_lzma_init(void);
void z_erofs_lzma_exit(void);
int z_erofs_load_lzma_config(struct super_block *sb,
struct erofs_super_block *dsb,
diff --git a/fs/erofs/pcpubuf.c b/fs/erofs/pcpubuf.c
index a2efd833d1b6..c7a4b1d77069 100644
--- a/fs/erofs/pcpubuf.c
+++ b/fs/erofs/pcpubuf.c
@@ -114,7 +114,7 @@ int erofs_pcpubuf_growsize(unsigned int nrpages)
return ret;
}
-void erofs_pcpubuf_init(void)
+void __init erofs_pcpubuf_init(void)
{
int cpu;
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] erofs: mark z_erofs_lzma_init/erofs_pcpubuf_init w/ __init
2023-03-03 6:37 [PATCH v2] erofs: mark z_erofs_lzma_init/erofs_pcpubuf_init w/ __init Yangtao Li
@ 2023-03-03 7:29 ` Yue Hu
2023-03-03 7:59 ` Gao Xiang
2023-03-09 14:32 ` Chao Yu
2 siblings, 0 replies; 4+ messages in thread
From: Yue Hu @ 2023-03-03 7:29 UTC (permalink / raw)
To: Yangtao Li
Cc: xiang, chao, jefflexu, linux-erofs, linux-kernel, zhangwen,
huyue2
On Fri, 3 Mar 2023 14:37:31 +0800
Yangtao Li <frank.li@vivo.com> wrote:
> They are used during the erofs module init phase. Let's mark it as
> __init like any other function.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Yue Hu <huyue2@coolpad.com>
> ---
> v2:
> -change in internal.h
> fs/erofs/decompressor_lzma.c | 2 +-
> fs/erofs/internal.h | 4 ++--
> fs/erofs/pcpubuf.c | 2 +-
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fs/erofs/decompressor_lzma.c b/fs/erofs/decompressor_lzma.c
> index 091fd5adf818..307b37f0b9f5 100644
> --- a/fs/erofs/decompressor_lzma.c
> +++ b/fs/erofs/decompressor_lzma.c
> @@ -47,7 +47,7 @@ void z_erofs_lzma_exit(void)
> }
> }
>
> -int z_erofs_lzma_init(void)
> +int __init z_erofs_lzma_init(void)
> {
> unsigned int i;
>
> diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h
> index 3f3561d37d1b..1db018f8c2e8 100644
> --- a/fs/erofs/internal.h
> +++ b/fs/erofs/internal.h
> @@ -486,7 +486,7 @@ static inline void *erofs_vm_map_ram(struct page **pages, unsigned int count)
> void *erofs_get_pcpubuf(unsigned int requiredpages);
> void erofs_put_pcpubuf(void *ptr);
> int erofs_pcpubuf_growsize(unsigned int nrpages);
> -void erofs_pcpubuf_init(void);
> +void __init erofs_pcpubuf_init(void);
> void erofs_pcpubuf_exit(void);
>
> int erofs_register_sysfs(struct super_block *sb);
> @@ -545,7 +545,7 @@ static inline int z_erofs_fill_inode(struct inode *inode) { return -EOPNOTSUPP;
> #endif /* !CONFIG_EROFS_FS_ZIP */
>
> #ifdef CONFIG_EROFS_FS_ZIP_LZMA
> -int z_erofs_lzma_init(void);
> +int __init z_erofs_lzma_init(void);
> void z_erofs_lzma_exit(void);
> int z_erofs_load_lzma_config(struct super_block *sb,
> struct erofs_super_block *dsb,
> diff --git a/fs/erofs/pcpubuf.c b/fs/erofs/pcpubuf.c
> index a2efd833d1b6..c7a4b1d77069 100644
> --- a/fs/erofs/pcpubuf.c
> +++ b/fs/erofs/pcpubuf.c
> @@ -114,7 +114,7 @@ int erofs_pcpubuf_growsize(unsigned int nrpages)
> return ret;
> }
>
> -void erofs_pcpubuf_init(void)
> +void __init erofs_pcpubuf_init(void)
> {
> int cpu;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] erofs: mark z_erofs_lzma_init/erofs_pcpubuf_init w/ __init
2023-03-03 6:37 [PATCH v2] erofs: mark z_erofs_lzma_init/erofs_pcpubuf_init w/ __init Yangtao Li
2023-03-03 7:29 ` Yue Hu
@ 2023-03-03 7:59 ` Gao Xiang
2023-03-09 14:32 ` Chao Yu
2 siblings, 0 replies; 4+ messages in thread
From: Gao Xiang @ 2023-03-03 7:59 UTC (permalink / raw)
To: Yangtao Li, xiang, chao, huyue2, jefflexu; +Cc: linux-erofs, linux-kernel
On 2023/3/3 14:37, Yangtao Li wrote:
> They are used during the erofs module init phase. Let's mark it as
> __init like any other function.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Thanks,
Gao Xiang
> ---
> v2:
> -change in internal.h
> fs/erofs/decompressor_lzma.c | 2 +-
> fs/erofs/internal.h | 4 ++--
> fs/erofs/pcpubuf.c | 2 +-
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fs/erofs/decompressor_lzma.c b/fs/erofs/decompressor_lzma.c
> index 091fd5adf818..307b37f0b9f5 100644
> --- a/fs/erofs/decompressor_lzma.c
> +++ b/fs/erofs/decompressor_lzma.c
> @@ -47,7 +47,7 @@ void z_erofs_lzma_exit(void)
> }
> }
>
> -int z_erofs_lzma_init(void)
> +int __init z_erofs_lzma_init(void)
> {
> unsigned int i;
>
> diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h
> index 3f3561d37d1b..1db018f8c2e8 100644
> --- a/fs/erofs/internal.h
> +++ b/fs/erofs/internal.h
> @@ -486,7 +486,7 @@ static inline void *erofs_vm_map_ram(struct page **pages, unsigned int count)
> void *erofs_get_pcpubuf(unsigned int requiredpages);
> void erofs_put_pcpubuf(void *ptr);
> int erofs_pcpubuf_growsize(unsigned int nrpages);
> -void erofs_pcpubuf_init(void);
> +void __init erofs_pcpubuf_init(void);
> void erofs_pcpubuf_exit(void);
>
> int erofs_register_sysfs(struct super_block *sb);
> @@ -545,7 +545,7 @@ static inline int z_erofs_fill_inode(struct inode *inode) { return -EOPNOTSUPP;
> #endif /* !CONFIG_EROFS_FS_ZIP */
>
> #ifdef CONFIG_EROFS_FS_ZIP_LZMA
> -int z_erofs_lzma_init(void);
> +int __init z_erofs_lzma_init(void);
> void z_erofs_lzma_exit(void);
> int z_erofs_load_lzma_config(struct super_block *sb,
> struct erofs_super_block *dsb,
> diff --git a/fs/erofs/pcpubuf.c b/fs/erofs/pcpubuf.c
> index a2efd833d1b6..c7a4b1d77069 100644
> --- a/fs/erofs/pcpubuf.c
> +++ b/fs/erofs/pcpubuf.c
> @@ -114,7 +114,7 @@ int erofs_pcpubuf_growsize(unsigned int nrpages)
> return ret;
> }
>
> -void erofs_pcpubuf_init(void)
> +void __init erofs_pcpubuf_init(void)
> {
> int cpu;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] erofs: mark z_erofs_lzma_init/erofs_pcpubuf_init w/ __init
2023-03-03 6:37 [PATCH v2] erofs: mark z_erofs_lzma_init/erofs_pcpubuf_init w/ __init Yangtao Li
2023-03-03 7:29 ` Yue Hu
2023-03-03 7:59 ` Gao Xiang
@ 2023-03-09 14:32 ` Chao Yu
2 siblings, 0 replies; 4+ messages in thread
From: Chao Yu @ 2023-03-09 14:32 UTC (permalink / raw)
To: Yangtao Li, xiang, huyue2, jefflexu; +Cc: linux-erofs, linux-kernel
On 2023/3/3 14:37, Yangtao Li wrote:
> They are used during the erofs module init phase. Let's mark it as
> __init like any other function.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-09 14:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-03 6:37 [PATCH v2] erofs: mark z_erofs_lzma_init/erofs_pcpubuf_init w/ __init Yangtao Li
2023-03-03 7:29 ` Yue Hu
2023-03-03 7:59 ` Gao Xiang
2023-03-09 14:32 ` Chao Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox