[PATCH 5/5] videomode: rename fields
Tomi Valkeinen
tomi.valkeinen at ti.com
Mon Mar 18 05:28:17 PDT 2013
On 2013-03-18 10:00, Daniel Vetter wrote:
> On Tue, Mar 12, 2013 at 03:40:14PM +0200, Tomi Valkeinen wrote:
>> Hi,
>>
>> On 2013-03-12 15:37, Laurent Pinchart wrote:
>>> Hi Tomi,
>>>
>>> Thanks for the patch.
>>>
>>> On Tuesday 12 March 2013 12:19:38 Tomi Valkeinen wrote:
>>>> Structs videomode and display_timing have rather long field names for
>>>> the timing values. Nothing wrong with that as such, but this patch
>>>> changes them to abbreviations for the following reasons:
>>>>
>>>> * The timing values often need to be used in calculations, and long
>>>> field names makes their direct use clumsier.
>>>>
>>>> * The current names are a bit of a mishmash: some words are used as
>>>> such, some are shortened, and for some only first letter is used. Some
>>>> names use underscode, some don't. All this makes it difficult to
>>>> remember what the field names are.
>>>>
>>>> * The abbreviations used in this patch are very common, and there
>>>> shouldn't be any misunderstanding about their meaning.
>>>>
>>>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ti.com>
>>>> Cc: Steffen Trumtrar <s.trumtrar at pengutronix.de>
>>>> ---
>>>
>>> I have no strong opinion on this, but I find the existing names easier to
>>> read. I might be biased by having read them often though.
>>
>> Yes, the last patch was a bit of a "teaser" =). I found myself typoing
>> them a lot, using helper local variables to shorten the code lines, and
>> as I mention in the description, I find them a bit of a mishmash. So,
>> while they're not used in any drivers yet, I thought it'd be worth a
>> shot to change them.
>
> Imo the new names look quite a bit more ugly and less readable, for very
> few saved chars. And at least for i915.ko development it's been a long
> time since I've last had to type them ... Maybe the real problem is that
> we have a few too many video mode structures and can't properly share
> them?
I guess it's a matter of taste. But I've received three "I don't like
the new names" comments, and no positive comments, so I'm dropping the
last patch. The first four should be fine, though.
And yes, we should definitely try to use only this new videomode struct
in the future everywhere in the kernel. It sure would make me remember
the names better =).
Tomi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20130318/b7c1a942/attachment.pgp>
More information about the dri-devel
mailing list