erofs: mark z_erofs_lzma_init/erofs_pcpubuf_init w/ __init
PATCH v2 1/1 erofs: mark z_erofs_lzma_init/erofs_pcpubuf_init w/ __init
They are used during the erofs module init phase. Let's mark it as __init like any other function.
Signed-off-by Yangtao Li <[email protected]>
---
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(-)
fs/erofs/decompressor_lzma.c +1 -1
@@ -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;
fs/erofs/internal.h +2 -2
@@ -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,
fs/erofs/pcpubuf.c +1 -1
@@ -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;
Signature · 1 line
2.25.1
Quoted 4 lines · On Fri, 3 Mar 2023 14:37:31 +0800 Yangtao Li <[email protected]> wrote:
They are used during the erofs module init phase. Let's mark it as
__initlike any other function.Signed-off-by Yangtao Li <[email protected]>
Reviewed-by Yue Hu <[email protected]>
Quoted 56 lines
---
v2:(quoted diff) +0
-1-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(-)fs/erofs/decompressor_lzma.c +1
-1@@ -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;fs/erofs/internal.h +2
-2@@ -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,fs/erofs/pcpubuf.c +1
-1@@ -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;
Quoted 4 lines · Yangtao Li
They are used during the erofs module init phase. Let's mark it as
__initlike any other function.Signed-off-by Yangtao Li <[email protected]>
Reviewed-by Gao Xiang <[email protected]>
Thanks,
Gao Xiang
Quoted 56 lines
---
v2:(quoted diff) +0
-1-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(-)fs/erofs/decompressor_lzma.c +1
-1@@ -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;fs/erofs/internal.h +2
-2@@ -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,fs/erofs/pcpubuf.c +1
-1@@ -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;
Quoted 4 lines · Yangtao Li
They are used during the erofs module init phase. Let's mark it as
__initlike any other function.Signed-off-by Yangtao Li <[email protected]>
Reviewed-by Chao Yu <[email protected]>
Thanks,