[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a92cb1a6-6b58-6cd5-5629-d9c3f3d28a19@arm.com>
Date: Sun, 16 Feb 2020 23:38:46 +0000
From: Valentin Schneider <valentin.schneider@....com>
To: Joe Perches <joe@...ches.com>,
Peter Zijlstra <peterz@...radead.org>,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>
Cc: Ingo Molnar <mingo@...hat.com>, Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched/fair: Replace zero-length array with flexible-array
member
On 14/02/2020 02:05, Joe Perches wrote:
> Nice.
> It would miss a few forms like:
>
> typedef struct tagfoo {
> ...
> type t[0];
> } foo;
>
> and
>
> struct {
> ...
> type t[0];
> } foo;
>
> and
>
> struct foo {
> ...
> type t[0];
> } *foo;
>
> etc...
>
>
Right! Digging around for some examples on handling typedefs & co I stumbled
on this construct:
T {
<blah>
};
This matches your typedef case, but none of the other two. I haven't found
a nice way to match them without listing down some special cases, which I
don't really like.
I might dig around sometime to figure out how this should be expressed; in
the meantime a simple 'grep -r "\[0\];"' will most likely yield faster results
(for hunting down ZLAs, that is).
Powered by blists - more mailing lists