[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGG-pUQzNRVrststc6+ckXQhM3cnQoUQb+1RDVtsc0HmxL6cCA@mail.gmail.com>
Date: Tue, 5 Jan 2016 12:16:53 -0300
From: "Geyslan G. Bem" <geyslan@...il.com>
To: Joe Perches <joe@...ches.com>
Cc: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Alan Stern <stern@...land.harvard.edu>,
LKML <linux-kernel@...r.kernel.org>, linux-usb@...r.kernel.org
Subject: Re: [PATCH 08/17] usb: host: ehci-dbg: remove unnecessary space after cast
2016-01-04 23:40 GMT-03:00 Joe Perches <joe@...ches.com>:
> On Mon, 2016-01-04 at 19:07 -0300, Geyslan G. Bem wrote:
>> 2016-01-04 18:52 GMT-03:00 Sergei Shtylyov :
>> > > > > > This patch fixes coding style issues reported by checkpatch concerning
>> > > > > > to unnecessary space after a cast.
>> > > > > This is a case where checkpatch is wrong, IMO. Casts should always be
>> > > > > followed by a space. I will not accept this patch.
>
> Your choice, but most kernel code disagrees with you.
>
> measuring only kernel casts to a pointer, (because there are
> too many false positives otherwise) casts without a space
> are preferred ~3:1 over casts followed by a space.
>
> (without space)
> $ grep -rP --include=*.[ch] -oh "\(\s*(\w{3,}\s+){0,2}\w{3,}\s*\*+\s*\)\w+" * | \
> sort|cut -f1 -d")"| sed 's/$/)/' | wc -l
> 36612
>
> (with space)
> $ grep -rP --include=*.[ch] -oh "\(\s*(\w{3,}\s+){0,2}\w{3,}\s*\*+\s*\)[ \t]\w+" * | \
> sort|cut -f1 -d")"| sed 's/$/)/' | wc -l
> 13233
FWIW I really don't have a side here since it's not defined in Coding
Style. Please disregard this patch.
--
Regards,
Geyslan G. Bem
hackingbits.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists