Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3117894rwb; Fri, 9 Dec 2022 10:09:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf6VIgMTMf/ESYuzFs9M7mrGfiZsNrQKw2dqtbgdaqNVMxL/SNUUktQ8ZzdqKx5d7CrhySWc X-Received: by 2002:a17:90a:6845:b0:218:cbf6:733 with SMTP id e5-20020a17090a684500b00218cbf60733mr6533333pjm.21.1670609346678; Fri, 09 Dec 2022 10:09:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670609346; cv=none; d=google.com; s=arc-20160816; b=h53tt5ZUFsXnF9p8p1FsBok90viH25peVVsZrFBrAm9VjBUsVdaURL1MBcKPiAUpwH enmh2sRRYYJh/rXIctnZhVGgza9xJpbjNA9d4JzV69sECStvzkCPwn4kFoCV6QAGC4Qa bJF8KheCoIk02m9kexndcrFfJHKrxpfg7eR5jcpez3mb5O2gAYtCa2I7XigLvHl2wWfN /3vuhCKU6Sb2EtfFyVoFEdLlBDz+9XqhxSaFMTHgt8ohOeO+1X7D/Q1YeoXgrSpliH7Q T22dtPUjwMXIcmfb1w5IATGYlNHD5/XwtUHlQjq3HeOEvJObe3gqrOP5uzYOUa6YzfDm A3DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+YfcoJoIrq2U8+gg0X12cXKIQMstpmkzllDdT4ZLd6U=; b=UDMwT7FqrwpxsUY0zwf8EHb8XTpAxTDxczhmrpPE+5bbPyCzZeX/KuKyaKoB2VGIl8 Xqj6XuLPo0b/eLUtiq25fYh54UvmD7scO0C2Nvh0FOnomSo83LBySU1lr3DU7yNDuX38 2nxam5m6qQ+EIeJ86eUw0rJuPIqPr6zroE5bBCST7T76P1iTQwUhHchIEo6/TVknLHHm e+nwivIHYkdipeeB+k2xxkzJutpjMfygciUYYqE8k25+o2EOs8LHWKHej3gvoUaNDBvI l3eGWYuLJFDxrk1yHky2bU8yeEqFWWgRDVl5R7hB0TRw93/YXALaQuKtyUjjSe0VfpuU lm6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V318J8bc; 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 nv4-20020a17090b1b4400b002192eb3532bsi2822926pjb.116.2022.12.09.10.08.56; Fri, 09 Dec 2022 10:09:06 -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=V318J8bc; 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 S229762AbiLIRtW (ORCPT + 75 others); Fri, 9 Dec 2022 12:49:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229626AbiLIRtU (ORCPT ); Fri, 9 Dec 2022 12:49:20 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5D8769332; Fri, 9 Dec 2022 09:49:19 -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 dfw.source.kernel.org (Postfix) with ESMTPS id E7286622CF; Fri, 9 Dec 2022 17:49:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04487C433D2; Fri, 9 Dec 2022 17:49:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670608158; bh=m6SS2DDS4p6GsaniGyVCYqB96onm+knvX+hrwb8N7qQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V318J8bcBcsnu5gXOqhsDTBA5VnGd3PSACWx7cXJQ6kbjFJkAIf9exb2gnOo+67Q+ TF+/KjiPIi9WlGS/g0BktJ01BKw3xh6ZqYBzByNEGN/iWotYyezAD6PI2o7lTDKNX9 amoXxi/jStPoAP3bH/6Ik/HrRyCumdbtZydlKy3e3EmdFnvd3xI2NE+OSWk8HYdLZu u6PU7fyZv2d1q8kfhZ7jHTmsHtyTckuVtP8agKTisMHTC2QcZwmIFSgHbKewDT+nrK 8Jy3PcS82IsJ7qKt7XW78lODIupW4OveP7h7ZiP3045nYBq9Xafukukxho6VE/Lq/I A8zypi22RgixQ== Date: Fri, 9 Dec 2022 10:49:16 -0700 From: Nathan Chancellor To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Nick Desaulniers , Nicolas Schier Subject: Re: [PATCH 2/2] kbuild: add -Wundef to KBUILD_CPPFLAGS for W=1 builds Message-ID: References: <20221206040731.442499-1-masahiroy@kernel.org> <20221206040731.442499-2-masahiroy@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221206040731.442499-2-masahiroy@kernel.org> 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 On Tue, Dec 06, 2022 at 01:07:31PM +0900, 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. > > [1]: https://lore.kernel.org/all/20221012180118.331005-2-masahiroy@kernel.org/ > > Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor Looks like the robot already found a few so this clearly works as intended. > --- > > 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 > >