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 5E7CE48B7; Mon, 28 Feb 2022 10:50:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83EF1C340E7; Mon, 28 Feb 2022 10:50:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646045447; bh=RGxEAwdzbR9egvtFInpa3m0a3G+1maC22+8uUJecp+k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=2mr4o0ihvx67u6tNw0ZQeK8ySDxIIZCnqC4Ex4voBp9cJOAwzLtVgodPoUWwqQh6K Pq2Eo6lAjCsN1L0eP39op+X0xNeqTqIOQPRIGAml0Xcl7auXm21Ibxjj/AduI8S862 87O8cic3X/60Za8DC5rd0XOSXhsp77pYqumwDpDM= Date: Mon, 28 Feb 2022 11:50:43 +0100 From: Greg KH To: Arnd Bergmann Cc: linux-kbuild@vger.kernel.org, Arnd Bergmann , Linus Torvalds , Masahiro Yamada , llvm@lists.linux.dev, Jonathan Corbet , Federico Vaga , Alex Shi , Hu Haowen , Michal Marek , Nick Desaulniers , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc-tw-discuss@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-btrfs@vger.kernel.org Subject: Re: [PATCH] [v2] Kbuild: move to -std=gnu11 Message-ID: References: <20220228103142.3301082-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220228103142.3301082-1-arnd@kernel.org> On Mon, Feb 28, 2022 at 11:27:43AM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > During a patch discussion, Linus brought up the option of changing > the C standard version from gnu89 to gnu99, which allows using variable > declaration inside of a for() loop. While the C99, C11 and later standards > introduce many other features, most of these are already available in > gnu89 as GNU extensions as well. > > An earlier attempt to do this when gcc-5 started defaulting to > -std=gnu11 failed because at the time that caused warnings about > designated initializers with older compilers. Now that gcc-5.1 is the > minimum compiler version used for building kernels, that is no longer a > concern. Similarly, the behavior of 'inline' functions changes between > gnu89 and gnu11, but this was taken care of by defining 'inline' to > include __attribute__((gnu_inline)) in order to allow building with > clang a while ago. > > 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. > > Nathan Chancellor reported an additional -Wdeclaration-after-statement > warning that appears in a system header on arm, this still needs a > workaround. > > The differences between gnu99, gnu11, gnu1x and gnu17 are fairly > minimal and mainly impact warnings at the -Wpedantic level that the > kernel never enables. Between these, gnu11 is the newest version > that is supported by all supported compiler versions, though it is > only the default on gcc-5, while all other supported versions of > gcc or clang default to gnu1x/gnu17. > > Link: https://lore.kernel.org/lkml/CAHk-=wiyCH7xeHcmiFJ-YgXUy2Jaj7pnkdKpcovt8fYbVFW3TA@mail.gmail.com/ > Link: https://github.com/ClangBuiltLinux/linux/issues/1603 > Suggested-by: Linus Torvalds > Cc: Masahiro Yamada > Cc: linux-kbuild@vger.kernel.org > Cc: llvm@lists.linux.dev > Signed-off-by: Arnd Bergmann > --- > [v2] > - added -std=gnu11 back, rather than just relying on the default > - minor changes to changelog text > --- > Documentation/process/programming-language.rst | 4 ++-- > .../translations/it_IT/process/programming-language.rst | 4 ++-- > .../translations/zh_CN/process/programming-language.rst | 4 ++-- > .../translations/zh_TW/process/programming-language.rst | 4 ++-- > Makefile | 6 +++--- > arch/arm64/kernel/vdso32/Makefile | 2 +- > drivers/gpu/drm/i915/Makefile | 1 + > drivers/staging/greybus/tools/Makefile | 3 ++- > fs/btrfs/Makefile | 1 + > scripts/Makefile.extrawarn | 1 + > 10 files changed, 17 insertions(+), 13 deletions(-) For the greybus tools section: Reviewed-by: Greg Kroah-Hartman 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 A47C2C433F5 for ; Mon, 28 Feb 2022 10:50:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 650D410E3A5; Mon, 28 Feb 2022 10:50:49 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id C083F10E39A; Mon, 28 Feb 2022 10:50:47 +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 257A460A21; Mon, 28 Feb 2022 10:50:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83EF1C340E7; Mon, 28 Feb 2022 10:50:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646045447; bh=RGxEAwdzbR9egvtFInpa3m0a3G+1maC22+8uUJecp+k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=2mr4o0ihvx67u6tNw0ZQeK8ySDxIIZCnqC4Ex4voBp9cJOAwzLtVgodPoUWwqQh6K Pq2Eo6lAjCsN1L0eP39op+X0xNeqTqIOQPRIGAml0Xcl7auXm21Ibxjj/AduI8S862 87O8cic3X/60Za8DC5rd0XOSXhsp77pYqumwDpDM= Date: Mon, 28 Feb 2022 11:50:43 +0100 From: Greg KH To: Arnd Bergmann Subject: Re: [PATCH] [v2] Kbuild: move to -std=gnu11 Message-ID: References: <20220228103142.3301082-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220228103142.3301082-1-arnd@kernel.org> 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-kernel@lists.infradead.org, Michal Marek , linux-doc@vger.kernel.org, Arnd Bergmann , Jonathan Corbet , linux-staging@lists.linux.dev, Masahiro Yamada , llvm@lists.linux.dev, Nick Desaulniers , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, greybus-dev@lists.linaro.org, Alex Shi , Federico Vaga , Hu Haowen , intel-gfx@lists.freedesktop.org, linux-btrfs@vger.kernel.org, Linus Torvalds , linux-doc-tw-discuss@lists.sourceforge.net, linux-kbuild@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, Feb 28, 2022 at 11:27:43AM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > During a patch discussion, Linus brought up the option of changing > the C standard version from gnu89 to gnu99, which allows using variable > declaration inside of a for() loop. While the C99, C11 and later standards > introduce many other features, most of these are already available in > gnu89 as GNU extensions as well. > > An earlier attempt to do this when gcc-5 started defaulting to > -std=gnu11 failed because at the time that caused warnings about > designated initializers with older compilers. Now that gcc-5.1 is the > minimum compiler version used for building kernels, that is no longer a > concern. Similarly, the behavior of 'inline' functions changes between > gnu89 and gnu11, but this was taken care of by defining 'inline' to > include __attribute__((gnu_inline)) in order to allow building with > clang a while ago. > > 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. > > Nathan Chancellor reported an additional -Wdeclaration-after-statement > warning that appears in a system header on arm, this still needs a > workaround. > > The differences between gnu99, gnu11, gnu1x and gnu17 are fairly > minimal and mainly impact warnings at the -Wpedantic level that the > kernel never enables. Between these, gnu11 is the newest version > that is supported by all supported compiler versions, though it is > only the default on gcc-5, while all other supported versions of > gcc or clang default to gnu1x/gnu17. > > Link: https://lore.kernel.org/lkml/CAHk-=wiyCH7xeHcmiFJ-YgXUy2Jaj7pnkdKpcovt8fYbVFW3TA@mail.gmail.com/ > Link: https://github.com/ClangBuiltLinux/linux/issues/1603 > Suggested-by: Linus Torvalds > Cc: Masahiro Yamada > Cc: linux-kbuild@vger.kernel.org > Cc: llvm@lists.linux.dev > Signed-off-by: Arnd Bergmann > --- > [v2] > - added -std=gnu11 back, rather than just relying on the default > - minor changes to changelog text > --- > Documentation/process/programming-language.rst | 4 ++-- > .../translations/it_IT/process/programming-language.rst | 4 ++-- > .../translations/zh_CN/process/programming-language.rst | 4 ++-- > .../translations/zh_TW/process/programming-language.rst | 4 ++-- > Makefile | 6 +++--- > arch/arm64/kernel/vdso32/Makefile | 2 +- > drivers/gpu/drm/i915/Makefile | 1 + > drivers/staging/greybus/tools/Makefile | 3 ++- > fs/btrfs/Makefile | 1 + > scripts/Makefile.extrawarn | 1 + > 10 files changed, 17 insertions(+), 13 deletions(-) For the greybus tools section: Reviewed-by: Greg Kroah-Hartman 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 0D098C4167D for ; Mon, 28 Feb 2022 10:50:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3C73310E39A; Mon, 28 Feb 2022 10:50:49 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id C083F10E39A; Mon, 28 Feb 2022 10:50:47 +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 257A460A21; Mon, 28 Feb 2022 10:50:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83EF1C340E7; Mon, 28 Feb 2022 10:50:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646045447; bh=RGxEAwdzbR9egvtFInpa3m0a3G+1maC22+8uUJecp+k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=2mr4o0ihvx67u6tNw0ZQeK8ySDxIIZCnqC4Ex4voBp9cJOAwzLtVgodPoUWwqQh6K Pq2Eo6lAjCsN1L0eP39op+X0xNeqTqIOQPRIGAml0Xcl7auXm21Ibxjj/AduI8S862 87O8cic3X/60Za8DC5rd0XOSXhsp77pYqumwDpDM= Date: Mon, 28 Feb 2022 11:50:43 +0100 From: Greg KH To: Arnd Bergmann Message-ID: References: <20220228103142.3301082-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220228103142.3301082-1-arnd@kernel.org> 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-kernel@lists.infradead.org, Michal Marek , linux-doc@vger.kernel.org, Arnd Bergmann , Jonathan Corbet , linux-staging@lists.linux.dev, Masahiro Yamada , llvm@lists.linux.dev, Nick Desaulniers , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, greybus-dev@lists.linaro.org, Alex Shi , Federico Vaga , Hu Haowen , intel-gfx@lists.freedesktop.org, linux-btrfs@vger.kernel.org, Linus Torvalds , linux-doc-tw-discuss@lists.sourceforge.net, linux-kbuild@vger.kernel.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Mon, Feb 28, 2022 at 11:27:43AM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > During a patch discussion, Linus brought up the option of changing > the C standard version from gnu89 to gnu99, which allows using variable > declaration inside of a for() loop. While the C99, C11 and later standards > introduce many other features, most of these are already available in > gnu89 as GNU extensions as well. > > An earlier attempt to do this when gcc-5 started defaulting to > -std=gnu11 failed because at the time that caused warnings about > designated initializers with older compilers. Now that gcc-5.1 is the > minimum compiler version used for building kernels, that is no longer a > concern. Similarly, the behavior of 'inline' functions changes between > gnu89 and gnu11, but this was taken care of by defining 'inline' to > include __attribute__((gnu_inline)) in order to allow building with > clang a while ago. > > 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. > > Nathan Chancellor reported an additional -Wdeclaration-after-statement > warning that appears in a system header on arm, this still needs a > workaround. > > The differences between gnu99, gnu11, gnu1x and gnu17 are fairly > minimal and mainly impact warnings at the -Wpedantic level that the > kernel never enables. Between these, gnu11 is the newest version > that is supported by all supported compiler versions, though it is > only the default on gcc-5, while all other supported versions of > gcc or clang default to gnu1x/gnu17. > > Link: https://lore.kernel.org/lkml/CAHk-=wiyCH7xeHcmiFJ-YgXUy2Jaj7pnkdKpcovt8fYbVFW3TA@mail.gmail.com/ > Link: https://github.com/ClangBuiltLinux/linux/issues/1603 > Suggested-by: Linus Torvalds > Cc: Masahiro Yamada > Cc: linux-kbuild@vger.kernel.org > Cc: llvm@lists.linux.dev > Signed-off-by: Arnd Bergmann > --- > [v2] > - added -std=gnu11 back, rather than just relying on the default > - minor changes to changelog text > --- > Documentation/process/programming-language.rst | 4 ++-- > .../translations/it_IT/process/programming-language.rst | 4 ++-- > .../translations/zh_CN/process/programming-language.rst | 4 ++-- > .../translations/zh_TW/process/programming-language.rst | 4 ++-- > Makefile | 6 +++--- > arch/arm64/kernel/vdso32/Makefile | 2 +- > drivers/gpu/drm/i915/Makefile | 1 + > drivers/staging/greybus/tools/Makefile | 3 ++- > fs/btrfs/Makefile | 1 + > scripts/Makefile.extrawarn | 1 + > 10 files changed, 17 insertions(+), 13 deletions(-) For the greybus tools section: Reviewed-by: Greg Kroah-Hartman 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 D467DC433F5 for ; Mon, 28 Feb 2022 11:02:48 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5JcpQPJZrxYbL7mBnFMNpL+IKHS/psdHMlRXgTyPtDw=; b=arSHXeCq0+vTjC JAuCS1GJfGr9zAblgq2jk0+9aQc+HNwylY7mp5aE4mFt/uSmP3dp/uUiVUcuNp71hQIDmL88uwKL1 EvJfynK+B5TEbPYnKPjS/jsWXkbFTdZAGLiyTr5XCEtyyclDOdLo0mVbT1QOZ39aXtmfhQhBwb5Mu Xl2yMV34IoL0/VIbsFLj9uAcYw1trcP/AhoIWQQESkvwtovlbeIkVVztkJBA5r1EOh3KW46wAQgPf jvrW/y593kQAcALVxAJN1l1yUJM64po696YWh3Mm8JRlvuIk+hm+j/yMzpmqFyhvfIrCCYPDsqrlW DQWFrV6bqeIL1WihrLbw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOdm2-00BejC-KQ; Mon, 28 Feb 2022 11:01:04 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOdc7-00BYLk-Tr for linux-arm-kernel@lists.infradead.org; Mon, 28 Feb 2022 10:50:54 +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 dfw.source.kernel.org (Postfix) with ESMTPS id 257A460A21; Mon, 28 Feb 2022 10:50:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83EF1C340E7; Mon, 28 Feb 2022 10:50:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646045447; bh=RGxEAwdzbR9egvtFInpa3m0a3G+1maC22+8uUJecp+k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=2mr4o0ihvx67u6tNw0ZQeK8ySDxIIZCnqC4Ex4voBp9cJOAwzLtVgodPoUWwqQh6K Pq2Eo6lAjCsN1L0eP39op+X0xNeqTqIOQPRIGAml0Xcl7auXm21Ibxjj/AduI8S862 87O8cic3X/60Za8DC5rd0XOSXhsp77pYqumwDpDM= Date: Mon, 28 Feb 2022 11:50:43 +0100 From: Greg KH To: Arnd Bergmann Cc: linux-kbuild@vger.kernel.org, Arnd Bergmann , Linus Torvalds , Masahiro Yamada , llvm@lists.linux.dev, Jonathan Corbet , Federico Vaga , Alex Shi , Hu Haowen , Michal Marek , Nick Desaulniers , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc-tw-discuss@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-btrfs@vger.kernel.org Subject: Re: [PATCH] [v2] Kbuild: move to -std=gnu11 Message-ID: References: <20220228103142.3301082-1-arnd@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220228103142.3301082-1-arnd@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220228_025048_120000_A9D5E7CE X-CRM114-Status: GOOD ( 30.49 ) 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 11:27:43AM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > During a patch discussion, Linus brought up the option of changing > the C standard version from gnu89 to gnu99, which allows using variable > declaration inside of a for() loop. While the C99, C11 and later standards > introduce many other features, most of these are already available in > gnu89 as GNU extensions as well. > > An earlier attempt to do this when gcc-5 started defaulting to > -std=gnu11 failed because at the time that caused warnings about > designated initializers with older compilers. Now that gcc-5.1 is the > minimum compiler version used for building kernels, that is no longer a > concern. Similarly, the behavior of 'inline' functions changes between > gnu89 and gnu11, but this was taken care of by defining 'inline' to > include __attribute__((gnu_inline)) in order to allow building with > clang a while ago. > > 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. > > Nathan Chancellor reported an additional -Wdeclaration-after-statement > warning that appears in a system header on arm, this still needs a > workaround. > > The differences between gnu99, gnu11, gnu1x and gnu17 are fairly > minimal and mainly impact warnings at the -Wpedantic level that the > kernel never enables. Between these, gnu11 is the newest version > that is supported by all supported compiler versions, though it is > only the default on gcc-5, while all other supported versions of > gcc or clang default to gnu1x/gnu17. > > Link: https://lore.kernel.org/lkml/CAHk-=wiyCH7xeHcmiFJ-YgXUy2Jaj7pnkdKpcovt8fYbVFW3TA@mail.gmail.com/ > Link: https://github.com/ClangBuiltLinux/linux/issues/1603 > Suggested-by: Linus Torvalds > Cc: Masahiro Yamada > Cc: linux-kbuild@vger.kernel.org > Cc: llvm@lists.linux.dev > Signed-off-by: Arnd Bergmann > --- > [v2] > - added -std=gnu11 back, rather than just relying on the default > - minor changes to changelog text > --- > Documentation/process/programming-language.rst | 4 ++-- > .../translations/it_IT/process/programming-language.rst | 4 ++-- > .../translations/zh_CN/process/programming-language.rst | 4 ++-- > .../translations/zh_TW/process/programming-language.rst | 4 ++-- > Makefile | 6 +++--- > arch/arm64/kernel/vdso32/Makefile | 2 +- > drivers/gpu/drm/i915/Makefile | 1 + > drivers/staging/greybus/tools/Makefile | 3 ++- > fs/btrfs/Makefile | 1 + > scripts/Makefile.extrawarn | 1 + > 10 files changed, 17 insertions(+), 13 deletions(-) For the greybus tools section: Reviewed-by: Greg Kroah-Hartman _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel