various coding style details
- Fixed style error: Missing space before the open parenthesis
- Fixed style warnings: 2x Missing blank line after declaration
One warning left: else after return
(I don't feel comfortable fixing that without side effects)
Signed-off-by: Mario Leinweber
Cc:
Joe Perches writes:
> #define VDREG8(a0) ((const u16[]){\
> a0 + 0x000, a0 + 0x010, a0 +0x020, a0 + 0x030, \
> a0 + 0x100, a0 + 0x110, a0 +0x120, a0 + 0x130})
>
> as "const u16[]" is a $Type but "const u16[]" is not.
>
> Still, as written, the code seems fragile a
On Mon, 2015-06-22 at 08:38 +0200, Krzysztof Hałasa wrote:
> Joe Perches writes:
>
> > It might be better to use some base + index macro
> > as it could be smaller object code.
> >
> > Something like:
> >
> > #define REG_NO(base, multiplier, index) (base + (multiplier * index))
> >
> > re
Joe Perches writes:
> It might be better to use some base + index macro
> as it could be smaller object code.
>
> Something like:
>
> #define REG_NO(base, multiplier, index) (base + (multiplier * index))
>
> reg_write(vc->dev, REG_NO(0x10, 1, vc->ch), dma_cfg);
> or
>
> #define VDMA_C
On Mon, 2015-06-22 at 07:33 +0200, Krzysztof Hałasa wrote:
> Joe Perches writes:
>
> > How is the macro used?
> > #define REG8_1(a0) ((const u16[8]){a0, a0 + 1, a0 + 2, a0 + 3})
>
> #define REG8_1(a0) ((const u16[8]){a0, a0 + 1, a0 + 2, a0 + 3, a0 + 4, a0 +
> 5, a0 + 6, a0 + 7})
[]
> #define VD
Joe Perches writes:
> How is the macro used?
> #define REG8_1(a0) ((const u16[8]){a0, a0 + 1, a0 + 2, a0 + 3})
#define REG8_1(a0) ((const u16[8]){a0, a0 + 1, a0 + 2, a0 + 3, a0 + 4, a0 + 5,
a0 + 6, a0 + 7})
#define REG8_2(a0) ((const u16[8]){a0, a0 + 2, a0 + 4, a0 + 6, a0 + 8, a0 +
0xA, a0 + 0
On Fri, 2015-06-19 at 12:52 +0200, Krzysztof Hałasa wrote:
> Frans Klaver writes:
>
> > 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.
> >
> > Whic
Frans Klaver writes:
> 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?
A new file, not yet sent anywhere.
--
Krzysztof Halasa
Ind
On Fri, Jun 19, 2015 at 12:31 PM, Krzysztof Hałasa wrote:
> Frans Klaver 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
Frans Klaver 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 opti
Hi,
On Fri, Jun 19, 2015 at 10:35 AM, Krzysztof Hałasa wrote:
> Hi,
>
> a simple question: which style is preferred?
>
> #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})
> ^^
Hi,
a simple question: which style is preferred?
#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})
^
--
Krzysztof Halasa
Industrial Research Institute for Automation and Measu
12 matches
Mail list logo