[PATCH] erofs: make z_erofs_crypto[] static

Ferry Meng posted 1 patch 1 month, 3 weeks ago
fs/erofs/decompressor_crypto.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] erofs: make z_erofs_crypto[] static
Posted by Ferry Meng 1 month, 3 weeks ago
Reduce the scope of 'z_erofs_crypto[]' that is not used outside of
'decompressor_crypto.c'.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202512102025.4mWeBSsf-lkp@intel.com/
Signed-off-by: Ferry Meng <mengferry@linux.alibaba.com>
---
 fs/erofs/decompressor_crypto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/erofs/decompressor_crypto.c b/fs/erofs/decompressor_crypto.c
index 97b77ab64432..ab0c0032d199 100644
--- a/fs/erofs/decompressor_crypto.c
+++ b/fs/erofs/decompressor_crypto.c
@@ -61,7 +61,7 @@ struct z_erofs_crypto_engine {
 	struct crypto_acomp *tfm;
 };
 
-struct z_erofs_crypto_engine *z_erofs_crypto[Z_EROFS_COMPRESSION_MAX] = {
+static struct z_erofs_crypto_engine *z_erofs_crypto[Z_EROFS_COMPRESSION_MAX] = {
 	[Z_EROFS_COMPRESSION_LZ4] = (struct z_erofs_crypto_engine[]) {
 		{},
 	},
-- 
2.19.1.6.gb485710b
Re: [PATCH] erofs: make z_erofs_crypto[] static
Posted by Chao Yu 2 weeks, 3 days ago
On 2025/12/16 16:21, Ferry Meng wrote:
> Reduce the scope of 'z_erofs_crypto[]' that is not used outside of
> 'decompressor_crypto.c'.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202512102025.4mWeBSsf-lkp@intel.com/
> Signed-off-by: Ferry Meng <mengferry@linux.alibaba.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,
Re: [PATCH] erofs: make z_erofs_crypto[] static
Posted by Gao Xiang 1 month, 3 weeks ago

On 2025/12/16 17:21, Ferry Meng wrote:
> Reduce the scope of 'z_erofs_crypto[]' that is not used outside of
> 'decompressor_crypto.c'.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202512102025.4mWeBSsf-lkp@intel.com/
> Signed-off-by: Ferry Meng <mengferry@linux.alibaba.com>

Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>

Thanks,
Gao Xiang