Subject: Re: [2/3][PATCH][upstream] TDM Framework

From: Scott Wood <[email-masked]>
Date: Thu, 26 Jul 2012 17:09:17 -0500

On 07/26/2012 04:28 PM, Timur Tabi wrote:
> Michael Ellerman wrote:
>> And the bible, K & R, includes an example of an enum which explicitly
>> specifies all its values. It goes on to say "enumeration variables offer
>> the chance of [type] checking and so are often better than #defines".
> 
> I don't want to beat a dead horse here, but if the driver doesn't do enum
> type checking, then it's hard to justify using an enum.

Enum symbols show up in a debugger, which is nice.  Why use the
preprocessor for something that can be just as well expressed in the
language itself?  The only real argument for #define in this case is
style, which in Linux does tend toward favoring #define.

-Scott