From: Petr Vorel <petr.vorel@gmail.com>
To: Paul Bolle <pebolle@tiscali.nl>
Cc: Randy Dunlap <rdunlap@infradead.org>, linux-kbuild@vger.kernel.org
Subject: Re: [PATCH v2 1/1] kconfig: menuconfig make "selected by:" readable
Date: Wed, 28 Oct 2015 03:38:13 +0100 [thread overview]
Message-ID: <20151028023812.GA27149@t61> (raw)
In-Reply-To: <1445245133.2581.22.camel@tiscali.nl>
> > Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
> > ---
> You want to have that line there because the above text will be dropped
> by the git tools (because it comes are after a --- marker, which signals
> "end of commit explanation"). Note that the text, which I think was
> written by me, was basically a comment. Ie, because it came after that
> marker I used it to say things that I thought were not appropriate for a
> commit explanation.
Thanks for explanation, I'll fix my Signed-off-by: in v3. And also clean up comments.
> > --- a/scripts/kconfig/expr.c
> > +++ b/scripts/kconfig/expr.c
> > @@ -1070,7 +1070,7 @@ struct expr *expr_simplify_unmet_dep(struct expr
> > -void expr_print(struct expr *e, void (*fn)(void *, struct symbol *,
> > const char *), void *data, int prevtoken)
> > +static void expr_print_impl(struct expr *e, void (*fn)(void *, struct
> What does _impl stand for?
_impl is for implementation. I didn't want to add new parameter which is meaningless to
most of expr_print() calls, so I created wrapper function. Ugly approach, I know.
> > @@ -1125,9 +1125,12 @@ void expr_print(struct expr *e, void (*fn)(void
> > case E_OR:
> > - expr_print(e->left.expr, fn, data, E_OR);
> > - fn(data, NULL, " || ");
> > - expr_print(e->right.expr, fn, data, E_OR);
> > + expr_print_impl(e->left.expr, fn, data, E_OR,
> revdep);
> > + if (revdep)
> > + fn(data, NULL, "\n - ");
> > + else
> > + fn(data, NULL, " || ");
> > + expr_print_impl(e->right.expr, fn, data, E_OR,
> revdep);
> > break;
> > case E_AND:
> > expr_print(e->left.expr, fn, data, E_AND);
> Lazy question: will the "-" only be printed for the _top level_ E_OR
> expressions in "Selected by:" lines?
Well, I don't check for it in the code. But IMHO all non top level E_OR expressions are in
parentheses, which aren't split by "-". So, yes.
Anyway, do you have an example of non top level E_OR, which is not in parentheses?
Kind regards,
Petr
prev parent reply other threads:[~2015-10-28 2:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 20:20 [PATCH v2 1/1] kconfig: menuconfig make "selected by:" readable Petr Vorel
2015-10-19 8:58 ` Paul Bolle
2015-10-28 2:38 ` Petr Vorel [this message]
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=20151028023812.GA27149@t61 \
--to=petr.vorel@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=pebolle@tiscali.nl \
--cc=rdunlap@infradead.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).