[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1508327383.6806.7.camel@perches.com>
Date: Wed, 18 Oct 2017 04:49:43 -0700
From: Joe Perches <joe@...ches.com>
To: SF Markus Elfring <elfring@...rs.sourceforge.net>,
linux-integrity@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Cc: Julia Lawall <julia.lawall@...6.fr>,
Alexander.Steffen@...ineon.com,
James Bottomley <James.Bottomley@...senPartnership.com>,
Dan Carpenter <dan.carpenter@...cle.com>,
Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Corentin Labbe <clabbe.montjoie@...il.com>,
Jason Gunthorpe <jgunthorpe@...idianresearch.com>,
Jerry Snitselaar <jsnitsel@...hat.com>,
Kenneth Goldman <kgold@...ux.vnet.ibm.com>,
Michael Ellerman <mpe@...erman.id.au>,
Nayna Jain <nayna@...ux.vnet.ibm.com>,
Paul Mackerras <paulus@...ba.org>,
Peter Hüwe <PeterHuewe@....de>,
Stefan Berger <stefanb@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: Adjusting further size determinations?
On Wed, 2017-10-18 at 13:00 +0200, SF Markus Elfring wrote:
> > Ugly grep follows:
> >
> > $ grep -rohP --include=*.[ch] "\w+\s*=\s*[kv].alloc\s*\(\s*sizeof.*," * | \
> > sed -r -e 's/(\w+)\s*=\s*[kv].alloc\s*\(\s*sizeof\s*\(\s*\*\s*\1\s*\)/foo = k.alloc(sizeof(*foo))/' \
> > -e 's/(\w+)\s*=\s*[kv].alloc\s*\(\s*sizeof\s*\(\s*struct\s+\w+\s*\)/foo = k.alloc(sizeof(struct foo))/' | \
> > sort | uniq -c | sort -rn | head -2
> > 6123 foo = k.alloc(sizeof(*foo)),
> > 3060 foo = k.alloc(sizeof(struct foo)),
>
> Would you like to get this ratio changed in any ways?
No.
> Available development tools could help to improve the software situation
> in a desired direction, couldn't they?
> > > Unpleasant consequences are possible in both cases.
> How much do you care to reduce the failure probability further?
Zero.
The alloc style is trivially useful for new code.
Existing code doesn't need change.
Powered by blists - more mailing lists