linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kgene.kim@samsung.com (Kukjin Kim)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 2/2] ARM: SAMSUNG: Cleanup resources by using macro
Date: Wed, 05 Oct 2011 10:17:21 +0900	[thread overview]
Message-ID: <01f201cc82fc$8812e190$9838a4b0$%kim@samsung.com> (raw)
In-Reply-To: <201110041726.03056.arnd@arndb.de>

Arnd Bergmann wrote:
> 
> On Tuesday 04 October 2011, Kukjin Kim wrote:
> > > I think the string concatenation really just obfuscates the code, and
> > > it does not actually save much at all. When you replace
> > >
> > > +       [0] = SAMSUNG_RES_MEM(S3C, WDT, SZ_1K),
> > > +       [1] = SAMSUNG_RES_IRQ(WDT),
> > >
> > > with
> > >
> > > +       [0] = DEFINE_RES_MEM(S3C_PA_WDT, SZ_1K),
> > > +       [1] = DEFINE_RES_IRQ(IRQ_WDT),
> > >
> > > you need practically no extra space, but you gain the advantages that
> > >
> > > * Someone using grep for DEFINE_RES_MEM finds all memory resources
> without
> > >   having to look up what your macros do an where they are used.
> > > * Someone using grep to look for S3C_PA_WDT finds the place where it
is
> > used.
> > > * Someone reading the resource definition immediately knows what the
> > >   macro does if familiar with other platforms using that macro.
> >
> > Yes, right. But I'm preparing to reduce the 'soc' part to consolidate
some
> > duplicated resources and platform data after this and the new
SAMSUNG_RES
> > macro will be used.
> 
> Hmm, can't you instead change the names of these constants to be
> always the same? That would let you use the regular DEFINE_RES_*
> definitions without having to introduce your own.
> 
OK, I agree with you. And if introducing Samsung own is required, will do it
later.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

      parent reply	other threads:[~2011-10-05  1:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-03  3:41 [PATCH V2 2/2] ARM: SAMSUNG: Cleanup resources by using macro Kukjin Kim
2011-10-03  3:53 ` Kyungmin Park
2011-10-03 13:13   ` Kukjin Kim
2011-10-03 14:20     ` Sylwester Nawrocki
2011-10-04 12:45       ` Kukjin Kim
2011-10-03 15:01 ` Arnd Bergmann
2011-10-04 12:45   ` Kukjin Kim
2011-10-04 15:26     ` Arnd Bergmann
2011-10-04 23:27       ` Kyungmin Park
2011-10-05  1:17         ` Kukjin Kim
2011-10-05  1:17       ` Kukjin Kim [this message]

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='01f201cc82fc$8812e190$9838a4b0$%kim@samsung.com' \
    --to=kgene.kim@samsung.com \
    --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).