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 D2524ED1; Mon, 16 May 2022 13:31:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE183C385AA; Mon, 16 May 2022 13:31:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652707866; bh=ptJJdl6/90C/9ngs0R9TLu4hatZEKH+NyjqZBwan/o8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DZdQ9mfTQBflmQWi4epCej7EPYBxF8pZ7ebsvN/YIJF+sYxkmOOFEk2UPrsR8cEht 3uUxwAXuxDSNr9DxG7VT5s0In462yrkGVBwDmjy5o3BYTodwXeF+/Aae318fGsFIdD i6z511NzSGuxWHwP1TkBEGg+0ZsPsSzYb/5QWego= Date: Mon, 16 May 2022 15:31:03 +0200 From: Greg KH To: Guenter Roeck Cc: Arnd Bergmann , 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: [greybus-dev] Re: [PATCH] [v2] Kbuild: move to -std=gnu11 Message-ID: References: <20220228103142.3301082-1-arnd@kernel.org> <20220516131023.GA2329080@roeck-us.net> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220516131023.GA2329080@roeck-us.net> On Mon, May 16, 2022 at 06:10:23AM -0700, Guenter Roeck wrote: > 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. > > The downside is that backporting affected patches to older kernel branches > now fails with error messages such as > > mm/kfence/core.c: In function ‘kfence_init_pool’: > mm/kfence/core.c:595:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode > > Just something to keep in mind when writing patches. I just ran across this very issue on this commit. It's an easy fixup for 5.17.y to make this work, so I did that in my tree. If this gets to be too much, we might need to reconsider adding c11 to older stable kernels. thanks, greg k-h 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 7474CC433EF for ; Mon, 16 May 2022 13:31:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AA3B81121C1; Mon, 16 May 2022 13:31:10 +0000 (UTC) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by gabe.freedesktop.org (Postfix) with ESMTPS id D9A1F1121C1; Mon, 16 May 2022 13:31:09 +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 ams.source.kernel.org (Postfix) with ESMTPS id BAB16B81203; Mon, 16 May 2022 13:31:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE183C385AA; Mon, 16 May 2022 13:31:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652707866; bh=ptJJdl6/90C/9ngs0R9TLu4hatZEKH+NyjqZBwan/o8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DZdQ9mfTQBflmQWi4epCej7EPYBxF8pZ7ebsvN/YIJF+sYxkmOOFEk2UPrsR8cEht 3uUxwAXuxDSNr9DxG7VT5s0In462yrkGVBwDmjy5o3BYTodwXeF+/Aae318fGsFIdD i6z511NzSGuxWHwP1TkBEGg+0ZsPsSzYb/5QWego= Date: Mon, 16 May 2022 15:31:03 +0200 From: Greg KH To: Guenter Roeck Subject: Re: [greybus-dev] Re: [PATCH] [v2] Kbuild: move to -std=gnu11 Message-ID: References: <20220228103142.3301082-1-arnd@kernel.org> <20220516131023.GA2329080@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220516131023.GA2329080@roeck-us.net> 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: Arnd Bergmann , Michal Marek , linux-doc@vger.kernel.org, Arnd Bergmann , linux-kbuild@vger.kernel.org, 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, linux-arm-kernel@lists.infradead.org, Federico Vaga , Hu Haowen , intel-gfx@lists.freedesktop.org, Jonathan Corbet , linux-btrfs@vger.kernel.org, Linus Torvalds , linux-doc-tw-discuss@lists.sourceforge.net, Alex Shi Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, May 16, 2022 at 06:10:23AM -0700, Guenter Roeck wrote: > 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. > > The downside is that backporting affected patches to older kernel branches > now fails with error messages such as > > mm/kfence/core.c: In function ‘kfence_init_pool’: > mm/kfence/core.c:595:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode > > Just something to keep in mind when writing patches. I just ran across this very issue on this commit. It's an easy fixup for 5.17.y to make this work, so I did that in my tree. If this gets to be too much, we might need to reconsider adding c11 to older stable kernels. thanks, greg k-h 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 6DBB4C433EF for ; Mon, 16 May 2022 13:31:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 870BA1121DA; Mon, 16 May 2022 13:31:11 +0000 (UTC) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by gabe.freedesktop.org (Postfix) with ESMTPS id D9A1F1121C1; Mon, 16 May 2022 13:31:09 +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 ams.source.kernel.org (Postfix) with ESMTPS id BAB16B81203; Mon, 16 May 2022 13:31:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE183C385AA; Mon, 16 May 2022 13:31:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652707866; bh=ptJJdl6/90C/9ngs0R9TLu4hatZEKH+NyjqZBwan/o8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DZdQ9mfTQBflmQWi4epCej7EPYBxF8pZ7ebsvN/YIJF+sYxkmOOFEk2UPrsR8cEht 3uUxwAXuxDSNr9DxG7VT5s0In462yrkGVBwDmjy5o3BYTodwXeF+/Aae318fGsFIdD i6z511NzSGuxWHwP1TkBEGg+0ZsPsSzYb/5QWego= Date: Mon, 16 May 2022 15:31:03 +0200 From: Greg KH To: Guenter Roeck Message-ID: References: <20220228103142.3301082-1-arnd@kernel.org> <20220516131023.GA2329080@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220516131023.GA2329080@roeck-us.net> Subject: Re: [Intel-gfx] [greybus-dev] Re: [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: Arnd Bergmann , Michal Marek , linux-doc@vger.kernel.org, Arnd Bergmann , linux-kbuild@vger.kernel.org, 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, linux-arm-kernel@lists.infradead.org, Federico Vaga , Hu Haowen , intel-gfx@lists.freedesktop.org, Jonathan Corbet , linux-btrfs@vger.kernel.org, Linus Torvalds , linux-doc-tw-discuss@lists.sourceforge.net, Alex Shi Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Mon, May 16, 2022 at 06:10:23AM -0700, Guenter Roeck wrote: > 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. > > The downside is that backporting affected patches to older kernel branches > now fails with error messages such as > > mm/kfence/core.c: In function ‘kfence_init_pool’: > mm/kfence/core.c:595:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode > > Just something to keep in mind when writing patches. I just ran across this very issue on this commit. It's an easy fixup for 5.17.y to make this work, so I did that in my tree. If this gets to be too much, we might need to reconsider adding c11 to older stable kernels. thanks, greg k-h 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 5EC0DC433F5 for ; Mon, 16 May 2022 13:32:25 +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=QG/sh97AvGXKv+Sf91a3fgiIedo7BCLnXJ7QK2ltYD4=; b=ETw2bt+I5R0aNy uzxw948JlcnmjZjLmLIhGNUq2ABwoZBr4zd4OXvxzVRq+kyGtRTUMKg67PRT3BFZ6LqEPy6mW0LVt agjXf2//F50z5Znd2tlgCAUNcOD0//gmqfN4fwJbULyU6DJCxRF0ZkeuYE6Fo6iwwaIc68GZZ7vk1 yNhit67pC+qYrunijPGUIBsWkXoFPXOH3uFA56aGPIjaGAz0SXJoCANXzXm3cSN3KNd1Kcu27x+Be qyjy+k6F+efmEZbUg3eA70Cgw/xT/GW6fFpnYq6Cfz0B2hccOTOpQdsCLhFl5CXJZzlyoxCSZhHbW Cex4CtajV7vtf1wm8Rtw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqaoc-007yAT-6y; Mon, 16 May 2022 13:31:14 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqaoZ-007y99-0s for linux-arm-kernel@lists.infradead.org; Mon, 16 May 2022 13:31:12 +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 BAB16B81203; Mon, 16 May 2022 13:31:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE183C385AA; Mon, 16 May 2022 13:31:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652707866; bh=ptJJdl6/90C/9ngs0R9TLu4hatZEKH+NyjqZBwan/o8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DZdQ9mfTQBflmQWi4epCej7EPYBxF8pZ7ebsvN/YIJF+sYxkmOOFEk2UPrsR8cEht 3uUxwAXuxDSNr9DxG7VT5s0In462yrkGVBwDmjy5o3BYTodwXeF+/Aae318fGsFIdD i6z511NzSGuxWHwP1TkBEGg+0ZsPsSzYb/5QWego= Date: Mon, 16 May 2022 15:31:03 +0200 From: Greg KH To: Guenter Roeck Cc: Arnd Bergmann , 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: [greybus-dev] Re: [PATCH] [v2] Kbuild: move to -std=gnu11 Message-ID: References: <20220228103142.3301082-1-arnd@kernel.org> <20220516131023.GA2329080@roeck-us.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220516131023.GA2329080@roeck-us.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220516_063111_241215_7A8DE286 X-CRM114-Status: GOOD ( 19.68 ) 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="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org T24gTW9uLCBNYXkgMTYsIDIwMjIgYXQgMDY6MTA6MjNBTSAtMDcwMCwgR3VlbnRlciBSb2VjayB3 cm90ZToKPiBPbiBNb24sIEZlYiAyOCwgMjAyMiBhdCAxMToyNzo0M0FNICswMTAwLCBBcm5kIEJl cmdtYW5uIHdyb3RlOgo+ID4gRnJvbTogQXJuZCBCZXJnbWFubiA8YXJuZEBhcm5kYi5kZT4KPiA+ IAo+ID4gRHVyaW5nIGEgcGF0Y2ggZGlzY3Vzc2lvbiwgTGludXMgYnJvdWdodCB1cCB0aGUgb3B0 aW9uIG9mIG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