From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964944AbcBBRMQ (ORCPT ); Tue, 2 Feb 2016 12:12:16 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:59400 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932887AbcBBRMN (ORCPT ); Tue, 2 Feb 2016 12:12:13 -0500 Date: Tue, 2 Feb 2016 17:11:46 +0000 From: Al Viro To: Joe Perches Cc: Ingo Molnar , Wei Tang , akpm@linux-foundation.org, peterz@infradead.org, tj@kernel.org, kirill.shutemov@linux.intel.com, jason.low2@hp.com, xypron.glpk@gmx.de, oleg@redhat.com, koct9i@gmail.com, josh@joshtriplett.org, ebiederm@xmission.com, cyphar@cyphar.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kernel/fork.c: use sizeof() instead of sizeof Message-ID: <20160202171146.GQ17997@ZenIV.linux.org.uk> References: <1454399594-14307-1-git-send-email-tangwei@cmss.chinamobile.com> <20160202091118.GB30393@gmail.com> <20160202154531.GO17997@ZenIV.linux.org.uk> <1454432536.7291.18.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1454432536.7291.18.camel@perches.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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.