Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp124417imm; Thu, 20 Sep 2018 19:55:39 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYjVl0ztSDDqW705X3hUTFZH8YeYXndBOjApVvTToeS2LWSwA4xAN7deJ4tG3CAUg71j4v4 X-Received: by 2002:a17:902:b492:: with SMTP id y18-v6mr4653789plr.208.1537498539803; Thu, 20 Sep 2018 19:55:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537498539; cv=none; d=google.com; s=arc-20160816; b=aYlNph+vZO3bbGdp30mWBG4gc/c1A0Xz1faxgv/dDdf/9Y49l8Q0BksVq5aGn/wxun T9/DT6f+4tL2a7LH9D8juob5B3gJzkeIFlS922ahnU1OEP4wJb+Qd8YnvAUCLIaCALdz tkB2Sfr1irVg9CdRa5p6JEry77TORynSlg3+wlwx9yl+0U0W7xi4co3c3npFIMDy68RM s2x1+jBnhduPAZJJ59JtDqUyZKJIOIPBvO8kQY/sRENfaRUGD5ZZjRk9AjZWUb4yEJHv YnI5lBIkL1FEjtDCtoIrcVVnzKnjRjlx/BxX53CDdPOzxxIqTiLrBzCSYYF/UmPqPCa+ H9mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=W5V790ekTmPiq/s4qHSLLw+0znVIlnT1bGCmYfgL9rg=; b=O53xFLym4BgKN0qcDAwSq1G11kx5RiSOCoVpwEnnfdbRt1e7reBUM5JwM93K79t0gd mtJob3VzswTdp7/a0QNVtP04CiWgC6bATkVqzT6s3U6uV3NaseBhBdgWCo+Kut8iHx7f aaKygOi3tfaVTMcEZ9U1u3R5hEmcFU9ZkPo7g3dtQqoqvPpEh1MFVad2yCeEbfjKygTR 00NPx1LdewkKKPi61/G/A8K1GL1uiThtE/kePvTJK6e3bsk9VxcXDJYga2zwuoy1w+gU WNZQgXIA9uZyn72oL8W4gMZaBbLVq2ZhZFSZgZw5gLA2BxlHlrj1FdT64gOBFo8X1+ei IgLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=O9NEtbBU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d191-v6si24550515pga.157.2018.09.20.19.55.23; Thu, 20 Sep 2018 19:55:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=O9NEtbBU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389010AbeIUIlW (ORCPT + 99 others); Fri, 21 Sep 2018 04:41:22 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:45990 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725898AbeIUIlW (ORCPT ); Fri, 21 Sep 2018 04:41:22 -0400 Received: by mail-pg1-f196.google.com with SMTP id t70-v6so536136pgd.12 for ; Thu, 20 Sep 2018 19:54:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=W5V790ekTmPiq/s4qHSLLw+0znVIlnT1bGCmYfgL9rg=; b=O9NEtbBUDSaOVMhnB74ISS5LP2O1BlAdwx4jevUQ5bR+at3X8uHaNJExam6jR6lD/L Ihp9eNXRbjvgketTKdAKSpgr6zCO0jhGhcA5nvO1Drg/txG3faWBnoIqmZw+7fcFPqUv g/YSPQ8YAkfoVk9KN/zXiAKU6In2vKO+LwEkIwR6/+hk63kT6N/J9dLGXTeqRY/xdrCI SbECpUhM0NoT3ua6HKtY3iFcnq0ng3CUmAm+wY+9RGX2D4RMMrnyZctUroB4vNEJ+5sz ND7MLMONjNLO8xgI9NIIotzxgexBTLrFiEvhdzfWwQ0RyglEDzgwfgK2j64SS/Gl1swO RBvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=W5V790ekTmPiq/s4qHSLLw+0znVIlnT1bGCmYfgL9rg=; b=K2acDQ1mKSaVAGEosAiHKHZYHJKQevbXixIBPbYZE85210W8GcQVwmxePixiQNz06q NHwVdQKH3X+k5wo3+EjwtmyiNAkCjJ5toRO1b42ywlyAMDrw+wVw+8R3AMzOzTLYR4O3 SyJ0zYf+Pr6XNPmiAKFayC+30iDb9qQK63g2peYTzKWonepwgXd8RHRiXfw8zihhBU0m aVp7PS+b73Rq2Qhkd649XcHT9hzGN/IIDdaMM+h/ul8oI8q0nxQbJtWxX3NtQiza8ico SN571Ba6wdtCWyBv+ph+s94FWuGaGT4aG+TSGT57JT6cJJxx6sPqiOzMpEAoDLbm5LPh hkYA== X-Gm-Message-State: APzg51DGg0FDpWkxwl9dEwblL6MbIvJWjuf7Zpg7Oe9vR/QZ85IdSOKJ jKcG+/KUwpjx8UpsRTYd8qg= X-Received: by 2002:a63:f54c:: with SMTP id e12-v6mr39441533pgk.286.1537498480683; Thu, 20 Sep 2018 19:54:40 -0700 (PDT) Received: from aurora.jms.id.au ([45.124.203.19]) by smtp.gmail.com with ESMTPSA id h4-v6sm26802903pgp.13.2018.09.20.19.54.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Sep 2018 19:54:39 -0700 (PDT) Received: by aurora.jms.id.au (sSMTP sendmail emulation); Fri, 21 Sep 2018 12:24:32 +0930 From: Joel Stanley To: Krzysztof Kozlowski , Greg Kroah-Hartman Cc: Herbert Xu , Michael Ellerman , Christophe LEROY , Meelis Roos , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH] lib/xz: Put CRC32_POLY_LE in xz_private.h Date: Fri, 21 Sep 2018 12:24:31 +0930 Message-Id: <20180921025431.28366-1-joel@jms.id.au> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This fixes a regression introduced by faa16bc404d72a5 ("lib: Use existing define with polynomial"). The cleanup added a dependency on include/linux, which broke the PowerPC boot wrapper/decompresser when KERNEL_XZ is enabled: BOOTCC arch/powerpc/boot/decompress.o In file included from arch/powerpc/boot/../../../lib/decompress_unxz.c:233, from arch/powerpc/boot/decompress.c:42: arch/powerpc/boot/../../../lib/xz/xz_crc32.c:18:10: fatal error: linux/crc32poly.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~ The powerpc decompresser is a hairy corner of the kernel. Even while building a 64-bit kernel it needs to build a 32-bit binary and therefore avoid including files from include/linux. This allows users of the xz library to avoid including headers from 'include/linux/' while still achieving the cleanup of the magic number. Fixes: faa16bc404d72a5 ("lib: Use existing define with polynomial") Reported-by: Meelis Roos Reported-by: kbuild test robot Suggested-by: Christophe LEROY Signed-off-by: Joel Stanley --- lib/xz/xz_crc32.c | 1 - lib/xz/xz_private.h | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/xz/xz_crc32.c b/lib/xz/xz_crc32.c index 25a5d87e2e4c..912aae5fa09e 100644 --- a/lib/xz/xz_crc32.c +++ b/lib/xz/xz_crc32.c @@ -15,7 +15,6 @@ * but they are bigger and use more memory for the lookup table. */ -#include #include "xz_private.h" /* diff --git a/lib/xz/xz_private.h b/lib/xz/xz_private.h index 482b90f363fe..09360ebb510e 100644 --- a/lib/xz/xz_private.h +++ b/lib/xz/xz_private.h @@ -102,6 +102,10 @@ # 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.17.1