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.
Signed-off-by: Denis Efremov <[email protected]>
---
lib/lz4/lz4hc_compress.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/lz4/lz4hc_compress.c b/lib/lz4/lz4hc_compress.c
index 176f03b83e56..1b61d874e337 100644
--- a/lib/lz4/lz4hc_compress.c
+++ b/lib/lz4/lz4hc_compress.c
@@ -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,
--
2.21.0
+Cc: Andrew Morton <[email protected]>,
Masahiro Yamada <[email protected]>
Hi,
On 7/8/19 6:15 PM, Denis Efremov wrote:
> 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.
>
> Signed-off-by: Denis Efremov <[email protected]>
> ---
> lib/lz4/lz4hc_compress.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/lib/lz4/lz4hc_compress.c b/lib/lz4/lz4hc_compress.c
> index 176f03b83e56..1b61d874e337 100644
> --- a/lib/lz4/lz4hc_compress.c
> +++ b/lib/lz4/lz4hc_compress.c
> @@ -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
On Tue, Sep 10, 2019 at 9:13 PM Denis Efremov <[email protected]> wrote:
>
> +Cc: Andrew Morton <[email protected]>,
> Masahiro Yamada <[email protected]>
>
> Hi,
>
> On 7/8/19 6:15 PM, Denis Efremov wrote:
> > 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.
> >
> > Signed-off-by: Denis Efremov <[email protected]>
Reviewed-by: Masahiro Yamada <[email protected]>
> > ---
> > lib/lz4/lz4hc_compress.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/lib/lz4/lz4hc_compress.c b/lib/lz4/lz4hc_compress.c
> > index 176f03b83e56..1b61d874e337 100644
> > --- a/lib/lz4/lz4hc_compress.c
> > +++ b/lib/lz4/lz4hc_compress.c
> > @@ -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
--
Best Regards
Masahiro Yamada
On Tue, Sep 10, 2019 at 2:13 PM Denis Efremov <[email protected]> wrote:
>
> +Cc: Andrew Morton <[email protected]>,
> Masahiro Yamada <[email protected]>
>
> Hi,
>
> On 7/8/19 6:15 PM, Denis Efremov wrote:
> > 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.
> >
> > Signed-off-by: Denis Efremov <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
> 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.
Right, this version is better than mine.
Arnd