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

From: Al Viro
Date: Tue Feb 02 2016 - 12:12:21 EST


On Tue, Feb 02, 2016 at 09:02:16AM -0800, Joe Perches wrote:
> On Tue, 2016-02-02 at 15:45 +0000, Al Viro wrote:
> > On Tue, Feb 02, 2016 at 10:11:18AM +0100, Ingo Molnar wrote:
> > > * Wei Tang <tangwei@xxxxxxxxxxxxxxxxxxxx> wrote:
> []
> > > > WARNING: sizeof sig->rlim should be sizeof(sig->rlim)
> []
> > > If anyone feels strongly about accepting such patches, then the right solution is 
> > > to create a Coccinelle semantic patch to run over the whole kernel and get over 
> > > with the churn once and for all.
> >
> > That, or a single patch taking that piece of idiocy out of checkpatch.pl...
>
> https://lkml.org/lkml/2012/7/11/103

Umm... Matter of taste, really - and I don't quite agree about "should think
of sizeof() as a function, not as some ass-backwards special case C parsing
rule that is subtle as hell". I've seen enough folks getting confused about
treatment of arrays; confusion between sizeof uses and function calls often
contributed to that.