Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2610828rwl; Fri, 6 Jan 2023 08:39:41 -0800 (PST) X-Google-Smtp-Source: AMrXdXtQ6yitRo+T9Vd6qrXGQAAxznhTH4uJm4peO74BvM9fnSV8HzTaee8EqAZVqP7fbqDST2zM X-Received: by 2002:a17:906:8492:b0:7c1:6b46:a722 with SMTP id m18-20020a170906849200b007c16b46a722mr49024908ejx.56.1673023181358; Fri, 06 Jan 2023 08:39:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673023181; cv=none; d=google.com; s=arc-20160816; b=iq/ayI8NSH5y2EQ1qp5H5N+TrJ4UikatMHQ7NDrK0V0E6fH+zBDeI4DOmbLuSvXCjY wrveDxmx5/ZarYsHn92Hp2vOiK0m5w/U7ic/o7HdMETdmkYFboOZzoUSG9qwp7JqdqBs d4vCpmrHhadL6Yu0SPEVG5/5ewS79+m4PFgAwxUFa3Q7tFsxSPjDcIfZTBDZfg5QVAgG 400SWdXvN2tXfAo4sYq7naZ5lz0tJGJIP4v7lQBxatiTHTM3p7CTigS0ZQT1+/Gk0nTx Lk9PU1Q/zZR+PkQoxOcOaM61aOPHLLIX86ThSH2SW3kklft2M5P2gxUqo2hKzTt5Ri2l 8LnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=itDNwTUqWxDOKLqEKNwPkZSwpIjJTinTFqCq9SIIDL4=; b=Fm+Oz5PiyMEpbXb8TnP2wTjetjWU7qnjXRzvrMs4W9vDuDyhB/j18teZaceK5/uduj fPTrd1XWzqbFZxCxxr3BVxbTt4LF15i+jpqgYS8BQ2IIOZokWfMUfCPkRRZA4xtaa6yn UaD4c1nic6VTIKf/vRB1yjPxj1wPdV34Jh2Z1GgmQxhP9pqCenooVrqunvRbRw7G+lLC HmHs7esiOtsrJj3U/90UFr9RW72Rc2YZjYMS566YxOpksnM4R6KDQJc+tJNTg0qBgM6a XZj+3b1lkztDw27l5rvcX3SvX/pqcs6g9Fe8l9RRBfE5g/z2VHXoeNw7pFBRNZL/Lvuq noKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IiZKX0jv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cn25-20020a0564020cb900b0048321d887b5si1527245edb.516.2023.01.06.08.39.28; Fri, 06 Jan 2023 08:39:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IiZKX0jv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235241AbjAFQLF (ORCPT + 54 others); Fri, 6 Jan 2023 11:11:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235376AbjAFQKm (ORCPT ); Fri, 6 Jan 2023 11:10:42 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD69F8CD2B; Fri, 6 Jan 2023 08:10:38 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 13C0CCE1D15; Fri, 6 Jan 2023 16:10:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8734AC433D2; Fri, 6 Jan 2023 16:10:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673021435; bh=ipEY3rRKK0D/abA35ydkdmkys9nnj7dRJ9pimvWv99g=; h=From:To:Cc:Subject:Date:From; b=IiZKX0jvycw86ZvwvJ59MWADhcNI1C4E6BS6pCHjkUpIovheQ3vY8iaPyR7pdVLgo 90MR7ywWRqnK8vC/dXEsnm/GH0zNlHkLfCTFS45rZowHuH9qiIcVnX8go2FQlZKAcR hvbnqUjPT7PbfSS5xNqI2CbJpDaj5RN8lh8A0FcZcItUQs0Xi7DhWCZkviE01ogzky 2cwUb9quZMIA1Cx8bXan4loCAFI3QLzVi9KBdPPfK5WN136Q7JgpIVThMvs1pRlZlu KgXDMhM2pnLOXyjJIUof/lgt30eyhf9ZUU+85l46SkEbZe4S38ZdxWSHxuhzRbtBwm Y8J2AQBE4naBQ== From: Masahiro Yamada To: Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , linux-s390@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada Subject: [PATCH] s390: fix -Wundef warning for CONFIG_KERNEL_ZSTD Date: Sat, 7 Jan 2023 01:10:23 +0900 Message-Id: <20230106161024.2373602-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit 80b6093b55e3 ("kbuild: add -Wundef to KBUILD_CPPFLAGS for W=1 builds"), building with W=1 detects misuse of #(el)if. $ make W=1 ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- [snip] arch/s390/boot/decompressor.c:28:7: warning: "CONFIG_KERNEL_ZSTD" is not defined, evaluates to 0 [-Wundef] 28 | #elif CONFIG_KERNEL_ZSTD | ^~~~~~~~~~~~~~~~~~ This issue has been hidden because arch/s390/boot/Makefile overwrites KBUILD_CFLAGS, dropping -Wundef. CONFIG_KERNEL_ZSTD is a bool option. #elif defined() should be used. The line #ifdef CONFIG_KERNEL_BZIP2 is fine, but I changed it for consistency. Signed-off-by: Masahiro Yamada --- arch/s390/boot/decompressor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/s390/boot/decompressor.c b/arch/s390/boot/decompressor.c index e27c2140d620..8dcd7af2911a 100644 --- a/arch/s390/boot/decompressor.c +++ b/arch/s390/boot/decompressor.c @@ -23,9 +23,9 @@ #define memmove memmove #define memzero(s, n) memset((s), 0, (n)) -#ifdef CONFIG_KERNEL_BZIP2 +#if defined(CONFIG_KERNEL_BZIP2) #define BOOT_HEAP_SIZE 0x400000 -#elif CONFIG_KERNEL_ZSTD +#elif defined(CONFIG_KERNEL_ZSTD) #define BOOT_HEAP_SIZE 0x30000 #else #define BOOT_HEAP_SIZE 0x10000 -- 2.34.1