Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3195337rwb; Fri, 9 Dec 2022 11:08:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Qjb191rN0JzMkXYzY4N244cCsmphhQ3JXFXsncLvfQW0b8sHg3pPnHJCyR77qBlmh8toe X-Received: by 2002:a05:6402:1158:b0:46d:6f14:aec with SMTP id g24-20020a056402115800b0046d6f140aecmr6165424edw.0.1670612932078; Fri, 09 Dec 2022 11:08:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670612932; cv=none; d=google.com; s=arc-20160816; b=ruRy1KockUABlcnmLQtLkQmh+7qYmTUOgb9ldLMNv5Qx0gSVV+L6arehQajaCy9IAR /qhBpB2yT83Kink0dpMd0oBcxK3C8qxoMFganxdAg9UQYS45TavSSH+6AVP3/ZbTM02z JqGWSOSLn/SHkjTeDMPc+bBEkJo339+GYEMXUPZdrFUQXpLadUmv0M68mvY1XlJEHMs7 m4nw5w8GaY7MNyO7oqBg9jjvo37VuT4lqPWB9YxizHqOQY+FDCiG1Q4AFjPShjGykid7 m43Q+F1VoSuOMQHaiY7/tEN2TIxbUz46+D0J6/8/ghy5FdKcv5b1Eg+biEvAKetmQR+i nKJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=dIjL3PSL1jjI7LxiEIUx5ipFU6TCdjar/3Ia0XvmXME=; b=D0tHIjnuhje2JC4mXLxW60R5qA3+8xqFesghuzCkp/2JYhzCEokn3QtCa5yFw41N12 cCWm3XS5PI6EftJ6jaYndhTCdZojGJNVyc9FJuq0WE9AdzIOHuYpn4YHQ50bNOq29cOK XfVJpTcdPdGVdRmK5tE8EvN9KcorlFairFEAuGJV6I4nOPhc6jHFDBC1B5Yv66ozLefu Kr061byO14GP1Ogduu/Of9z82+6a+5kJ9o2SwLLTdsiJU3ASQLB323ytls4jP47gxXMm k2/SDh+6TBCfIb71NRa9AfXVi9/MWtNqTQbIsL5sWl70F8dluFYxnMbeknmjpYOnN/yZ Vtcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=o+5rR6Sc; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a7-20020a50e707000000b0045782fcb80asi1684648edn.225.2022.12.09.11.08.34; Fri, 09 Dec 2022 11:08:52 -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=@google.com header.s=20210112 header.b=o+5rR6Sc; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230044AbiLIS3l (ORCPT + 74 others); Fri, 9 Dec 2022 13:29:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229988AbiLIS3a (ORCPT ); Fri, 9 Dec 2022 13:29:30 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE263A507F for ; Fri, 9 Dec 2022 10:29:26 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id fa4-20020a17090af0c400b002198d1328a0so8859533pjb.0 for ; Fri, 09 Dec 2022 10:29:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=dIjL3PSL1jjI7LxiEIUx5ipFU6TCdjar/3Ia0XvmXME=; b=o+5rR6ScE09OHQkXYr+DQzHLHFXH7JABuPPTMfjkIJiiKFzEHCbYuNmj9mEDgAChX9 /7Ar/h3OdTWxDwEFl66RNsCNJfRGr1HD7FsaZYHPscsbCuTwmGlt/7cIlHeUovsRfITd 9CSD2SeM04KjZHuHCGXg++9Bcb9Y3f5T0ywyt44LIr5p2QRmPwfLAJGlBLsQTzq6xRx/ sJDueEPmG54MjbBN/G6eY5O2p8sZjrXzPTW4R210Xl71vLDr1ahMSW9slOK2p8/T2TYh u7eCRBIhld8qnyUjHHDsOPd480e34RcIGLXUvYXYDVwN5cQlQl3fTvJyqEZi1kpxhykk farA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dIjL3PSL1jjI7LxiEIUx5ipFU6TCdjar/3Ia0XvmXME=; b=whPccXEJM0SigJO7RVCkII4eNzh+68UmES9ppzqoNNLa8CHQeW/b27OSX+uQlydKU5 ik8kH0ZdTq6E2uQer0WfWNCxyFIg/hk27yxQmeJi8CM8wp3FKb9UffD+UK8NNvb4fchX 6ZUpqOn6qsgLuQpEeVJWTiT7z6h8qIStaJ2q2ETTRTsQU3y+GOvq+t+YE6NRt+pA0dCW g7eKp1IbmIJMuIefE5PWTzy2sRfTzOvgNpuaeV+rRJMdkWbOy75pDWIsRq65Jw6znVTF f9/q5vJrX6thF0jxpzciqa2cqJ9rcyuKnPK8hHjJUd+am2oz49N/huw6u/fMAM+5eRLp BsDw== X-Gm-Message-State: ANoB5pk5eyEZaij3Th/GT5SWtrlT94GoUCGdaNEfc59Jo4UAO9A4J0BV 4TfiAS8lET1dflp4cOIGKSxB0theLSd6mAtE1YJmLt2Z11/8I3Wj X-Received: by 2002:a17:90b:2743:b0:20d:4173:faf9 with SMTP id qi3-20020a17090b274300b0020d4173faf9mr108649204pjb.147.1670610565930; Fri, 09 Dec 2022 10:29:25 -0800 (PST) MIME-Version: 1.0 References: <20221206040731.442499-1-masahiroy@kernel.org> <20221206040731.442499-2-masahiroy@kernel.org> In-Reply-To: <20221206040731.442499-2-masahiroy@kernel.org> From: Nick Desaulniers Date: Fri, 9 Dec 2022 10:29:14 -0800 Message-ID: Subject: Re: [PATCH 2/2] kbuild: add -Wundef to KBUILD_CPPFLAGS for W=1 builds To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Nathan Chancellor , Nicolas Schier Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 On Mon, Dec 5, 2022 at 8:07 PM Masahiro Yamada wrote: > > The use of an undefined macro in an #if directive is warned, but only > in *.c files. No warning from other files such as *.S, *.lds.S. > > Since -Wundef is a preprocessor-related warning, it should be added to > KBUILD_CPPFLAGS instead of KBUILD_CFLAGS. > > My previous attempt [1] uncovered several warnings, and could not finish > fixing them all. > > This commit adds -Wundef to KBUILD_CPPFLAGS for W=1 builds in order to > block new breakages. (The kbuild test robot tests with W=1) > > We can fix the warnings one by one. After we fix all of them, we can > make this default in the top Makefile, and remove -Wundef from > KBUILD_CFLAGS. I like that approach. Reviewed-by: Nick Desaulniers > > [1]: https://lore.kernel.org/all/20221012180118.331005-2-masahiroy@kernel.org/ > > Signed-off-by: Masahiro Yamada > --- > > scripts/Makefile.extrawarn | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn > index 6bbba36c5969..40cd13eca82e 100644 > --- a/scripts/Makefile.extrawarn > +++ b/scripts/Makefile.extrawarn > @@ -38,6 +38,7 @@ KBUILD_CFLAGS += -Wno-sign-compare > KBUILD_CFLAGS += -Wno-type-limits > KBUILD_CFLAGS += -Wno-shift-negative-value > > +KBUILD_CPPFLAGS += -Wundef > KBUILD_CPPFLAGS += -DKBUILD_EXTRA_WARN1 > > else > -- > 2.34.1 > -- Thanks, ~Nick Desaulniers