mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Pekka J Enberg <penberg@cs.helsinki.fi>
Cc: Mark Gross <mgross@linux.intel.com>,
	Willy Tarreau <willy@w.ods.org>, Pekka Enberg <penberg@gmail.com>,
	"Bouchard, Sebastien" <Sebastien.Bouchard@ca.kontron.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Lorenzini, Mario" <mario.lorenzini@ca.kontron.com>
Subject: Re: Patch of a new driver for kernel 2.4.x that need review
Date: Thu, 7 Jul 2005 00:13:57 -0700 (PDT)	[thread overview]
Message-ID: <20050707071357.99494.qmail@web81304.mail.yahoo.com> (raw)
In-Reply-To: <courier.42CCD1CF.00004205@courier.cs.helsinki.fi>

Hi Pekka,

Pekka J Enberg <penberg@cs.helsinki.fi> wrote:
> Hi Dmitry, 
> 
> Mark Gross writes:
> > > > +
> > > > +/* 0 = Dynamic allocation of the major device number */
> > > > +#define TLCLK_MAJOR 252
> 
> Pekka J Enberg <penberg@cs.helsinki.fi> wrote:
> > > Enums, please. 
> > > 
> 
> Dmitry Torokhov writes:
> > But not here - it is a single constant, not a value of a distinct type.
> 
> Fair enough, "static const int" would work here too. Defines should be 
> avoided because they allow you to override a value without ever noticing it.
> 

Would not this cause compiler to allocate memory for the constant?
I suppose if GCC is really good it could eliminate allocation since
nothing takes its address, but I am not sure.

With #define you can be sure that it is just a constant expression.

-- 
Dmitry

  reply	other threads:[~2005-07-07  7:15 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-22 15:12 Bouchard, Sebastien
2005-06-22 19:43 ` Pekka Enberg
2005-06-22 20:32   ` Willy Tarreau
2005-06-22 20:59     ` Bill Gatliff
2005-06-22 21:58       ` Willy Tarreau
2005-06-23  4:58       ` Pekka Enberg
2005-06-23  4:16     ` Pekka J Enberg
2005-06-23  4:49       ` Willy Tarreau
2005-07-06 21:11         ` Mark Gross
2005-07-07  6:00           ` Pekka J Enberg
2005-07-07  6:50             ` Dmitry Torokhov
2005-07-07  6:55               ` Pekka J Enberg
2005-07-07  7:13                 ` Dmitry Torokhov [this message]
2005-07-07  7:43                   ` Pekka J Enberg
2005-07-07  6:10           ` Pekka J Enberg
2005-06-22 20:04 ` Pekka Enberg
2005-06-23 21:42   ` Alan Cox
2005-06-22 21:18 ` Jesper Juhl
2005-07-06 21:14 ` Mark Gross
2005-07-06 22:49   ` randy_dunlap
2005-07-06 22:57   ` Greg KH
2005-08-08 15:35   ` Mark Gross
2005-08-09  7:17     ` Pekka Enberg
2005-08-09 16:56     ` Mark Gross
2005-08-09 17:51       ` Nishanth Aravamudan
2005-07-07  8:15 moreau francis

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=20050707071357.99494.qmail@web81304.mail.yahoo.com \
    --to=dtor_core@ameritech.net \
    --cc=Sebastien.Bouchard@ca.kontron.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.lorenzini@ca.kontron.com \
    --cc=mgross@linux.intel.com \
    --cc=penberg@cs.helsinki.fi \
    --cc=penberg@gmail.com \
    --cc=willy@w.ods.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®