linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: benh@kernel.crashing.org (Benjamin Herrenschmidt)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 2/2] ARM: DT: kernel: DT cpu node bindings update
Date: Tue, 16 Apr 2013 18:21:08 +0200	[thread overview]
Message-ID: <1366129268.24994.60.camel@pasglop> (raw)
In-Reply-To: <516D74E9.9030404@wwwdotorg.org>

On Tue, 2013-04-16 at 09:57 -0600, Stephen Warren wrote:
> > Mmm, I need to read more on dtc+cpp, I do not think that leaving it
> > as a string would hurt though, am I wrong ? Can we assume that all
> dts
> > are preprocessed before being compiled and passed to the kernel ?
> 
> It wouldn't hurt too much, but representing enums as strings when
> there's a capability to simply represent it as a integer just feels
> pretty gross to me.

It's the other way around...

Unless there's a direct semantic meaning of the numbers, things like
that (ie. "methods") should be represented as strings.

Else we fall back to the realm of "magic numbers" which sucks and causes
all sort of pains when several new methods get added by different
people, etc...

The tree is meant to be generally human readable and we should stick to
that. The tiny memory usage is irrelevant on any modern setup.

Cheers,
Ben.

  reply	other threads:[~2013-04-16 16:21 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-15 16:13 [RFC PATCH 0/2] ARM: DT cpu bindings updates Lorenzo Pieralisi
2013-04-15 16:13 ` [RFC PATCH 1/2] ARM: DT: kernel: move temporary cpu map stack array to static data Lorenzo Pieralisi
2013-04-15 16:13 ` [RFC PATCH 2/2] ARM: DT: kernel: DT cpu node bindings update Lorenzo Pieralisi
2013-04-15 19:26   ` Stephen Warren
2013-04-16 10:45     ` Lorenzo Pieralisi
2013-04-16 15:57       ` Stephen Warren
2013-04-16 16:21         ` Benjamin Herrenschmidt [this message]
2013-04-16 14:30     ` Dave Martin
2013-04-17  9:14     ` Mark Rutland
2013-04-17 15:14       ` Stephen Warren
2013-04-17 16:02         ` Nicolas Pitre
2013-04-17 16:23           ` Stephen Warren
2013-04-17 16:36             ` Nicolas Pitre
2013-04-17 16:56               ` Dave Martin
2013-04-17 16:24         ` Benjamin Herrenschmidt
2013-04-18 12:40         ` Grant Likely
2013-04-16  2:41   ` Simon Horman
2013-04-16 11:00     ` Lorenzo Pieralisi
2013-04-17  9:35   ` Nicolas Ferre
2013-04-17 11:44     ` Lorenzo Pieralisi
2013-04-17  9:48   ` Arnd Bergmann
2013-04-17 11:02     ` Lorenzo Pieralisi

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=1366129268.24994.60.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).