From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: WangYuli <wangyuli@uniontech.com>,
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: Fri, 1 Aug 2025 09:50:58 +0100 [thread overview]
Message-ID: <27488afa-1d53-43eb-bc68-8e950d804000@lucifer.local> (raw)
In-Reply-To: <20baf9ac-9328-4110-97f1-91e9e76b8914@suse.cz>
On Fri, Aug 01, 2025 at 10:04:11AM +0200, Vlastimil Babka wrote:
> On 8/1/25 07:57, WangYuli wrote:
> > Hi all,
> >
> > On 2025/8/1 13:14, Lorenzo Stoakes wrote:
> >> WangYuli - could you check? If it's as simple as this, feel free to send a patch
> >> making this change.
> >>
> >> Thanks, Lorenzo
> >>
> > It's not that simple, of course... That didn't work.
>
> Yeah seems I can reproduce it with gcc-7.5 and it doesn't work.
I think we should still add this though to make it consistent with the rest
of the kernel.
>
> I think there is a difference with the other instances of omitted names
> found by grep as Lorenzo suggested earlier - those seem to all be
> declarations. But here in vma_internal.h they are (empty) static inline
> definitions.
Yep this seems to be the difference.
>
> Seems like newer gcc versions got more lenient. Haven't found why, but seems
> they want it to stay like this:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113825
>
> But I don't know if there's a way to make older gcc's lenient too.
>
> > I'll take another look.
> >
> > Thanks,
> >
>
WangYuli - apologies - this is my fault entirely, I misunderstood things
here.
I was wrong to dismiss this out of hand, I guess not many headers are doing
stubs like this, and I mistook this as being a general thing.
Could you please do a v2 where you add back in parameter names (and add
this compiler flag - I think we still should), but could you do me a favour
and also fixup some horrid stuff here?
I have functions like:
static inline void vma_adjust_trans_huge(struct vm_area_struct *vma,
unsigned long start,
unsigned long end,
struct vm_area_struct *next)
{
(void)vma;
(void)start;
(void)end;
(void)next;
}
Where I am trying to avoid 'unused param' warnings which... won't actually
arise.
So could you eliminate all these horrid (void) things as well ass adding
parameter names?
That'd be really helpful, thanks!
Cheers, Lorenzo
next prev parent reply other threads:[~2025-08-01 8:51 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
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 [this message]
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=27488afa-1d53-43eb-bc68-8e950d804000@lucifer.local \
--to=lorenzo.stoakes@oracle.com \
--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=niecheng1@uniontech.com \
--cc=pfalcato@suse.de \
--cc=vbabka@suse.cz \
--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
all inboxes | Powered by JetHome®