Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5999719ybe; Tue, 10 Sep 2019 11:58:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqyjD88Ym+arxHETAqjWV2QfFpJ2Mrqs7UF00Y0FKtkSDpdAhv1JP29koJ4ImujbDVFCeuih X-Received: by 2002:a50:ed89:: with SMTP id h9mr32288604edr.217.1568141918958; Tue, 10 Sep 2019 11:58:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568141918; cv=none; d=google.com; s=arc-20160816; b=HrvyRhrZ4T61RZe7+ArmACkuAhQ2lOwbCXPKtjqSOpyIstnkijDMYdVkiz/6Cep6aL stG71gh3tnBXmNSamcLb/U0k8z3nsjGTDAPgHfIY/DLPIEPVPZLpmqnVUkK+9vkEhg1G Z/GpRg2Uv99Bm4jrc9zp91muObqqDLyvdXoPWBn2Wvb5/973ZRbFKG7/nvnYPU5OQXSN zzqSM0T4FFPNG2eiYkWSn0Q1H2nDFupmsyGDKlQde/ns5jJxXXzdejr6MhSURZmi9y3V EnpGRw8Mp+XEoWk7kb0D17zmAWit8mMq0BIX4H43J3fbtf/SK+EG5qGQh2qk09yAkBkQ kjMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:to:references:cc:subject:reply-to; bh=uFMOe1LnEqUawwztyUU1ZpfJ1IRlSRADXkmJLyXBo2s=; b=JT8W6pXlz9SpLj51cdP3Kv3SLiS1Bd9q/t7EAWEoZAKRv39N6PvlVN85YYGDNgjbFi XQAN9n5mtYNidkFGM/ehAIf3UrLCotyN/PHTsc9vduhr3yWsN2m47GH57WNa19Xgw2LJ oEockRy2YZLdUY38yxs8nOfVKaxKntE9pnqcrZmWSA6+OwGMIBcUmr1yW980/81+pJnv zXjxpPZqkZdouyt8GgzCOqXEE6fLbPUAM0XTDJdYIiyuMfrew9Mn1S4LJv4OmeFYIPNV 1Mde1KlixfwzgIasYUJsHO2xmJqL9PmeYh7yr1/aPExxsTBF/sPfLBqKKTybfmWufSDy NYRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i55si12942526eda.88.2019.09.10.11.58.15; Tue, 10 Sep 2019 11:58:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387660AbfIJMNU (ORCPT + 99 others); Tue, 10 Sep 2019 08:13:20 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:38192 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731434AbfIJMNU (ORCPT ); Tue, 10 Sep 2019 08:13:20 -0400 Received: by mail-ed1-f66.google.com with SMTP id a23so14620462edv.5 for ; Tue, 10 Sep 2019 05:13:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:cc:references:to:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=uFMOe1LnEqUawwztyUU1ZpfJ1IRlSRADXkmJLyXBo2s=; b=Zve/sYNxUR77R2SyNVW20IInapV6yRh41pQdn3PgjmEjq113nF6MfXzhzwZmsBH9os VHuSx92QtICsKsIviGtaLbEiM1KM2eo06rGAtEjEPDpUGBjmHY5hNS1qQxpjfhQLiafn l48XQhAvJ3t9QF5VX97TblALKpzPZVeabLJy2wmuvn6cXeYZXXmUehp0T0iV1ZI9meS/ tdLdQZfJqZtI4pixCCXNrw2ecOf7BtbKQzMLVr9mQlezNdUFfM+2xf4t63ZaGw7qqPzy ykDHSUIb+7gohk9ufs3+dsFyO1QL8RknjVgu4tmsVSjDvsKchrvFF5OtqaoneenRBXlH /OgQ== X-Gm-Message-State: APjAAAWU9joDtujRGzwaoE4xTIbKw1hAqBLD/eqrxg01Uv52iZtOks7Y jThANlThsVEnd2wUSlfVKgc= X-Received: by 2002:a17:906:cf8a:: with SMTP id um10mr23698832ejb.310.1568117598796; Tue, 10 Sep 2019 05:13:18 -0700 (PDT) Received: from [10.10.2.174] (bran.ispras.ru. [83.149.199.196]) by smtp.gmail.com with ESMTPSA id bt11sm3479664edb.65.2019.09.10.05.13.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Sep 2019 05:13:18 -0700 (PDT) Reply-To: efremov@linux.com Subject: Re: [PATCH] lib/lz4: remove the exporting of LZ4HC_setExternalDict Cc: Sven Schmidt <4sschmid@informatik.uni-hamburg.de>, Arnd Bergmann , Bongkyu Kim , Rui Salvaterra , Sergey Senozhatsky , Herbert Xu , "David S . Miller" , Anton Vorontsov , Colin Cross , Kees Cook , Tony Luck , linux-kernel@vger.kernel.org, Masahiro Yamada References: <20190708151555.8070-1-efremov@linux.com> To: Andrew Morton From: Denis Efremov Message-ID: <10d12447-7b67-466e-5ab3-3d28256f0621@linux.com> Date: Tue, 10 Sep 2019 15:13:16 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190708151555.8070-1-efremov@linux.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +Cc: Andrew Morton , Masahiro Yamada 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 > --- > 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