Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2998760pxm; Mon, 28 Feb 2022 10:01:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwUfRyhBATZMeU7LsfC99jvD1NuLNT7yLAcpK7WQVZiNBZW41OO9UaF88dbNinVx5eSHIxZ X-Received: by 2002:a17:90a:8911:b0:1bd:395e:40e5 with SMTP id u17-20020a17090a891100b001bd395e40e5mr8310616pjn.121.1646071300682; Mon, 28 Feb 2022 10:01:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646071300; cv=none; d=google.com; s=arc-20160816; b=PHQNLmZtjJtUiPfN2wfDmDg8s1/iE5toUf/N2mM40lRez2SNlsr6vGGQky7yiar/kX XwQ/AoH77ULeZGlWQgJ2Hx6PhewCRVwGj+qe4TfAD7qV3YdNVECCte+Hzsx0FIxw6u0Q uDuE0rTURhoBP/7mNXjdKyUIKZSvgkjIdm9rhxxXFHO1bXCw5B26DL//IX06dCH8FJRp gNi3MYSUNhHuE0dgWzphcXJOn5cX8rQl4oWwO6VCBBaCdxWO54MAWmeXVBir02cXS4eg Zkhgtcw+FEAITemqCfTLv2/cdqnirzcIS7Zk1MjGE2iCyvrBF/IMcwa6thUyHJIGfNyZ jSSg== 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=rvJlRC2F2npAUCFDadriksNMq1Qj1C19pNhVEyYNbU8=; b=ASJTI5I2KmXMG7fa+o0nPhYYIwhBRfGKJfl88JsH80dpA3Rn8GfdW49rzSmi1mD2HX ArqO/72cUv2MOKv9UK9nNfb7Y2e7q0b/FHuFC1H84TM0o/FGIJI4nD+2sim62SmcGE9T u4aR0pb/FDbQ1cvEOj+RDhS4QX8Xov/d6L/JGdv37PQbXLVfMpkXND4sVSvOBxfy1FI6 Z1k/pvmmLCEHL4QAsPLZr5Nfv8U6mh/Rn1Fhvag2H6ASFI884Tp55BZbS3OZv+uSlEmH brcY1gYVDuqpYl/Obn+PUX7b8aoCtlyD7x4LM3B3EfO6w9uaRPiTWCAyzuAsneDRRzuD hSLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="aUSaKk/T"; 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 b12-20020a170902e94c00b0015166c896fdsi3992602pll.410.2022.02.28.10.01.24; Mon, 28 Feb 2022 10:01:40 -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="aUSaKk/T"; 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 S233279AbiB1NCF (ORCPT + 99 others); Mon, 28 Feb 2022 08:02:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230039AbiB1NCD (ORCPT ); Mon, 28 Feb 2022 08:02:03 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32EFD58E66; Mon, 28 Feb 2022 05:01:25 -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 CAA86612B8; Mon, 28 Feb 2022 13:01:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38939C36AE5; Mon, 28 Feb 2022 13:01:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646053284; bh=UiMZXTZJMibeG1EW/yB31l1nItCSfnX4i5UKaUmqYi4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=aUSaKk/THutssyZeRam8Ln1InKtmbtGYGpY3YWvcJayXLqxXdTg953ErM2MJCtBtt uScw14Tbo5bg0ZHcC8cU7sgK10lL8TIQKSzKXfK2pkZyGxYCp1liVDXA1C4GiuJ7SO oKHEAWYavKs1p4i7M729QMm1NwF5516rRrjec/lz5dGWlP1/n5JNj3ETeEYxIsNPJb BRWAhjZu7qFxrmpdGKWHJpcfMZ8eeq5JB03Rgt3ARIfPBC1Fwk7KFtLPaICIK7TX3F 4jMGPC4qPpWyyrTwafEVFhjGRcTqgwWsXE9jDdjsorkbn/AQNdVuR7OlQvIUmEXRhX usy66MwlSEfkA== Received: by mail-wr1-f41.google.com with SMTP id j17so15397622wrc.0; Mon, 28 Feb 2022 05:01:24 -0800 (PST) X-Gm-Message-State: AOAM530eAyIm90JlmkGx8bwrvgMf34umIC8VoJXGc5B3NoIaHR2FxUgX /4qVqutsL12UpOLFhDqD32drJAfesPkToibeVxo= X-Received: by 2002:a5d:63c2:0:b0:1ef:840e:e139 with SMTP id c2-20020a5d63c2000000b001ef840ee139mr8331744wrw.192.1646053282413; Mon, 28 Feb 2022 05:01:22 -0800 (PST) MIME-Version: 1.0 References: <20220228103142.3301082-1-arnd@kernel.org> <87v8wz5frv.fsf@intel.com> In-Reply-To: <87v8wz5frv.fsf@intel.com> From: Arnd Bergmann Date: Mon, 28 Feb 2022 14:01:06 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] [v2] Kbuild: move to -std=gnu11 To: Jani Nikula Cc: Linux Kbuild mailing list , Arnd Bergmann , Linus Torvalds , Masahiro Yamada , llvm@lists.linux.dev, Jonathan Corbet , Federico Vaga , Alex Shi , Hu Haowen , Michal Marek , Nick Desaulniers , "open list:DOCUMENTATION" , Linux Kernel Mailing List , linux-doc-tw-discuss@lists.sourceforge.net, Linux ARM , Intel Graphics , dri-devel , greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-btrfs Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.5 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,T_SCC_BODY_TEXT_LINE 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 Mon, Feb 28, 2022 at 1:36 PM Jani Nikula wrote: > > > > One minor issue that remains is an added gcc warning for shifts of > > negative integers when building with -Werror, which happens with the > > 'make W=1' option, as well as for three drivers in the kernel that always > > enable -Werror, but it was only observed with the i915 driver so far. > > To be on the safe side, add -Wno-shift-negative-value to any -Wextra > > in a Makefile. > > Do you mean always enable -Wall and/or -Wextra instead of -Werror? > > We do use -Werror for our CI and development too, but it's hidden behind > a config option that depends on COMPILE_TEST=n to avoid any problems > with allmodconfig/allyesconfig. What I meant here is that I'm adding -Wno-shift-negative-value to all four places in the kernel that already use -Wextra. > For the future, makes me wonder if we couldn't have a way for drivers to > locally enable -Wall/-Wextra in a way that incorporates the exceptions > from kbuild instead of having to duplicate them. I have an older patch series that does this, but it also does a few other things that I couldn't quite get right in the end with all combinations of compiler versions and warning levels, so I did not submit that. What this allows is to have per-directory statements like KBUILD_WARN1=1 KBUILD_ERROR0=1 to force all the default warnings (-Wall etc) to be errors, while making the W=1 type warnings (-Wextra etc) normal warnings. > Anyway, for the i915 changes, > > Acked-by: Jani Nikula Thanks, Arnd