linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
	WangYuli <wangyuli@uniontech.com>
Cc: akpm@linux-foundation.org, Liam.Howlett@oracle.com,
	jannh@google.com, pfalcato@suse.de, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, niecheng1@uniontech.com,
	guanwentao@uniontech.com, Jun Zhan <zhanjun@uniontech.com>,
	linux-kbuild@vger.kernel.org
Subject: Re: [PATCH] tools/testing/vma: Fix function parameter declarations for GCC 8.3 compatibility
Date: Thu, 31 Jul 2025 20:13:55 +0200	[thread overview]
Message-ID: <d31803bb-fb32-4a94-aa89-83b02757d650@suse.cz> (raw)
In-Reply-To: <37b606a7-17c6-4865-a78a-ddde1bc15649@lucifer.local>

On 7/31/25 12:24, Lorenzo Stoakes wrote:
> On Thu, Jul 31, 2025 at 10:55:32AM +0800, WangYuli wrote:
>> >
>> Thanks for the heads-up! I noticed that coding style in the kernel code as
>> well.
>>
>> However, GCC 8.3 (which does meet the kernel's compiler version
>> requirements) can compile the kernel code normally, but it can't compile
>> vma's test correctly.
>>
>> Could the issue be related to differences in compilation parameters? I'll
>> need to spend some time looking into this more closely...
> 
> OK thanks please do check, am happy to have a patch to add a flag if
> appropriate! :)
> 
>>
>> By the way, this coding style has been a GNU C extension until the ISO C23
>> standard. So, until the kernel's C language standard is upgraded to C23
>> (which seems unlikely to happen anytime soon, perhaps years down the line),
>> it actually makes sense to modify this style for a practical purpose...
> 
> Kernel always uses the GNU C standard by convention, so we should be good,
> but indeed I think this is the case!

I think it's not "by convention" but quite explicitly by:

Makefile:KBUILD_CFLAGS += -std=gnu11

I think this is not automatically used by tools/ build?

If you git grep gnu11, you'll find various Makefile's under tools/ adding
that to CFLAGS. Maybe we can simply do that also with
tools/testing/shared/shared.mk
that's included for the vma tests.

I don't have this gcc version so can't try myself if it helps.

> The irony here is that I actually intend to change stubs in this header to
> remove parameter names (previously had review on this :).
> 
>>
>> [ Cc the kbuild list. ]
> 
> Thanks
> 
>>
>> Thanks,
>>
>> --
>> WangYuli
> 
> Cheers, Lorenzo



  reply	other threads:[~2025-07-31 18:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-29  8:47 WangYuli
2025-07-29  9:06 ` Lorenzo Stoakes
2025-07-31  2:55   ` WangYuli
2025-07-31 10:24     ` Lorenzo Stoakes
2025-07-31 18:13       ` Vlastimil Babka [this message]
2025-08-01  5:14         ` Lorenzo Stoakes
2025-08-01  5:57           ` WangYuli
2025-08-01  8:04             ` Vlastimil Babka
2025-08-01  8:50               ` Lorenzo Stoakes
2025-08-01  9:22                 ` Vlastimil Babka
2025-08-01  9:26                 ` WangYuli
2025-08-01  9:33                   ` Lorenzo Stoakes
2025-08-01  9:48                     ` Vlastimil Babka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d31803bb-fb32-4a94-aa89-83b02757d650@suse.cz \
    --to=vbabka@suse.cz \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=guanwentao@uniontech.com \
    --cc=jannh@google.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=niecheng1@uniontech.com \
    --cc=pfalcato@suse.de \
    --cc=wangyuli@uniontech.com \
    --cc=zhanjun@uniontech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox