From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 CB9171D0BBC; Wed, 2 Oct 2024 14:35:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727879740; cv=none; b=NoNg66Q+vpI96DrZ/iqq0fgOHiPyBwJsdJwK8QjtAbBfBElgg6aNkc0r4F7TpGFtKGzMPsvUtRIYF7eQmJEXdIsUmh5WLjk1qzcXww6W2HNnxkp4mZkWdNnY3ttPrIKnLp9aRGLrZG/fsb1S1yCplJKNQdZVra35jbsysr/3MIc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727879740; c=relaxed/simple; bh=HlgdY6taOhPBGT0b/L3lxfZektmJBNc08Nepx/FAoV4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nu5P5kUNOJ2l8haHwKCpT+6BTBfrBX4hFiRwwzp1N2L2LhlUeoL4BgdgoZE3Y/qd1U4i/s5lkP1dLuzSMey1uskdOIbec7OEpLHv6ThVGtefJ6U/rBERj8dg2Hov3nbFAixx70jZko9R+m6Yn7hzlyBeH5G9GcERbDOqsgHsVeU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=j7Zhrcqg; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="j7Zhrcqg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26D5DC4CEC2; Wed, 2 Oct 2024 14:35:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1727879740; bh=HlgdY6taOhPBGT0b/L3lxfZektmJBNc08Nepx/FAoV4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j7ZhrcqgSFg+z+V5r3hw1UPju+Zot9wbhRUN9vgkpuNtP6jllkhYD1oK1KpBA2Su9 RhED5pVmGbZ3f35fuNPb6s3f2BobpHWvEzKLtwTm2uukpWqMnbsN7JygYexTXz5fKt MXdsHSmmHxpzNzc0ehQU5EVUuH7WrQg1b7KUd4uE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Lasse Collin , Sam James , Krzysztof Kozlowski , Herbert Xu , Joel Stanley , Albert Ou , Catalin Marinas , Emil Renner Berthing , Jonathan Corbet , Jubin Zhong , Jules Maselbas , Palmer Dabbelt , Paul Walmsley , Randy Dunlap , Rui Li , Simon Glass , Thomas Gleixner , Will Deacon , Andrew Morton , Sasha Levin , Michael Ellerman Subject: [PATCH 6.6 222/538] xz: cleanup CRC32 edits from 2018 Date: Wed, 2 Oct 2024 14:57:41 +0200 Message-ID: <20241002125801.017663129@linuxfoundation.org> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241002125751.964700919@linuxfoundation.org> References: <20241002125751.964700919@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Lasse Collin [ Upstream commit 2ee96abef214550d9e92f5143ee3ac1fd1323e67 ] In 2018, a dependency on was added to avoid duplicating the same constant in multiple files. Two months later it was found to be a bad idea and the definition of CRC32_POLY_LE macro was moved 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. Link: https://lkml.kernel.org/r/20240721133633.47721-10-lasse.collin@tukaani.org Fixes: faa16bc404d7 ("lib: Use existing define with polynomial") Fixes: 242cdad873a7 ("lib/xz: Put CRC32_POLY_LE in xz_private.h") Signed-off-by: Lasse Collin Reviewed-by: Sam James Tested-by: Michael Ellerman (powerpc) Cc: Krzysztof Kozlowski Cc: Herbert Xu Cc: Joel Stanley Cc: Albert Ou Cc: Catalin Marinas Cc: Emil Renner Berthing Cc: Greg Kroah-Hartman Cc: Jonathan Corbet Cc: Jubin Zhong Cc: Jules Maselbas Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Randy Dunlap Cc: Rui Li Cc: Simon Glass Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Sasha Levin --- 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 88a2c35e1b597..5627b00fca296 100644 --- a/lib/xz/xz_crc32.c +++ b/lib/xz/xz_crc32.c @@ -29,7 +29,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 bf1e94ec7873c..d9fd49b45fd75 100644 --- a/lib/xz/xz_private.h +++ b/lib/xz/xz_private.h @@ -105,10 +105,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.43.0