lkml.org 
[lkml]   [2015]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: Coding style details (checkpatch)
From
On Fri, Jun 19, 2015 at 12:31 PM, Krzysztof Hałasa <khalasa@piap.pl> wrote:
> Frans Klaver <fransklaver@gmail.com> writes:
>
>>> #define REG8_1(a0) ((const u16[8]){a0, a0 + 1, a0 + 2, a0 + 3})
>>>
>>> vs
>>>
>>> #define REG8_1(a0) ((const u16[8]) {a0, a0 + 1, a0 + 2, a0 + 3})
>>> ^^^^^
>>
>> The prescribed style is to have no space between cast and castee. So,
>> the top option.
>
> Thanks. That's what I thought. It looks that checkpatch doesn't like
> this:
>
> ERROR: space required before the open brace '{'
> +#define REG8_1(a0) ((const u16[8]){a0, a0 + 1, a0 + 2, a0 + 3})
>
> Does this qualify as the "false positive"?

Ah, right. One might say that this is a false positive, but that's up
to Joe or Andy I guess.

It may be valid C code, but I think this construction is slightly
funky to begin with.

Which file is this?

Frans


\
 
 \ /
  Last update: 2015-06-19 13:01    [W:1.215 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site