From patchwork Fri Sep 21 02:54:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 972821 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42GdXf2RfKz9sDK for ; Fri, 21 Sep 2018 12:56:34 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="O9NEtbBU"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42GdXf0vb4zF3Pj for ; Fri, 21 Sep 2018 12:56:34 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="O9NEtbBU"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::543; helo=mail-pg1-x543.google.com; envelope-from=joel.stan@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="O9NEtbBU"; dkim-atps=neutral Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42GdVW0yMXzF3PG for ; Fri, 21 Sep 2018 12:54:42 +1000 (AEST) Received: by mail-pg1-x543.google.com with SMTP id r77-v6so218817pgr.5 for ; Thu, 20 Sep 2018 19:54:42 -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=ODi4wlx8bS6ymMjG/aUyNZBbQLDY8O1pmqjmfxt8q+1SKgJ0YndPSyZu/4CCc2vf1+ QWP4RZ4fTwhmUzeQ9k8mo9ncX7IwOZvtsyNRvzxFvZ8Oymr+yRzRj565OPFM4SsU9etj 8wTLQzsVSAGwwvVQD44ze0qQ72O31WZxUJXJ+8B6OfmI2XutDctChjZNtOiNqM7BOZzl MnzjLJqS+NmIP+y64s4cqXuZHUeBAvE2mL6dklh3cJra8YqJXqxuDRp57iiUEtWZn1Nl E8we6VOK3Ppk1WhK1iM+/Ufia5ewJV81aj8RC0XqepbmsFqy0zJFb6l+LwIXA68QNrRS Pb/g== X-Gm-Message-State: APzg51BhA5MoEppWSCGdS3UiPds1baZ4aAI8ww0HlGscS+8SZQRjfSYx BqGnLV2Tf8tkHwZ4FOEOqjyri3k/DpE= X-Google-Smtp-Source: ANB0VdbIbu1R63Hr64yYoI1e/ZdPixyhvolI9dTUi8i8JAYf+b6wOMje8XIMobU6Est8SBK5DZsuDg== 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 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 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Herbert Xu , Meelis Roos , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 Tested-by: Meelis Roos --- 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().