erofs: mark z_erofs_lzma_init/erofs_pcpubuf_init w/ __init

Message ID 20230303031418.64553-1-frank.li@vivo.com
State New
Headers
Series erofs: mark z_erofs_lzma_init/erofs_pcpubuf_init w/ __init |

Commit Message

李扬韬 March 3, 2023, 3:14 a.m. UTC
  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>
---
 fs/erofs/decompressor_lzma.c | 2 +-
 fs/erofs/pcpubuf.c           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Comments

Gao Xiang March 3, 2023, 4:10 a.m. UTC | #1
On 2023/3/3 11:14, 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

> ---
>   fs/erofs/decompressor_lzma.c | 2 +-
>   fs/erofs/pcpubuf.c           | 2 +-
>   2 files changed, 2 insertions(+), 2 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/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;
>
  
Yue Hu March 3, 2023, 6:04 a.m. UTC | #2
On Fri,  3 Mar 2023 11:14:18 +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>
> ---
>  fs/erofs/decompressor_lzma.c | 2 +-
>  fs/erofs/pcpubuf.c           | 2 +-
>  2 files changed, 2 insertions(+), 2 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/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;
>  

Update them in internal.h as well?
  
Gao Xiang March 3, 2023, 6:25 a.m. UTC | #3
On 2023/3/3 14:04, Yue Hu wrote:
> On Fri,  3 Mar 2023 11:14:18 +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>
>> ---
>>   fs/erofs/decompressor_lzma.c | 2 +-
>>   fs/erofs/pcpubuf.c           | 2 +-
>>   2 files changed, 2 insertions(+), 2 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/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;
>>   
> 
> Update them in internal.h as well?

Yeah, please help revise, thanks!

Thanks,
Gao Xiang
  

Patch

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/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;