From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C0A37B; Mon, 28 Feb 2022 13:01:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D563C36AE2; 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-f42.google.com with SMTP id x15so15313065wrg.8; Mon, 28 Feb 2022 05:01:24 -0800 (PST) X-Gm-Message-State: AOAM533yfc/MWDXyPEiceS8Cx4jpvKC/SzG0XE4CgfAmn/FDHRgLiRSP Lt8FqCTkePhN3VY7DWv5Az59cK+Oul1JZiO/4kA= X-Google-Smtp-Source: ABdhPJwJZ+uje/xKx7oLYKDj2bjjjypvvR3EipOurSGA++FmSYe2fJ0pQQWQ1o2kkZufMewj6tiI/1i+DeR+CamQFLs= 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) Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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" 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 31077C4332F for ; Mon, 28 Feb 2022 13:01:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 34AB410E6FA; Mon, 28 Feb 2022 13:01:28 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4BE9910E660; Mon, 28 Feb 2022 13:01:26 +0000 (UTC) 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 62228612C6; Mon, 28 Feb 2022 13:01:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3ED96C340FB; 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-f48.google.com with SMTP id j17so15397637wrc.0; Mon, 28 Feb 2022 05:01:24 -0800 (PST) X-Gm-Message-State: AOAM5320XlH54ZcGM1jsGnAnabmys8ou0MxAz5sAwKlKu4Y/+LFWsIik 8rN4mc4LPFmlfJleNfIgmuVFscdwoFINFmJrgG0= X-Google-Smtp-Source: ABdhPJwJZ+uje/xKx7oLYKDj2bjjjypvvR3EipOurSGA++FmSYe2fJ0pQQWQ1o2kkZufMewj6tiI/1i+DeR+CamQFLs= 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 Content-Type: text/plain; charset="UTF-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux ARM , Michal Marek , "open list:DOCUMENTATION" , Arnd Bergmann , Jonathan Corbet , linux-staging@lists.linux.dev, Masahiro Yamada , llvm@lists.linux.dev, Nick Desaulniers , Linux Kernel Mailing List , dri-devel , greybus-dev@lists.linaro.org, Alex Shi , Federico Vaga , Hu Haowen , Intel Graphics , linux-btrfs , Linus Torvalds , linux-doc-tw-discuss@lists.sourceforge.net, Linux Kbuild mailing list Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 68B6BC433EF for ; Mon, 28 Feb 2022 13:17:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WIPO+RiPzUxwficKNKYJsqc/vF37QfTFpZjB/jSxSCg=; b=bc3TSyoqrMxTZo JKEZFGwaClzjChVslMCp8gJH99BNNzx3Elf1jWzsnCZ5DweHgeW01ZO3QYxW4vvrX0EHTHoyRInpd Or4p0MFCn3sLaoWQLYxKm2KBVB94NsHTyeltB0JKEcAwLoTr4Zw76EQEDiUVV5Lcs6q5CmavcbdeJ uA7Tx4aYRpOExVA7S8xvN/9c4QHl+3HXKHRg7o5JDNlmSzH6aqVFziRwky8I1/bI+afGjmmtssAkb g3X+VTWpzmmdlnZZb4/TgyLh2TK/U6r3CPEMWuddKVdAwsL8/YrwnXUwgVPLOZVZLEf+Pb7MRlQyc Y/2pPXj9by/CVmO1AcrQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOfsP-00CU7Z-BH; Mon, 28 Feb 2022 13:15:46 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOfeZ-00CPCR-A9 for linux-arm-kernel@lists.infradead.org; Mon, 28 Feb 2022 13:01:29 +0000 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 ams.source.kernel.org (Postfix) with ESMTPS id 8ABD9B81128 for ; Mon, 28 Feb 2022 13:01:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 329C8C36AE3 for ; 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-f52.google.com with SMTP id n14so15308035wrq.7 for ; Mon, 28 Feb 2022 05:01:24 -0800 (PST) X-Gm-Message-State: AOAM530D2h+B3Wu6KAaxmmsZWGu91NiLrdRhkixrrACqkFtmRfxPSAId iwuLjZYBtfb+Rs57Xa1GqdH4Pprwz9GkmczdtWc= X-Google-Smtp-Source: ABdhPJwJZ+uje/xKx7oLYKDj2bjjjypvvR3EipOurSGA++FmSYe2fJ0pQQWQ1o2kkZufMewj6tiI/1i+DeR+CamQFLs= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220228_050127_750023_F95EEE40 X-CRM114-Status: GOOD ( 24.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 157E6C433EF for ; Mon, 28 Feb 2022 14:26:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 01EC010E82E; Mon, 28 Feb 2022 14:26:08 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4BE9910E660; Mon, 28 Feb 2022 13:01:26 +0000 (UTC) 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 62228612C6; Mon, 28 Feb 2022 13:01:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3ED96C340FB; 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-f48.google.com with SMTP id j17so15397637wrc.0; Mon, 28 Feb 2022 05:01:24 -0800 (PST) X-Gm-Message-State: AOAM5320XlH54ZcGM1jsGnAnabmys8ou0MxAz5sAwKlKu4Y/+LFWsIik 8rN4mc4LPFmlfJleNfIgmuVFscdwoFINFmJrgG0= X-Google-Smtp-Source: ABdhPJwJZ+uje/xKx7oLYKDj2bjjjypvvR3EipOurSGA++FmSYe2fJ0pQQWQ1o2kkZufMewj6tiI/1i+DeR+CamQFLs= 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: To: Jani Nikula Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Mon, 28 Feb 2022 14:26:05 +0000 Subject: Re: [Intel-gfx] [PATCH] [v2] Kbuild: move to -std=gnu11 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux ARM , Michal Marek , "open list:DOCUMENTATION" , Arnd Bergmann , Jonathan Corbet , linux-staging@lists.linux.dev, Masahiro Yamada , llvm@lists.linux.dev, Nick Desaulniers , Linux Kernel Mailing List , dri-devel , greybus-dev@lists.linaro.org, Alex Shi , Federico Vaga , Hu Haowen , Intel Graphics , linux-btrfs , Linus Torvalds , linux-doc-tw-discuss@lists.sourceforge.net, Linux Kbuild mailing list Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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