Re: [PATCH] kernel/fork.c: use sizeof() instead of sizeof

2016-02-02 Thread Al Viro
On Tue, Feb 02, 2016 at 10:46:07PM -0500, Kevin Easton wrote: > On Tue, Feb 02, 2016 at 05:04:06PM +, Al Viro wrote: > > the rules for ++ and -- might as well have been ++ postfix-expression and > > -- postfix-expression resp. > > Unless I'm mistaken, * cast-expression yields an lvalue. D'oh

Re: [PATCH] kernel/fork.c: use sizeof() instead of sizeof

2016-02-02 Thread Kevin Easton
On Tue, Feb 02, 2016 at 05:04:06PM +, Al Viro wrote: > FWIW, the actual rules are > unary-expression: postfix-expression | > ++ unary-expression | > -- unary-expression | > - cast-expression | >

Re: [PATCH] kernel/fork.c: use sizeof() instead of sizeof

2016-02-02 Thread Joe Perches
On Tue, 2016-02-02 at 17:11 +, Al Viro wrote: > On Tue, Feb 02, 2016 at 09:02:16AM -0800, Joe Perches wrote: > > On Tue, 2016-02-02 at 15:45 +, Al Viro wrote: > > > On Tue, Feb 02, 2016 at 10:11:18AM +0100, Ingo Molnar wrote: > > > > * Wei Tang wrote: > > [] > > > > > WARNING: sizeof sig->

Re: [PATCH] kernel/fork.c: use sizeof() instead of sizeof

2016-02-02 Thread Al Viro
On Tue, Feb 02, 2016 at 09:02:16AM -0800, Joe Perches wrote: > On Tue, 2016-02-02 at 15:45 +, Al Viro wrote: > > On Tue, Feb 02, 2016 at 10:11:18AM +0100, Ingo Molnar wrote: > > > * Wei Tang wrote: > [] > > > > WARNING: sizeof sig->rlim should be sizeof(sig->rlim) > [] > > > If anyone feels st

Re: [PATCH] kernel/fork.c: use sizeof() instead of sizeof

2016-02-02 Thread Al Viro
On Tue, Feb 02, 2016 at 03:56:01PM +, Aleksa Sarai wrote: > I haven't looked at the order of operations for sizeof, but I imagine > there's cases where it might bind in a different way than is expected. Are > you sure there'd be no negative downside to removing the check (the whole > point is

Re: [PATCH] kernel/fork.c: use sizeof() instead of sizeof

2016-02-02 Thread Joe Perches
On Tue, 2016-02-02 at 15:45 +, Al Viro wrote: > On Tue, Feb 02, 2016 at 10:11:18AM +0100, Ingo Molnar wrote: > > * Wei Tang wrote: [] > > > WARNING: sizeof sig->rlim should be sizeof(sig->rlim) [] > > If anyone feels strongly about accepting such patches, then the right > > solution isĀ  > > t

Re: [PATCH] kernel/fork.c: use sizeof() instead of sizeof

2016-02-02 Thread Al Viro
On Tue, Feb 02, 2016 at 10:11:18AM +0100, Ingo Molnar wrote: > > * Wei Tang wrote: > > > This patch fixes the checkpatch.pl warning to fork.c: > > > > WARNING: sizeof sig->rlim should be sizeof(sig->rlim) > > > > Signed-off-by: Wei Tang > > --- > > kernel/fork.c | 2 +- > > 1 file changed, 1

Re: [PATCH] kernel/fork.c: use sizeof() instead of sizeof

2016-02-02 Thread Ingo Molnar
* Wei Tang wrote: > This patch fixes the checkpatch.pl warning to fork.c: > > WARNING: sizeof sig->rlim should be sizeof(sig->rlim) > > Signed-off-by: Wei Tang > --- > kernel/fork.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/fork.c b/kernel/fork.c > inde

[PATCH] kernel/fork.c: use sizeof() instead of sizeof

2016-02-01 Thread Wei Tang
This patch fixes the checkpatch.pl warning to fork.c: WARNING: sizeof sig->rlim should be sizeof(sig->rlim) Signed-off-by: Wei Tang --- kernel/fork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/fork.c b/kernel/fork.c index 2e391c7..30e04d2 100644 --- a/kernel/fork