From: ben-linux@fluff.org (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 11/11] ARM: S5P6440: Remove redundant defines
Date: Fri, 14 May 2010 06:35:50 +0100 [thread overview]
Message-ID: <20100514053550.GP26401@trinity.fluff.org> (raw)
In-Reply-To: <20100513090608.GA5382@n2100.arm.linux.org.uk>
On Thu, May 13, 2010 at 10:06:08AM +0100, Russell King - ARM Linux wrote:
> On Thu, May 13, 2010 at 01:54:12PM +0900, Kyungmin Park wrote:
> > On Thu, May 13, 2010 at 11:02 AM, Ben Dooks <ben-linux@fluff.org> wrote:
> > > 1) It takes two lines of code, where one is sufficient.
> > >
> > > 2) You only have to look in the relevant .c file to find out the
> > > ? value instead of tracking down a header. This makes it easier
> > > ? to verify the value against the manual and easier to compare
> > > ? against simialr code.
> >
> > Then define it at c code and use the macro. I also don't like the
> > hard-coded values.
>
> I'm almost with Ben on this; but we can do better to satisfy both camps.
>
> .ctrlbit = 1 << 2, /* CLKCON_MEM0_HCLK_NFCON */
As a note, the following awk will do that to this patch:
#!/bin/awk
{
if ($0 ~ /^-.*ctrlbit*/) {
last = $4;
gsub(/,/,"",last)
print $0;
} else if ($0 ~ /^\+.*ctrlbit*/) {
print $0 " /* " last " */";
} else {
print $0 default;
}
}
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
prev parent reply other threads:[~2010-05-14 5:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-13 0:28 [PATCH 11/11] ARM: S5P6440: Remove redundant defines Kukjin Kim
2010-05-13 1:49 ` Jassi Brar
2010-05-13 2:02 ` Ben Dooks
2010-05-13 4:54 ` Kyungmin Park
2010-05-13 9:06 ` Russell King - ARM Linux
2010-05-14 2:12 ` Ben Dooks
2010-05-14 5:35 ` Ben Dooks [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=20100514053550.GP26401@trinity.fluff.org \
--to=ben-linux@fluff.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).