linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lz4_decompress: declare LZ4_decompress_safe_withPrefix64k static
@ 2021-05-11 15:43 Rajat Asthana
  2021-05-11 19:33 ` Nick Terrell
  0 siblings, 1 reply; 2+ messages in thread
From: Rajat Asthana @ 2021-05-11 15:43 UTC (permalink / raw)
  To: akpm, terrelln, hsiangkao, joe; +Cc: linux-kernel, Rajat Asthana

Declare LZ4_decompress_safe_withPrefix64k as static to fix sparse
warning:

> warning: symbol 'LZ4_decompress_safe_withPrefix64k' was not declared.
> Should it be static?

Signed-off-by: Rajat Asthana <thisisrast7@gmail.com>
---
 lib/lz4/lz4_decompress.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/lz4/lz4_decompress.c b/lib/lz4/lz4_decompress.c
index 8a7724a6ce2f..926f4823d5ea 100644
--- a/lib/lz4/lz4_decompress.c
+++ b/lib/lz4/lz4_decompress.c
@@ -481,7 +481,7 @@ int LZ4_decompress_fast(const char *source, char *dest, int originalSize)
 
 /* ===== Instantiate a few more decoding cases, used more than once. ===== */
 
-int LZ4_decompress_safe_withPrefix64k(const char *source, char *dest,
+static int LZ4_decompress_safe_withPrefix64k(const char *source, char *dest,
 				      int compressedSize, int maxOutputSize)
 {
 	return LZ4_decompress_generic(source, dest,
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] lz4_decompress: declare LZ4_decompress_safe_withPrefix64k static
  2021-05-11 15:43 [PATCH] lz4_decompress: declare LZ4_decompress_safe_withPrefix64k static Rajat Asthana
@ 2021-05-11 19:33 ` Nick Terrell
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Terrell @ 2021-05-11 19:33 UTC (permalink / raw)
  To: Rajat Asthana; +Cc: Andrew Morton, Gao Xiang, joe, linux-kernel



> On May 11, 2021, at 8:43 AM, Rajat Asthana <thisisrast7@gmail.com> wrote:
> 
> Declare LZ4_decompress_safe_withPrefix64k as static to fix sparse
> warning:
> 
>> warning: symbol 'LZ4_decompress_safe_withPrefix64k' was not declared.
>> Should it be static?
> 
> Signed-off-by: Rajat Asthana <thisisrast7@gmail.com>
> ---
> lib/lz4/lz4_decompress.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/lz4/lz4_decompress.c b/lib/lz4/lz4_decompress.c
> index 8a7724a6ce2f..926f4823d5ea 100644
> --- a/lib/lz4/lz4_decompress.c
> +++ b/lib/lz4/lz4_decompress.c
> @@ -481,7 +481,7 @@ int LZ4_decompress_fast(const char *source, char *dest, int originalSize)
> 
> /* ===== Instantiate a few more decoding cases, used more than once. ===== */
> 
> -int LZ4_decompress_safe_withPrefix64k(const char *source, char *dest,
> +static int LZ4_decompress_safe_withPrefix64k(const char *source, char *dest,
> 				      int compressedSize, int maxOutputSize)
> {
> 	return LZ4_decompress_generic(source, dest,
> -- 
> 2.31.1
> 

Reviewed-by: Nick Terrell <terrelln@fb.com>

This looks good to me! LZ4_decompress_safe_withPrefix64k() is a deprecated
function in the upstream LZ4 API, which isn’t exposed in the kernel API, so can
definitely be marked static.

Thanks,
Nick

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-11 19:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11 15:43 [PATCH] lz4_decompress: declare LZ4_decompress_safe_withPrefix64k static Rajat Asthana
2021-05-11 19:33 ` Nick Terrell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).