Re: [PATCH 5/5] Add the viafb video capture driver

From: Mauro Carvalho Chehab
Date: Mon May 24 2010 - 21:02:40 EST


Jonathan Corbet wrote:
> On Sun, 23 May 2010 09:51:47 -0300
> Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> wrote:
>
>> The driver is OK to my eyes. I just found 2 minor coding style issues.
>> it is ok to me if you want to sent it via your git tree.
>>
>> Acked-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
>
> Great, thanks for taking a look!
>
> All of the precursor stuff is in mainline now, so it can go via whatever
> path. I'll just go ahead and request a pull in the near future unless
> somebody objects.

OK.

>>> + .sizeimage = VGA_WIDTH*VGA_HEIGHT*2,
>> CodingStyle: please use spaces between values/operators. Not sure why, but
>> newer versions of checkpatch.pl don't complain anymore on some cases.
>
> Interesting...for all of my programming life I've left out spaces around
> multiplicative operators - a way of showing that they bind more tightly
> than the additive variety. I thought everybody else did that too.
> CodingStyle agrees with you, though; I'll append a patch fixing these up.

We all have some sort of different CodingStyle that were inherited from previous
programming practices... I used to just not add any space at all at expressions,
as C is a compact language, and I was a bit lazy ;)

Yet, when reviewing lots of code, those spaces help to read a code quicker
than without. Not sure why, but my guess is that the brain can do a faster
parsing when the words are separated from operators. Or maybe it is just because
it is easier to parse patches when everybody uses the same Coding Style.

> Learn something every day...

Very true ;)

--

Cheers,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/