All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Timur Tabi <timur@freescale.com>
Cc: Aggrwal Poonam-B10812 <B10812@freescale.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	Singh Sandeep-B37400 <B37400@freescale.com>
Subject: Re: [2/3][PATCH][upstream] TDM Framework
Date: Thu, 26 Jul 2012 17:09:17 -0500	[thread overview]
Message-ID: <5011C00D.7090403@freescale.com> (raw)
In-Reply-To: <5011B673.4030802@freescale.com>

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

  reply	other threads:[~2012-07-26 22:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-23 10:49 [2/3][PATCH][upstream] TDM Framework b37400
2012-07-23 10:49 ` [1/3][PATCH][upstream]Adding documentation for TDM b37400
2012-07-23 10:49   ` [3/3][PATCH][upstream]Added TDM device support and Freescale Starlite driver b37400
2012-07-23 12:32   ` [1/3][PATCH][upstream]Adding documentation for TDM David Laight
2012-07-24 15:12     ` Aggrwal Poonam-B10812
2012-07-25  8:44       ` David Laight
2012-07-25 12:08         ` Aggrwal Poonam-B10812
2012-07-23 16:33 ` [2/3][PATCH][upstream] TDM Framework Tabi Timur-B04825
2012-07-24 13:22   ` Singh Sandeep-B37400
2012-07-24 14:43     ` Timur Tabi
2012-07-24 23:43       ` Michael Ellerman
2012-07-25  2:40         ` Tabi Timur-B04825
2012-07-25  5:18           ` Michael Ellerman
2012-07-26 21:28             ` Timur Tabi
2012-07-26 22:09               ` Scott Wood [this message]
2012-07-26 10:49       ` Singh Sandeep-B37400

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5011C00D.7090403@freescale.com \
    --to=scottwood@freescale.com \
    --cc=B10812@freescale.com \
    --cc=B37400@freescale.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=timur@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.