[lkml]   [2006]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] drivers: Conversions from kmalloc+memset to k(z|c)alloc.
On Sun, 23 Jul 2006, Alexey Dobriyan wrote:
>> Again: using indent mainly will mean only one time massive changes.
> True, 180M(!) of them.

And this is so huge now because seems there is no obligation use common
format .. all is formated using hands/mind/difftent editors autoformaters.

>> After
>> this ident can be runed for example by Linus just before make release
>> and/or partial release.
> ~4M per run.

If patch submmitter will use formating tool and it will add it will statr
work on formated source tree it will be 0M per run.

>>> scripts/Lindent exists and gets used, but it is not perfect.
> Correction: GNU indent exists and gets used, but it is not perfect.

Yes .. and produce by Lindent ~160MB patch it excelent proof how offent is
is used now :>
(please stop this crap "argumentation" :>)

> Last time I checked BSD indent don't have some option Lindent use.
> forgot which.

Any problems with use BDS indent instead GNU ?

>> Again: anywhere are listed/was posted list of "not perfect" examples ?
> OOhhhh, please do
> find . -type f -name '*.[ch]' | xargs ./scripts/Lindent
> on any large C codebase.

Runing above on linux- tree produces 248 errors mainly because was
used *bad coding style*. I.e. by keep in distribution tree some strange
pieces of code like:

#if 0
if () {
if () {


>> And/or: what does it mean in this case "not perfect" ?
>> Show this for
>> allow start work on fix indent by other people (if all cases will be resul
>> of some bugs in this tool).
> Start fixing indent(1) if you're serious about all this. There are
> _plenty_ of C code flying around.

IMO .. first will be good xcleanup some Linux code by remove some to many
multiple using C preprocessor stantments which seems is now main cause
why indent can be used.
Current linux- tree have 16028 *.[ch] files.
Gnu indet produces errors on:

[linux-]$ find -name \*.c -o -name \*.h | xargs indent -npro -kr \
-i8 -ts8 -sob -l80 -ss -ncs 2>&1 | awk '{print $2}' | awk -F: \
'{print $1}' | sort | uniq | wc -l

*76 files*

Again: using indent requires keep code in some order. General "Coding
Style" is list of rules. It will be now add one new simple rule "keep code
in form which allow use indent without producing errors".

Below list of files on which now indent produces orrors (from


*Ludzie nie mają problemów, tylko sobie sami je stwarzają*
Tomasz Kłoczko, sys adm|*e-mail:*
 \ /
  Last update: 2006-07-23 19:57    [W:0.069 / U:1.288 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site