lkml.org 
[lkml]   [2008]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: hci_usb: remove macro code obfuscation
Andrew Morton wrote:
> On Wed, 16 Apr 2008 13:51:37 +0300
> "Vitaliy Ivanov" <vitalivanov@gmail.com> wrote:
>
>> On Wed, Apr 16, 2008 at 1:42 PM, Pavel Machek <pavel@ucw.cz> wrote:
>>> I had trouble figuring out what the code does. atomic_inc/dec
>>> management is actually pretty simple, but it is needlessly obfuscated
>>> with macros. Fix that.
>>>
>>> Signed-off-by: Pavel Machek <pavel@suse.cz>
>>>
>>> I had trouble figuring out what the code does. atomic_inc/dec
>>> management is actually pretty simple, but it is needlessly obfuscated
>>> with macros. Fix that.
>>>
>>> Signed-off-by: Pavel Machek <pavel@suse.cz>
>>
>> Got it from the first time;)
>>
>> Do you think that now code looks better? As for me it's not...
>>
>
> Yes, I expect that the original code was easier to work with and it is not
> obfuscated I don't think. Sometimes these things take a few minutes for
> new readers to become comfortable with but are good for people who work on
> the code regularly.
>
> Although it's a mystery why __pending_tx() and friends
>
> a) have leading underscores and
At the time I wrote it, it made sense (to me :)) but it's been such a long
time ago I would not remember. Probably to show that this is something
internal and needs to be used with caution.

>
> b) are implemented in cpp, when C is available.
>
I'm not sure what you mean ? #define vs inline I suppose ?

Max


\
 
 \ /
  Last update: 2008-04-16 20:41    [W:0.426 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site