Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2985258pxm; Mon, 28 Feb 2022 09:45:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJy2yvWP0uVfbHCL/zBqka/P4ypywW2RzEp4a57TYel0+F2nntWmQaLITvufpe1UFhsnlbo5 X-Received: by 2002:a65:6a8e:0:b0:378:b62d:f397 with SMTP id q14-20020a656a8e000000b00378b62df397mr3963070pgu.239.1646070320054; Mon, 28 Feb 2022 09:45:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646070320; cv=none; d=google.com; s=arc-20160816; b=njV3nfoy3oSvR91V8p/MafHDO8EWCRE0BwoBht/IVexPvYzye5dPoSxQ8MCnLbvT1x Z6wNYMJADtrzqx3VMbpFDB621YsS7P2Jjx1NMLBiOCOjIqHHkzqRWs5LJiKFon9Mrb3Y ks+69X1/oOAuN8vr9Z/LqCmk3YIYhoM6/8Xi+PX3/RuWOnvas1DYDhfWlJRqMtXe+FLo f6/ygf9U7XtVvI20OXZ2PcdcWanST5IGz6wTBtFV5GZ4WGFaHW78kq9uLWWkUSCI1wuL BrWFh3iGq35PzuyD8riAKa5xjf6WsvJe6d2YqQNNMCKaJIWtLMby5LsjxtIquvc8bF7A 7U8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:mail-followup-to:reply-to:message-id :subject:cc:to:from:date:dkim-signature:dkim-signature; bh=oNvLdI+iZsXcVPiWs0ldraacfaGBUEaJwBk4ZA2v124=; b=xBkbkRGV8kFXgsDxj9siiT00sEHvlRZHCBKWjigUCuL+XL2M8J6w7MYx44soCzo+0a zHFScVuq2kQ1CspVZrJtx7KxjjrDYJ4zo19a8mlj+jjlkmsTizBZUhfZTZolOK6HM49i J3qBiy94/3J7+g9JYMpfUgpa+M0Zsog6ykrwbXayI491K0W+gyusOqdZljybgKGsl+ui R/+Lx0SE4Ox/Ft0LkfswQSsBu4ECwzgOrjJpsE8ItPRjdvozxck2g1H5gItrBwzChBQc RSjidP1P57J43VkePe+Ljg7G0bJICXiP7MSuCdCOBMf6H05bFsqRU0eYYtubTUCsHYOP t66g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=rWm36XAZ; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gm9-20020a17090b100900b001bd380dba0bsi43824pjb.89.2022.02.28.09.45.04; Mon, 28 Feb 2022 09:45:20 -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=@suse.cz header.s=susede2_rsa header.b=rWm36XAZ; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235602AbiB1NXp (ORCPT + 99 others); Mon, 28 Feb 2022 08:23:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232050AbiB1NXn (ORCPT ); Mon, 28 Feb 2022 08:23:43 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF0E626121; Mon, 28 Feb 2022 05:23:04 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 2BDED2113A; Mon, 28 Feb 2022 13:23:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1646054583; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oNvLdI+iZsXcVPiWs0ldraacfaGBUEaJwBk4ZA2v124=; b=rWm36XAZ+Llc9U2KXh2MPBcdn+RT/qlvq2rSEOELa7CXgyIbCnSv3eYuDAtuPoL2SvdM58 lh4PAaind+isGMTnTBPbFB9f6c6VikkIJrmmVYoyhA4rLWPCvoPkmVAF3Xp5EU0w3AcUnQ A79o4qcmmjPCwQH/x+MN0LKM2sKO4Xw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1646054583; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oNvLdI+iZsXcVPiWs0ldraacfaGBUEaJwBk4ZA2v124=; b=NTy2NkO24rhwN3/jLw4GQXPDL/VZeLSdeIm58qi61G+/SIy2JEKcfSCmGpKt/FLfgZhQ7D CyLReitTHv7C/uAg== Received: from ds.suse.cz (ds.suse.cz [10.100.12.205]) by relay2.suse.de (Postfix) with ESMTP id 84B2CA3B85; Mon, 28 Feb 2022 13:23:02 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id A0D17DA823; Mon, 28 Feb 2022 14:19:11 +0100 (CET) Date: Mon, 28 Feb 2022 14:19:11 +0100 From: David Sterba To: Arnd Bergmann Cc: Jani Nikula , 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 Subject: Re: [PATCH] [v2] Kbuild: move to -std=gnu11 Message-ID: <20220228131911.GH12643@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Arnd Bergmann , Jani Nikula , 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 References: <20220228103142.3301082-1-arnd@kernel.org> <87v8wz5frv.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 02:01:06PM +0100, Arnd Bergmann wrote: > 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 We've added the individual warnings to the per-directory flags so it's a bit more flexible than just enabling W=1. The idea is to add possibly stricter warnings once we make sure it builds fine and does not produce false reports. Extending W=1 in the same way would affect everybody.