lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 10 Oct 2014 15:01:42 +0200
From:	Paul Bolle <pebolle@...cali.nl>
To:	Martin Walch <walch.martin@....de>
Cc:	yann.morin.1998@...e.fr, linux-kbuild@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] kconfig: trivial - adjust comments

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@....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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ