From: Lance Richardson <lrichard@redhat.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Christopher Li <sparse@chrisli.org>,
Josh Triplett <josh@kernel.org>,
linux-sparse@vger.kernel.org
Subject: Re: dissect: teach do_initializer() to handle the nested EXPR_IDENTIFIER's
Date: Mon, 26 Sep 2016 13:54:52 -0400 [thread overview]
Message-ID: <20160926175450.GA31313@thinkcentre> (raw)
In-Reply-To: <20160208151328.GA24783@redhat.com>
+++ Oleg Nesterov [08/02/16 16:13 +0100]:
>do_initializer() is very limited/buggy but it was able to parse the kernel
>code until ftrace started to use ".a.b = x" rather than ".a = { .b = x }"
>in initializers.
>
>Test-case:
>
> struct O {
> struct I {
> int mem;
> } inn;
> int end;
> } var = {
> .inn.mem = 0,
> 0,
> };
>
>before the patch:
>
> 1:8 s def O
> 2:16 s def I
> 6:3 g def var struct O
> 6:3 g -w- var struct O
> 7:10 s -w- O.inn struct I
> 7:10 s -w- I.* struct I
> I.c:7:14: warning: bad expr->type: 25
> 8:9 s -w- O.end int
>
>after:
>
> 1:8 s def O
> 2:16 s def I
> 6:3 g def var struct O
> 6:3 g -w- var struct O
> 7:10 s -w- O.inn struct I
> 7:14 s -w- I.mem int
> 8:9 s -w- O.end int
>
>Signed-off-by: Oleg Nesterov <oleg@redhat.com>
>---
LGTM, builds and test case works as expected.
Acked-by: Lance Richardson <lrichard@redhat.com>
next prev parent reply other threads:[~2016-09-26 17:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-08 15:13 [PATCH] dissect: teach do_initializer() to handle the nested EXPR_IDENTIFIER's Oleg Nesterov
2016-09-26 17:54 ` Lance Richardson [this message]
2016-11-02 14:19 ` Luc Van Oostenryck
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=20160926175450.GA31313@thinkcentre \
--to=lrichard@redhat.com \
--cc=josh@kernel.org \
--cc=linux-sparse@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=sparse@chrisli.org \
/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;
as well as URLs for NNTP newsgroup(s).