Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1156025pxu; Wed, 2 Dec 2020 12:30:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJw0hwp8mksGdtZFM4e6SCnwDPfzEW4q3EnosoiFvc4dp9vV/U7X4NU1OPWMC78FG++vWOLW X-Received: by 2002:a17:907:9619:: with SMTP id gb25mr1470390ejc.444.1606941007251; Wed, 02 Dec 2020 12:30:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606941007; cv=none; d=google.com; s=arc-20160816; b=J3Y8torKZAvOf7R5+E83OjajZf7FX192UHsio/ATyTTqjqSkKMmqeMy0mVpTHlghYe lmY/AHoSSzYJI3F6l5PIjrQCjWjikF9KMr7dYM0tmDQlBhjOS4UYPcktizH3nHLxvpqa 5vPR/ySd/b33TKZVp0JRnY1q7kVR2ifBd+tUsPYVuybnV16ttvSWVS4KG9XyRMK4Ofp8 tV22ZgUlNcybP3FJoKhWug2U8/V9CY9Z8ifdTETr7lGKqwqU/Hh2Vyx8cKfnzDaSJIso DXNC43n2tYfNmLTMcagyi7eVQMVq42aOOLllAfErtHF0zZKGWSDGwtGLGTpRNV4Jo0O4 B/Tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WENPVElJQF3n0FCtwr/Deyj/08dbHxSq1tQKlooFAvw=; b=B/R9wl4BKJFB177GtfeDLF/DDI6IzptggRhmSviOe6uxHupHsepjcM268hcDsv5rEC H8BNdT5VqvlvMyy9cj5egUzCmq9mYspyULp2IMZzzl+gubdju5rDYTmN2wM4GugyJZCt qdnE7kqRVZQUr+TAjjv3PrKMgCDPNErJgKvCZ0N5j7Yf+ApGXscLB+pkMLprRJO7EqMZ +zzGZY5FPSxfPxcZuIkD272BSpgqee9Is+XDtDngjuCVRG2pblzh//wsRcyghtck8luo eFNVOjF1uPSn+xy3CHymP6yfs79xMp1XCavfsIByt2qK1N7CWXcpoqAuCHCWruDb5O1N zXCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ezehFisb; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id op24si641164ejb.355.2020.12.02.12.29.40; Wed, 02 Dec 2020 12:30:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ezehFisb; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726151AbgLBU3O (ORCPT + 99 others); Wed, 2 Dec 2020 15:29:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725903AbgLBU3N (ORCPT ); Wed, 2 Dec 2020 15:29:13 -0500 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5514C0617A7; Wed, 2 Dec 2020 12:28:33 -0800 (PST) Received: by mail-pf1-x443.google.com with SMTP id w187so1979241pfd.5; Wed, 02 Dec 2020 12:28:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WENPVElJQF3n0FCtwr/Deyj/08dbHxSq1tQKlooFAvw=; b=ezehFisbVfB+MB8e754s3Ekkx0EUMSCv2vXtrYfxfh+ntN+w8g96YN7QKALLza/OYJ mpanSL+Ly9/PnLfUOOGTw0C/6bozOQ6lX0LrzyEqYN/0cyNh2GcvHPS/aG71VQ/sMKWO AND6z5oZxtEjUeNwq0aObCu0zdewzC4QNtTYzymORIggWs2ZQx2wjUuZxsFolCEDf+7v bHR6L1FO1cIObDSoDksj/MxYT82noLVvkLCoQrFlt3clf/RlQEx6mzxQt3NFPrs6e/I7 mQ1Vi7USiZD/8CXlOS3rH83MsN0aVWU57mALEm6mC+3VCBSaWJiWQNorfZq1QqOEDAiz 9MZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WENPVElJQF3n0FCtwr/Deyj/08dbHxSq1tQKlooFAvw=; b=T4ZDoQyV91C+YpZFT6bTrxU6qJHCWSfTqs6Dn/J3nMudu34uPhk7JOH6Potbh09Rcn TYC20jQyoIs/hqDbUG6070mbHSaNsfNWSeYhjMfuioZ3FzJOB5jYUmg2/AeHdlWV4Cxg PuK/ZdCsf6LG3vEaxKVdoMtSsSzB61CoPlrsEufIGcpbWmNnF6ugeSRnZBHLx/MyHv+b ZWWQC93r8YZVL8UFRZURjAgJoOUtAHbHQSxwn+kl4S072luRzUMD7L8UoJAFILpQ9bk8 DFKDk45YWvSYQiFdGP+J4ZW9vIx1wa21UV7VPWUiBqmoqN1wg5Lhromu91tH9przNo6i ffCg== X-Gm-Message-State: AOAM531r3kmDwtZfOhJ9LDNkDMmaqZsAPigXKy9WS8LmjfRXEMIloS5h 0sUvJ6bRQeJAlz5/VBvbl/s= X-Received: by 2002:a63:b60:: with SMTP id a32mr1424789pgl.275.1606940913171; Wed, 02 Dec 2020 12:28:33 -0800 (PST) Received: from nickserv.localdomain (c-98-33-101-203.hsd1.ca.comcast.net. [98.33.101.203]) by smtp.gmail.com with ESMTPSA id r11sm535120pgn.26.2020.12.02.12.28.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2020 12:28:32 -0800 (PST) From: Nick Terrell To: Herbert Xu Cc: linux-crypto@vger.kernel.org, linux-btrfs@vger.kernel.org, squashfs-devel@lists.sourceforge.net, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Kernel Team , Nick Terrell , Nick Terrell , Chris Mason , Petr Malat , Johannes Weiner , Niket Agarwal , Yann Collet , Christoph Hellwig Subject: [PATCH v6 2/3] lib: zstd: Add decompress_sources.h for decompress_unzstd Date: Wed, 2 Dec 2020 12:32:41 -0800 Message-Id: <20201202203242.1187898-3-nickrterrell@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201202203242.1187898-1-nickrterrell@gmail.com> References: <20201202203242.1187898-1-nickrterrell@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Nick Terrell Adds decompress_sources.h which includes every .c file necessary for zstd decompression. This is used in decompress_unzstd.c so the internal structure of the library isn't exposed. This allows us to upgrade the zstd library version without modifying any callers. Instead we just need to update decompress_sources.h. Signed-off-by: Nick Terrell --- lib/decompress_unzstd.c | 6 +----- lib/zstd/decompress_sources.h | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 lib/zstd/decompress_sources.h diff --git a/lib/decompress_unzstd.c b/lib/decompress_unzstd.c index 87ff567fd76d..d42281d7d416 100644 --- a/lib/decompress_unzstd.c +++ b/lib/decompress_unzstd.c @@ -68,11 +68,7 @@ #ifdef STATIC # define UNZSTD_PREBOOT # include "xxhash.c" -# include "zstd/entropy_common.c" -# include "zstd/fse_decompress.c" -# include "zstd/huf_decompress.c" -# include "zstd/zstd_common.c" -# include "zstd/decompress.c" +# include "zstd/decompress_sources.h" #endif #include diff --git a/lib/zstd/decompress_sources.h b/lib/zstd/decompress_sources.h new file mode 100644 index 000000000000..d2fe10af0043 --- /dev/null +++ b/lib/zstd/decompress_sources.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +/* + * This file includes every .c file needed for decompression. + * It is used by lib/decompress_unzstd.c to include the decompression + * source into the translation-unit, so it can be used for kernel + * decompression. + */ + +#include "entropy_common.c" +#include "fse_decompress.c" +#include "huf_decompress.c" +#include "zstd_common.c" +#include "decompress.c" -- 2.29.2