lz4: Un-staticify some functions

- This fixes the below warnings:

In file included from ../fs/f2fs/super.c:28:
../include/linux/lz4.h:221:12: warning: 'LZ4_compress_fast' declared 'static' but never defined [-Wunused-function]
  221 | static int LZ4_compress_fast(const char *source, char *dest, int inputSize,
      |            ^~~~~~~~~~~~~~~~~
../include/linux/lz4.h:245:12: warning: 'LZ4_compress_destSize' declared 'static' but never defined [-Wunused-function]
  245 | static int LZ4_compress_destSize(const char *source, char *dest, int *sourceSizePtr,
      |            ^~~~~~~~~~~~~~~~~~~~~
../include/linux/lz4.h:361:13: warning: 'LZ4_resetStreamHC' declared 'static' but never defined [-Wunused-function]
  361 | static void LZ4_resetStreamHC(LZ4_streamHC_t *streamHCPtr, int compressionLevel);
      |             ^~~~~~~~~~~~~~~~~
../include/linux/lz4.h:376:17: warning: 'LZ4_loadDictHC' declared 'static' but never defined [-Wunused-function]
  376 | static int      LZ4_loadDictHC(LZ4_streamHC_t *streamHCPtr, const char *dictionary,
      |                 ^~~~~~~~~~~~~~
../include/linux/lz4.h:415:12: warning: 'LZ4_compress_HC_continue' declared 'static' but never defined [-Wunused-function]
  415 | static int LZ4_compress_HC_continue(LZ4_streamHC_t *streamHCPtr, const char *src,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/lz4.h:434:12: warning: 'LZ4_saveDictHC' declared 'static' but never defined [-Wunused-function]
  434 | static int LZ4_saveDictHC(LZ4_streamHC_t *streamHCPtr, char *safeBuffer,
      |            ^~~~~~~~~~~~~~
../include/linux/lz4.h:450:29: warning: 'LZ4_resetStream' declared 'static' but never defined [-Wunused-function]
  450 | static __always_inline void LZ4_resetStream(LZ4_stream_t *LZ4_stream);
      |                             ^~~~~~~~~~~~~~~
../include/linux/lz4.h:507:12: warning: 'LZ4_compress_fast_continue' declared 'static' but never defined [-Wunused-function]
  507 | static int LZ4_compress_fast_continue(LZ4_stream_t *streamPtr, const char *src,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/lz4.h:521:12: warning: 'LZ4_setStreamDecode' declared 'static' but never defined [-Wunused-function]
  521 | static int LZ4_setStreamDecode(LZ4_streamDecode_t *LZ4_streamDecode,
      |            ^~~~~~~~~~~~~~~~~~~
../include/linux/lz4.h:560:12: warning: 'LZ4_decompress_safe_continue' declared 'static' but never defined [-Wunused-function]
  560 | static int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/lz4.h:599:12: warning: 'LZ4_decompress_fast_continue' declared 'static' but never defined [-Wunused-function]
  599 | static int LZ4_decompress_fast_continue(LZ4_streamDecode_t *LZ4_streamDecode,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/lz4.h:622:12: warning: 'LZ4_decompress_safe_usingDict' declared 'static' but never defined [-Wunused-function]
  622 | static int LZ4_decompress_safe_usingDict(const char *source, char *dest,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/linux/lz4.h:645:12: warning: 'LZ4_decompress_fast_usingDict' declared 'static' but never defined [-Wunused-function]
  645 | static int LZ4_decompress_fast_usingDict(const char *source, char *dest,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
Signed-off-by: Ruchit <ruchitmarathe@gmail.com>
fourteen
Cyber Knight 3 years ago committed by Jenna
parent 768ae8e611
commit 8ca4419d7d
  1. 26
      include/linux/lz4.h
  2. 8
      lib/lz4/lz4_compress.c
  3. 10
      lib/lz4/lz4_decompress.c
  4. 8
      lib/lz4/lz4hc_compress.c

@ -218,7 +218,7 @@ int LZ4_compress_default(const char *source, char *dest, int inputSize,
* Return: Number of bytes written into buffer 'dest'
* (necessarily <= maxOutputSize) or 0 if compression fails
*/
static int LZ4_compress_fast(const char *source, char *dest, int inputSize,
int LZ4_compress_fast(const char *source, char *dest, int inputSize,
int maxOutputSize, int acceleration, void *wrkmem);
/**
@ -242,7 +242,7 @@ static int LZ4_compress_fast(const char *source, char *dest, int inputSize,
* Return: Number of bytes written into 'dest' (necessarily <= targetDestSize)
* or 0 if compression fails
*/
static int LZ4_compress_destSize(const char *source, char *dest, int *sourceSizePtr,
int LZ4_compress_destSize(const char *source, char *dest, int *sourceSizePtr,
int targetDestSize, void *wrkmem);
/*-************************************************************************
@ -358,7 +358,7 @@ int LZ4_compress_HC(const char *src, char *dst, int srcSize, int dstCapacity,
* Use this function to init an allocated `LZ4_streamHC_t` structure
* and start a new compression.
*/
static void LZ4_resetStreamHC(LZ4_streamHC_t *streamHCPtr, int compressionLevel);
void LZ4_resetStreamHC(LZ4_streamHC_t *streamHCPtr, int compressionLevel);
/**
* LZ4_loadDictHC() - Load a static dictionary into LZ4_streamHC
@ -373,7 +373,7 @@ static void LZ4_resetStreamHC(LZ4_streamHC_t *streamHCPtr, int compressionLevel)
*
* Return : dictionary size, in bytes (necessarily <= 64 KB)
*/
static int LZ4_loadDictHC(LZ4_streamHC_t *streamHCPtr, const char *dictionary,
int LZ4_loadDictHC(LZ4_streamHC_t *streamHCPtr, const char *dictionary,
int dictSize);
/**
@ -412,7 +412,7 @@ static int LZ4_loadDictHC(LZ4_streamHC_t *streamHCPtr, const char *dictionary,
*
* Return: Number of bytes written into buffer 'dst' or 0 if compression fails
*/
static int LZ4_compress_HC_continue(LZ4_streamHC_t *streamHCPtr, const char *src,
int LZ4_compress_HC_continue(LZ4_streamHC_t *streamHCPtr, const char *src,
char *dst, int srcSize, int maxDstSize);
/**
@ -431,7 +431,7 @@ static int LZ4_compress_HC_continue(LZ4_streamHC_t *streamHCPtr, const char *src
* Return : saved dictionary size in bytes (necessarily <= maxDictSize),
* or 0 if error.
*/
static int LZ4_saveDictHC(LZ4_streamHC_t *streamHCPtr, char *safeBuffer,
int LZ4_saveDictHC(LZ4_streamHC_t *streamHCPtr, char *safeBuffer,
int maxDictSize);
/*-*********************************************
@ -447,7 +447,7 @@ static int LZ4_saveDictHC(LZ4_streamHC_t *streamHCPtr, char *safeBuffer,
* Use this function to init an allocated `LZ4_stream_t` structure
* and start a new compression.
*/
static __always_inline void LZ4_resetStream(LZ4_stream_t *LZ4_stream);
__always_inline void LZ4_resetStream(LZ4_stream_t *LZ4_stream);
/**
* LZ4_loadDict() - Load a static dictionary into LZ4_stream
@ -504,7 +504,7 @@ int LZ4_saveDict(LZ4_stream_t *streamPtr, char *safeBuffer, int dictSize);
*
* Return: Number of bytes written into buffer 'dst' or 0 if compression fails
*/
static int LZ4_compress_fast_continue(LZ4_stream_t *streamPtr, const char *src,
int LZ4_compress_fast_continue(LZ4_stream_t *streamPtr, const char *src,
char *dst, int srcSize, int maxDstSize, int acceleration);
/**
@ -518,7 +518,7 @@ static int LZ4_compress_fast_continue(LZ4_stream_t *streamPtr, const char *src,
*
* Return: 1 if OK, 0 if error
*/
static int LZ4_setStreamDecode(LZ4_streamDecode_t *LZ4_streamDecode,
int LZ4_setStreamDecode(LZ4_streamDecode_t *LZ4_streamDecode,
const char *dictionary, int dictSize);
/**
@ -557,7 +557,7 @@ static int LZ4_setStreamDecode(LZ4_streamDecode_t *LZ4_streamDecode,
* (necessarily <= maxDecompressedSize)
* or a negative result in case of error
*/
static int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode,
int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode,
const char *source, char *dest, int compressedSize,
int maxDecompressedSize);
@ -596,7 +596,7 @@ static int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode,
* (necessarily <= maxDecompressedSize)
* or a negative result in case of error
*/
static int LZ4_decompress_fast_continue(LZ4_streamDecode_t *LZ4_streamDecode,
int LZ4_decompress_fast_continue(LZ4_streamDecode_t *LZ4_streamDecode,
const char *source, char *dest, int originalSize);
/**
@ -619,7 +619,7 @@ static int LZ4_decompress_fast_continue(LZ4_streamDecode_t *LZ4_streamDecode,
* (necessarily <= maxDecompressedSize)
* or a negative result in case of error
*/
static int LZ4_decompress_safe_usingDict(const char *source, char *dest,
int LZ4_decompress_safe_usingDict(const char *source, char *dest,
int compressedSize, int maxDecompressedSize, const char *dictStart,
int dictSize);
@ -642,7 +642,7 @@ static int LZ4_decompress_safe_usingDict(const char *source, char *dest,
* (necessarily <= maxDecompressedSize)
* or a negative result in case of error
*/
static int LZ4_decompress_fast_usingDict(const char *source, char *dest,
int LZ4_decompress_fast_usingDict(const char *source, char *dest,
int originalSize, const char *dictStart, int dictSize);
#endif

@ -500,7 +500,7 @@ static int LZ4_compress_fast_extState(
}
}
static int LZ4_compress_fast(const char *source, char *dest, int inputSize,
int LZ4_compress_fast(const char *source, char *dest, int inputSize,
int maxOutputSize, int acceleration, void *wrkmem)
{
return LZ4_compress_fast_extState(wrkmem, source, dest, inputSize,
@ -751,7 +751,7 @@ static int LZ4_compress_destSize_extState(
}
static int LZ4_compress_destSize(
int LZ4_compress_destSize(
const char *src,
char *dst,
int *srcSizePtr,
@ -765,7 +765,7 @@ static int LZ4_compress_destSize(
/*-******************************
* Streaming functions
********************************/
static FORCE_INLINE void LZ4_resetStream(LZ4_stream_t *LZ4_stream)
FORCE_INLINE void LZ4_resetStream(LZ4_stream_t *LZ4_stream)
{
memset(LZ4_stream, 0, sizeof(LZ4_stream_t));
}
@ -852,7 +852,7 @@ int LZ4_saveDict(LZ4_stream_t *LZ4_dict, char *safeBuffer, int dictSize)
}
EXPORT_SYMBOL(LZ4_saveDict);
static int LZ4_compress_fast_continue(LZ4_stream_t *LZ4_stream, const char *source,
int LZ4_compress_fast_continue(LZ4_stream_t *LZ4_stream, const char *source,
char *dest, int inputSize, int maxOutputSize, int acceleration)
{
LZ4_stream_t_internal *streamPtr = &LZ4_stream->internal_donotuse;

@ -557,7 +557,7 @@ int LZ4_decompress_fast_doubleDict(const char *source, char *dest,
/* ===== streaming decompression functions ===== */
static int LZ4_setStreamDecode(LZ4_streamDecode_t *LZ4_streamDecode,
int LZ4_setStreamDecode(LZ4_streamDecode_t *LZ4_streamDecode,
const char *dictionary, int dictSize)
{
LZ4_streamDecode_t_internal *lz4sd =
@ -580,7 +580,7 @@ static int LZ4_setStreamDecode(LZ4_streamDecode_t *LZ4_streamDecode,
* decoded data into a safe buffer,
* and indicate where it stands using LZ4_setStreamDecode()
*/
static int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode,
int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode,
const char *source, char *dest, int compressedSize, int maxOutputSize)
{
LZ4_streamDecode_t_internal *lz4sd =
@ -633,7 +633,7 @@ static int LZ4_decompress_safe_continue(LZ4_streamDecode_t *LZ4_streamDecode,
return result;
}
static int LZ4_decompress_fast_continue(LZ4_streamDecode_t *LZ4_streamDecode,
int LZ4_decompress_fast_continue(LZ4_streamDecode_t *LZ4_streamDecode,
const char *source, char *dest, int originalSize)
{
LZ4_streamDecode_t_internal *lz4sd = &LZ4_streamDecode->internal_donotuse;
@ -672,7 +672,7 @@ static int LZ4_decompress_fast_continue(LZ4_streamDecode_t *LZ4_streamDecode,
return result;
}
static int LZ4_decompress_safe_usingDict(const char *source, char *dest,
int LZ4_decompress_safe_usingDict(const char *source, char *dest,
int compressedSize, int maxOutputSize,
const char *dictStart, int dictSize)
{
@ -690,7 +690,7 @@ static int LZ4_decompress_safe_usingDict(const char *source, char *dest,
compressedSize, maxOutputSize, dictStart, dictSize);
}
static int LZ4_decompress_fast_usingDict(const char *source, char *dest,
int LZ4_decompress_fast_usingDict(const char *source, char *dest,
int originalSize,
const char *dictStart, int dictSize)
{

@ -616,13 +616,13 @@ EXPORT_SYMBOL(LZ4_compress_HC);
/**************************************
* Streaming Functions
**************************************/
static void LZ4_resetStreamHC(LZ4_streamHC_t *LZ4_streamHCPtr, int compressionLevel)
void LZ4_resetStreamHC(LZ4_streamHC_t *LZ4_streamHCPtr, int compressionLevel)
{
LZ4_streamHCPtr->internal_donotuse.base = NULL;
LZ4_streamHCPtr->internal_donotuse.compressionLevel = (unsigned int)compressionLevel;
}
static int LZ4_loadDictHC(LZ4_streamHC_t *LZ4_streamHCPtr,
int LZ4_loadDictHC(LZ4_streamHC_t *LZ4_streamHCPtr,
const char *dictionary,
int dictSize)
{
@ -713,7 +713,7 @@ static int LZ4_compressHC_continue_generic(
inputSize, maxOutputSize, ctxPtr->compressionLevel, limit);
}
static int LZ4_compress_HC_continue(
int LZ4_compress_HC_continue(
LZ4_streamHC_t *LZ4_streamHCPtr,
const char *source,
char *dest,
@ -730,7 +730,7 @@ static int LZ4_compress_HC_continue(
/* dictionary saving */
static int LZ4_saveDictHC(
int LZ4_saveDictHC(
LZ4_streamHC_t *LZ4_streamHCPtr,
char *safeBuffer,
int dictSize)

Loading…
Cancel
Save