From: Paul Bolle <pebolle@tiscali.nl>
To: Martin Walch <walch.martin@web.de>
Cc: yann.morin.1998@free.fr, linux-kbuild@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] kconfig: trivial - adjust comments
Date: Fri, 10 Oct 2014 15:01:42 +0200 [thread overview]
Message-ID: <1412946102.2037.13.camel@x220> (raw)
In-Reply-To: <1411405999-20212-3-git-send-email-walch.martin@web.de>
Hi Martin,
I haven't yet dared to review 1/2, which is the interesting change. So I
cheated and skipped to 2/2.
On Mon, 2014-09-22 at 19:13 +0200, Martin Walch wrote:
> Replace any C99 comments with traditional ones (/*...*/).
Perhaps you could split those changes off in a separate, trivial patch.
> Also fix the contents of two comments:
>
> 1) the second occurrence of
> (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b'
> is probably copy & paste from above, missing the adjustment corresponding
> to the code.
> It should probably read
> (a!='b') && (a='c') -> 'b'='c' ? 'n' : a='c'
>
> 2) that one is similar:
> (a!='m') && (a!='n') -> (a='m')
> it should be
> (a!='m') && (a!='n') -> (a='y')
And perhaps even send these two changes as two separate patches. Not
sure, as I don't review much, but it should make it easier to review.
> Signed-off-by: Martin Walch <walch.martin@web.de>
> ---
> scripts/kconfig/expr.c | 38 +++++++++++++++++++-------------------
> 1 file changed, 19 insertions(+), 19 deletions(-)
>
> diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c
> index 4aa171b..c840e52 100644
> --- a/scripts/kconfig/expr.c
> +++ b/scripts/kconfig/expr.c
> [...]
> if (sym1->type == S_TRISTATE) {
> if (e1->type == E_EQUAL && e2->type == E_UNEQUAL) {
> - // (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b'
> + /* (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' */
Could you make this match the code? Ie,
/* (a='b') && (a!='c') -> 'b'!='c' ? a='b' : 'n' */
if I'm reading the code right.
> sym2 = e1->right.sym;
> if ((e2->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST))
> return sym2 != e2->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2)
> : expr_alloc_symbol(&symbol_no);
> }
> if (e1->type == E_UNEQUAL && e2->type == E_EQUAL) {
> - // (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b'
> + /* (a!='b') && (a='c') -> 'b'='c' ? 'n' : a='c' */
Likewise:
/* (a!='b') && (a='c') -> 'b'!='c' ? a='c' : 'n' */
> sym2 = e2->right.sym;
> if ((e1->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST))
> return sym2 != e1->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2)
(You could also make the code match the comments. But that would make
the patch less trivial.)
Paul Bolle
next prev parent reply other threads:[~2014-10-10 13:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-10 14:31 [RESEND PATCH v2 0/2] kconfig: Remove bad inference rules expr_eliminate_dups2() Martin Walch
2014-09-22 17:13 ` [Resending PATCH v2 0/2] kconfig: fix bad syntactic transformation Martin Walch
2014-09-22 17:13 ` [PATCH v2 1/2] kconfig: fix bad syntactic transformation in expr.c Martin Walch
2014-10-07 8:10 ` Paul Bolle
2014-10-07 9:21 ` Dirk Gouders
2014-10-11 0:20 ` Martin Walch
2014-10-11 19:07 ` Paul Bolle
2014-09-22 17:13 ` [PATCH v2 2/2] kconfig: trivial - adjust comments Martin Walch
2014-10-10 13:01 ` Paul Bolle [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-04-18 21:34 Martin Walch
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=1412946102.2037.13.camel@x220 \
--to=pebolle@tiscali.nl \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=walch.martin@web.de \
--cc=yann.morin.1998@free.fr \
/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