Received: by 2002:a05:7208:70d5:b0:7f:5597:fa5c with SMTP id q21csp89842rba; Wed, 20 Mar 2024 11:50:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWbcw3mDAj+5OMjmuNlei6yNdQ/vb8e1cr7Xdg/xZxMPXSkRbBG4WUgEjWGRkHl9Azk5A+FkWspaQQtfVgJjXmb31R/eS+s/uu9QVDnbQ== X-Google-Smtp-Source: AGHT+IE947y+dyxHRzUNX8RCcNR8J39V68NsSCIrKFR8xE8EA/MIvnZjwSYpniQ151GCzLKay+V6 X-Received: by 2002:a05:6870:4725:b0:21f:1e16:fa97 with SMTP id b37-20020a056870472500b0021f1e16fa97mr2899181oaq.57.1710960608467; Wed, 20 Mar 2024 11:50:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710960608; cv=pass; d=google.com; s=arc-20160816; b=DkEhyOtyUnUXwdGFeqhjmVzBSE3AmUpOiX/R0uq9GXYxAcHgJJTKRBlfw4gM6WoAie V3RImLSH7az5a6dcoAkfP12k24FMbPy4/3TQLZ8LNw95SmO2v7U86BcSoya+z2lc1zOx H1fKEbAMmhXef7mfFlIwj4wQnE7srEb/wHqRql/LjJ75/8CHM7qowOA2Zt+4hCURPU+p jTrz3t9TN/edIJrUpA7jNko/Rg0ETeAfxZ/SKufLieDarN9zcMR/8VSi8Z8SxQSvDaAQ 94kyMWeZORo/1X+p4nG1CaTQefI1MAlrEFwu2YpVreW9r7wVyC4vASuXKRzZkbgmMGoN cCGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=z6oqFroaf3r3SApMxb8zfi9FQjykBEykYmD6u/V1xfo=; fh=cZ0pQj0gfnIzfSrD4acEszNw58lcj8DsI017uhDo/HI=; b=b2jAENCNEcpOrzluYKXczmgYu19dPNwSPpfAQl9uaa9mPw5tfJbPAMTeuS0pG7Wbql 5zP25Kg4kwRwz0K+ijCcXMbJehaayWY+xcqs+L0OX9XZdgkU8pfq0qL7Siu9oucqpw1c +JhSNGTKsbSsTDUgJSRRI5FI80j9MUtYqInB6gZQxtwB5GM+qJOhlyGRQm0cENj3NPvr 4yyyxBDj1673XJfZm3Hei5m378DNQXLRtbVuPchBCTyADEGLuuokHbdcp1LAAiNVxY7i 2SxUlfslkKqlAphsRCPvHrXyR7zSq8FidI9fgZo5mf3t1ibFoTlV/QE3BbPLX87FMf5V E3DA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=tukaani.org); spf=pass (google.com: domain of linux-kernel+bounces-109318-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109318-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d2-20020a37c402000000b007885e33338asi13411870qki.171.2024.03.20.11.50.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 11:50:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-109318-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=tukaani.org); spf=pass (google.com: domain of linux-kernel+bounces-109318-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109318-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 36BB71C2143C for ; Wed, 20 Mar 2024 18:50:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 53D7A8564D; Wed, 20 Mar 2024 18:49:26 +0000 (UTC) Received: from mailscanner11.zoner.fi (mailscanner11.zoner.fi [5.44.246.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3726185623 for ; Wed, 20 Mar 2024 18:49:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=5.44.246.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710960565; cv=none; b=g6Ppy4rqDsEuTKc6zteajNdOwe/Xv4B/rPxbW5xmuT+Y3OI5KelHj8rzKCMrGWnOaMZS+s8UrZrW+TQKtkrJ5sAMUJHN9pe3rhQy+UNeDY5dLiP4IhhjGfN3BcHdZAHTb6IcC1gRJlFUsBv5yO3VZbB9vgtgXeL764ZGIqoPIKU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710960565; c=relaxed/simple; bh=j0isJCYION1kfv7Iyxp5a8hbbdmD6XkxP4eup1q1PPw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MELP9MvPXEDmF2azPSQDySp7qKZr8MBPNE9WuP9n71RXw9L4jgZhKDnnflFHbN2PewSgW7aPQBgZ1DLj2h8iT41dagdhUSk23MogMLKFL4O3bAZZ50XA+Y0Fb064c4rFb1xx83lTBLJHdeqazuXhSVju0UCyMtLehYQA9/D2i3E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tukaani.org; spf=pass smtp.mailfrom=tukaani.org; arc=none smtp.client-ip=5.44.246.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tukaani.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tukaani.org Received: from www25.zoner.fi (www25.zoner.fi [84.34.147.45]) by mailscanner11.zoner.fi (Postfix) with ESMTPS id 8C1E320ED0; Wed, 20 Mar 2024 20:39:26 +0200 (EET) Received: from mail.zoner.fi ([84.34.147.244]) by www25.zoner.fi with esmtp (Exim 4.96.1-7-g79877b70e) (envelope-from ) id 1rn0qU-0001dW-1H; Wed, 20 Mar 2024 20:39:26 +0200 From: Lasse Collin To: Andrew Morton Cc: Lasse Collin , Jia Tan , linux-kernel@vger.kernel.org Subject: [PATCH 06/11] xz: Cleanup CRC32 edits from 2018 Date: Wed, 20 Mar 2024 20:38:39 +0200 Message-ID: <20240320183846.19475-7-lasse.collin@tukaani.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240320183846.19475-1-lasse.collin@tukaani.org> References: <20240320183846.19475-1-lasse.collin@tukaani.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The commit faa16bc404d72a5a ("lib: Use existing define with polynomial") in 2018 added a dependency on to avoid duplicating the same constant in multiple files. Two months later it was found to be a bad idea and the commit 242cdad873a75652 ("lib/xz: Put CRC32_POLY_LE in xz_private.h") added the definition of CRC32_POLY_LE macro into xz_private.h to avoid including . xz_private.h is a wrong place for it too. Revert back to the upstream version which has the poly in xz_crc32_init() in xz_crc32.c. Reviewed-by: Jia Tan Signed-off-by: Lasse Collin --- lib/xz/xz_crc32.c | 2 +- lib/xz/xz_private.h | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/xz/xz_crc32.c b/lib/xz/xz_crc32.c index 30b8a27110b1..effdf34ec48d 100644 --- a/lib/xz/xz_crc32.c +++ b/lib/xz/xz_crc32.c @@ -28,7 +28,7 @@ STATIC_RW_DATA uint32_t xz_crc32_table[256]; XZ_EXTERN void xz_crc32_init(void) { - const uint32_t poly = CRC32_POLY_LE; + const uint32_t poly = 0xEDB88320; uint32_t i; uint32_t j; diff --git a/lib/xz/xz_private.h b/lib/xz/xz_private.h index 2412a5d54801..811add814ae4 100644 --- a/lib/xz/xz_private.h +++ b/lib/xz/xz_private.h @@ -104,10 +104,6 @@ # endif #endif -#ifndef CRC32_POLY_LE -#define CRC32_POLY_LE 0xedb88320 -#endif - /* * Allocate memory for LZMA2 decoder. xz_dec_lzma2_reset() must be used * before calling xz_dec_lzma2_run(). -- 2.44.0