linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Efremov <efremov@linux.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Sven Schmidt <4sschmid@informatik.uni-hamburg.de>,
	Arnd Bergmann <arnd@arndb.de>, Bongkyu Kim <bongkyu.kim@lge.com>,
	Rui Salvaterra <rsalvaterra@gmail.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S . Miller" <davem@davemloft.net>,
	Anton Vorontsov <anton@enomsg.org>,
	Colin Cross <ccross@android.com>,
	Kees Cook <keescook@chromium.org>,
	Tony Luck <tony.luck@intel.com>,
	linux-kernel@vger.kernel.org,
	Masahiro Yamada <yamada.masahiro@socionext.com>
Subject: Re: [PATCH] lib/lz4: remove the exporting of LZ4HC_setExternalDict
Date: Tue, 10 Sep 2019 15:13:16 +0300	[thread overview]
Message-ID: <10d12447-7b67-466e-5ab3-3d28256f0621@linux.com> (raw)
In-Reply-To: <20190708151555.8070-1-efremov@linux.com>

+Cc: Andrew Morton <akpm@linux-foundation.org>,
     Masahiro Yamada <yamada.masahiro@socionext.com>

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 <efremov@linux.com>
> ---
>  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

  reply	other threads:[~2019-09-10 12:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08 15:15 [PATCH] lib/lz4: remove the exporting of LZ4HC_setExternalDict Denis Efremov
2019-09-10 12:13 ` Denis Efremov [this message]
2019-09-10 12:16   ` Masahiro Yamada
2019-09-10 12:47   ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10d12447-7b67-466e-5ab3-3d28256f0621@linux.com \
    --to=efremov@linux.com \
    --cc=4sschmid@informatik.uni-hamburg.de \
    --cc=akpm@linux-foundation.org \
    --cc=anton@enomsg.org \
    --cc=arnd@arndb.de \
    --cc=bongkyu.kim@lge.com \
    --cc=ccross@android.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rsalvaterra@gmail.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=tony.luck@intel.com \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).