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 E48C01C07C9; Tue, 15 Oct 2024 13:01: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=1728997301; cv=none; b=PrSDP1Bsh0Dz/JhI/7xcgeOmjRib+5XK8TkY2Rn96Uip6uwruG8QPYpgBeW2AYu+FtjIXF+vJBnMlyPpiaJWnhW1ofh9LSxTOvDH54dexEMwWAymLT0OaGaV1FxO/yG8V3hi9p/vJ7NvcwcHUf3+mEkJm1yxFzRVKI8dhMQIruk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728997301; c=relaxed/simple; bh=GnWr1lgJgQ6VvSv9PlaUC5MBSi3DkbSLV/COdHDrnmc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dC9YGmcNu/z3W4aOixmxvZZlK5y8y1Mx04NI+nVRUWCYjeGgUMpPYZ2U70OZOOgLaZcSOL24iLjNXVlwHOd+D6in0rFGjWVI71Rrbli6lETI/W1k2tsnDnZ6FiYFjADv86k0YaANRgPEkjX97qpDameOY2A4Fp7BQn15jxuIVbs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=HJtU1mqB; 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="HJtU1mqB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E5C1C4CEC6; Tue, 15 Oct 2024 13:01:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1728997300; bh=GnWr1lgJgQ6VvSv9PlaUC5MBSi3DkbSLV/COdHDrnmc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HJtU1mqB+ZGONKi6fLdiX4S4VPdAA2xtZAx0SCsw7crjBjEZdBRYsy1UCgLTHQVHy FKrzbR6bTtx+qsGggBQ9ClIwgd6XR7Z4Pw08BERuI4J52IN0IA6zaWBHR+knJu+O6C EHY5B+lmjT/+aVUcbpbHlf0Viu51/ZvSjX+7uUxQ= 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 5.10 144/518] xz: cleanup CRC32 edits from 2018 Date: Tue, 15 Oct 2024 14:40:48 +0200 Message-ID: <20241015123922.556000712@linuxfoundation.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241015123916.821186887@linuxfoundation.org> References: <20241015123916.821186887@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-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 09360ebb510ef..482b90f363fe3 100644 --- a/lib/xz/xz_private.h +++ b/lib/xz/xz_private.h @@ -102,10 +102,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