Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp631977ybz; Wed, 15 Apr 2020 15:32:38 -0700 (PDT) X-Google-Smtp-Source: APiQypLtrImn2nXzGJ+R9Zy15h/NhWDml3X5TBxnhuFxiLTfFjTMKnMGHMIbdLuGx/LoPoYHaLG6 X-Received: by 2002:a17:906:548:: with SMTP id k8mr6906875eja.259.1586989957942; Wed, 15 Apr 2020 15:32:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586989957; cv=none; d=google.com; s=arc-20160816; b=JBGUx7FEKGY6lLermtkGHDY00T5W6Gohn/YmSQznx60WvhS/EvQrRHioGHUbVv+cnm szEQ8uT0dUSt0j1jWBvTdomJ/91x/Nz6pk+gDv9NTPLLXZGT+LTcg52i4pe1bfkFKkAH e6PYIxEwZCrP5VRzD6CoUrlUXqgC8BYjoeZTcnXNhD+BQkuIBFvKvQWYWKrlXWzVan9D JmUqceS5MPp75/ARx7GwZACRagkKwX3SExIsvp5K+bBVlKNytx6tD5wI5TtFr+5zV1On CaZ6T842PF6o90mVylbdsg/7Y/gxjbjyG3mop/2h9Msong4m59KKZ946NH7LToYYwcfZ KSig== 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:mime-version :message-id:date:subject:cc:to:from; bh=Po2ONw6A4J1BfIn8iUsHbqiMnT3z1RDdJdj7agpzvOA=; b=BbFCQCWfsV/A394xjL3EsFa+3S4rggqdtpHlWa4U4b1SHFQChknR7HReZVJV6M4xsc hgM3Lh41hE3QmuGmIYcEhzJEWrV7s41VUdNxWR8eUqTadbeAt/w99mdxz682sLCMI/tR BKgs1YFGWzyESsmkRkh7rY3VHZ9LzbIDesdkiyMS/TFm38OI9kDXu/2VDPQIykdjMVWu npNhxBsl6PDluLyl1qI6gNQ/fPNaZxLZaBGnADPJ8OG5u1IQSYXD7ZWlq8FoOmD0VLar 07CgmxdFOHrCNf/iWNQoPJEpefehJzm4sW2rDzHD+7qJYLm89dXOXTOY7ySOIX/pyH6I fARw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c23si7497070edy.407.2020.04.15.15.32.12; Wed, 15 Apr 2020 15:32:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2635851AbgDOIWW (ORCPT + 99 others); Wed, 15 Apr 2020 04:22:22 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:40588 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2635838AbgDOIWU (ORCPT ); Wed, 15 Apr 2020 04:22:20 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 4E800ADEF80EC8DF914A; Wed, 15 Apr 2020 16:22:18 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Wed, 15 Apr 2020 16:22:07 +0800 From: Jason Yan To: , , , , CC: Hulk Robot Subject: [PATCH] lib: zstd: remove FSE_sizeof_CTable() Date: Wed, 15 Apr 2020 16:48:34 +0800 Message-ID: <20200415084834.5573-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No users of FSE_sizeof_CTable() now, so remove it. This fixes a sparse warning: lib/zstd/fse_compress.c:477:8: warning: symbol 'FSE_sizeof_CTable' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jason Yan --- lib/zstd/fse_compress.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lib/zstd/fse_compress.c b/lib/zstd/fse_compress.c index ef3d1741d532..0c059bef379c 100644 --- a/lib/zstd/fse_compress.c +++ b/lib/zstd/fse_compress.c @@ -466,20 +466,6 @@ size_t FSE_count_wksp(unsigned *count, unsigned *maxSymbolValuePtr, const void * /*-************************************************************** * FSE Compression Code ****************************************************************/ -/*! FSE_sizeof_CTable() : - FSE_CTable is a variable size structure which contains : - `U16 tableLog;` - `U16 maxSymbolValue;` - `U16 nextStateNumber[1 << tableLog];` // This size is variable - `FSE_symbolCompressionTransform symbolTT[maxSymbolValue+1];` // This size is variable -Allocation is manual (C standard does not support variable-size structures). -*/ -size_t FSE_sizeof_CTable(unsigned maxSymbolValue, unsigned tableLog) -{ - if (tableLog > FSE_MAX_TABLELOG) - return ERROR(tableLog_tooLarge); - return FSE_CTABLE_SIZE_U32(tableLog, maxSymbolValue) * sizeof(U32); -} /* provides the minimum logSize to safely represent a distribution */ static unsigned FSE_minTableLog(size_t srcSize, unsigned maxSymbolValue) -- 2.21.1