lib/lz4: remove the exporting of LZ4HC_setExternalDict
PATCH 1/1 lib/lz4: remove the exporting of LZ4HC_setExternalDict
The function LZ4HC_setExternalDict is declared static and marked EXPORT_SYMBOL, which is at best an odd combination. Because the function is not used outside of the lib/lz4/lz4hc_compress.c file it is defined in, this commit removes the EXPORT_SYMBOL() marking.
--- lib/lz4/lz4hc_compress.c | 1 - 1 file changed, 1 deletion(-)
lib/lz4/lz4hc_compress.c +0 -1
@@ -663,7 +663,6 @@ static void LZ4HC_setExternalDict(/* match referencing will resume from there */ ctxPtr->nextToUpdate = ctxPtr->dictLimit; } -EXPORT_SYMBOL (LZ4HC_setExternalDict); static int LZ4_compressHC_continue_generic( LZ4_streamHC_t *LZ4_streamHCPtr,
Signature · 1 line
2.21.0
+Cc: Andrew Morton <[email protected]>,
Masahiro Yamada <[email protected]>
Hi,
Quoted 16 lines · Denis Efremov
The function
LZ4HC_setExternalDictis declared static and markedEXPORT_SYMBOL, which is at best an odd combination. Because the function is not used outside of thelib/lz4/lz4hc_compress.cfile it is defined in, this commit removes theEXPORT_SYMBOL()marking.Signed-off-by Denis Efremov <[email protected]>--- lib/lz4/lz4hc_compress.c | 1 - 1 file changed, 1 deletion(-)lib/lz4/lz4hc_compress.c +0
-0
lib/lz4/lz4hc_compress.c static void LZ4HC_setExternalDict( · line 668
Quoted 7 lines
lib/lz4/lz4hc_compress.c +0
-1@@ -663,7 +663,6 @@ static void LZ4HC_setExternalDict(/* match referencing will resume from there */ ctxPtr->nextToUpdate = ctxPtr->dictLimit; } -EXPORT_SYMBOL (LZ4HC_setExternalDict); static int LZ4_compressHC_continue_generic( LZ4_streamHC_t *LZ4_streamHCPtr,
Andrew, could you please look at this patch and accept it if everybody agrees? static LZ4HC_setExternalDict will trigger a warning after this check will be in tree https://lkml.org/lkml/2019/7/14/118
There is also a different fix by Arnd Bergmann with making this function non-static:
https://lkml.org/lkml/2019/9/6/669
But since there is no uses of this EXPORT_SYMBOL in kernel and LZ4HC_setExternalDict is indeed static in the original library https://github.com/lz4/lz4/blob/dev/lib/lz4hc.c#L1054
we came to the conclusion that it will be better to simply unexport the symbol.
Thanks,
Denis
Masahiro Yamada
Reviewed-byQuoted 13 lines · Denis Efremov
+Cc: Andrew Morton <[email protected]>,
Masahiro Yamada <[email protected]>Hi,
Quoted 6 lines · Denis Efremov
The function
LZ4HC_setExternalDictis declared static and markedEXPORT_SYMBOL, which is at best an odd combination. Because the function is not used outside of thelib/lz4/lz4hc_compress.cfile it is defined in, this commit removes theEXPORT_SYMBOL()marking.Signed-off-by Denis Efremov <[email protected]>
Quoted 31 lines
Quoted 10 lines
--- lib/lz4/lz4hc_compress.c | 1 - 1 file changed, 1 deletion(-)lib/lz4/lz4hc_compress.c +0
-0lib/lz4/lz4hc_compress.c static void LZ4HC_setExternalDict( · line 668
Quoted 7 lines
lib/lz4/lz4hc_compress.c +0
-1@@ -663,7 +663,6 @@ static void LZ4HC_setExternalDict(/* match referencing will resume from there */ ctxPtr->nextToUpdate = ctxPtr->dictLimit; } -EXPORT_SYMBOL (LZ4HC_setExternalDict); static int LZ4_compressHC_continue_generic( LZ4_streamHC_t *LZ4_streamHCPtr,Andrew, could you please look at this patch and accept it if everybody agrees? static
LZ4HC_setExternalDictwill trigger a warning after this check will be in tree https://lkml.org/lkml/2019/7/14/118There is also a different fix by Arnd Bergmann with making this function non-static:
https://lkml.org/lkml/2019/9/6/669But since there is no uses of this
EXPORT_SYMBOLin kernel andLZ4HC_setExternalDictis indeed static in the original library https://github.com/lz4/lz4/blob/dev/lib/lz4hc.c#L1054
we came to the conclusion that it will be better to simply unexport the symbol.Thanks,
Denis
Signature · 2 lines
Best Regards Masahiro Yamada
Arnd Bergmann
Reviewed-byQuoted 13 lines · Denis Efremov
+Cc: Andrew Morton <[email protected]>,
Masahiro Yamada <[email protected]>Hi,
Quoted 6 lines · Denis Efremov
The function
LZ4HC_setExternalDictis declared static and markedEXPORT_SYMBOL, which is at best an odd combination. Because the function is not used outside of thelib/lz4/lz4hc_compress.cfile it is defined in, this commit removes theEXPORT_SYMBOL()marking.Signed-off-by Denis Efremov <[email protected]>
Quoted 10 lines
Andrew, could you please look at this patch and accept it if everybody agrees? static
LZ4HC_setExternalDictwill trigger a warning after this check will be in tree https://lkml.org/lkml/2019/7/14/118There is also a different fix by Arnd Bergmann with making this function non-static:
https://lkml.org/lkml/2019/9/6/669But since there is no uses of this
EXPORT_SYMBOLin kernel andLZ4HC_setExternalDictis indeed static in the original library https://github.com/lz4/lz4/blob/dev/lib/lz4hc.c#L1054
we came to the conclusion that it will be better to simply unexport the symbol.
Right, this version is better than mine.
Arnd