On Tuesday, July 29, 2014 2:22 AM, Ian Abbott wrote:
> On 2014-07-29 10:07, Ian Abbott wrote:
>> On 2014-07-28 18:26, H Hartley Sweeten wrote:
>>> Convert this enum into defines and rename all the CamelCase symbols.
>>>
>>> For aesthetics, move the new defines so they are associated with the
>>> register define.
>>>
>>> Signed-off-by: H Hartley Sweeten <hswee...@visionengravers.com>
>>> Cc: Ian Abbott <abbo...@mev.co.uk>
>>> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
>>> ---
>>>   drivers/staging/comedi/drivers/ni_tio.c          | 99
>>> ++++++++++--------------
>>>   drivers/staging/comedi/drivers/ni_tio_internal.h | 56 +++++---------
>>>   2 files changed, 64 insertions(+), 91 deletions(-)
>>>
>>> diff --git a/drivers/staging/comedi/drivers/ni_tio.c
>>> b/drivers/staging/comedi/drivers/ni_tio.c
>>> index 6ed14df..1baad07 100644
>>> --- a/drivers/staging/comedi/drivers/ni_tio.c
>>> +++ b/drivers/staging/comedi/drivers/ni_tio.c
>>> @@ -116,59 +116,55 @@ TODO:
>>>   #define NI_660X_LOGIC_LOW_GATE2_SEL    0x1f
>>>   #define NI_660X_MAX_UP_DOWN_PIN        7
>>>
>>> -static inline enum Gi_Counting_Mode_Reg_Bits
>>> -Gi_Alternate_Sync_Bit(enum ni_gpct_variant variant)
>>> +static inline unsigned GI_ALT_SYNC(enum ni_gpct_variant variant)
>>
>> Does that really need to be inline and ALL CAPS?  There may be some
>> justification for using all caps, but the compiler ought to decide
>> whether to inline it.
>
> I see the original function was inline as well, so maybe that should be 
> a separate patch to remove the inlines.

As you noted, the original was inline. I plan on removing these.

I renamed the function ALL CAPS so it follows the defines and macros used
for the other GI_* bit defines. These inline functions should also be macros
but they are a bit messy due to the 'variant' testing.

I'm still trying to figure out a clean way of making them macros.

Regards,
Hartley

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to