From: Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de>
To: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: vamos-dev@lists.cs.fau.de,
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
linux-kernel@vger.kernel.org,
Christian Dietrich
<christian.dietrich@informatik.uni-erlangen.de>,
linux-mtd@lists.infradead.org,
David Woodhouse <dwmw2@infradead.org>
Subject: [PATCH] mtd: dc21285.c: remove double check of CONFIG_ARCH_NETWINDER
Date: Tue, 29 May 2012 12:06:46 +0200 [thread overview]
Message-ID: <20120529100646.GA23383@faui49q.informatik.uni-erlangen.de> (raw)
In-Reply-To: <1338040464.2525.38.camel@koala>
When CONFIG_ARCH_NETWINDER is unset nw_en_write is a NOP. But
machine_is_netwinder() also checks for
CONFIG_ARCH_NETWINDER. Therefore in the !netwinder case the
preprocessed code is:
if (0)
do {} while(0);
Signed-off-by: Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de>
---
drivers/mtd/maps/dc21285.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/mtd/maps/dc21285.c b/drivers/mtd/maps/dc21285.c
index 86598a1..38fbf23 100644
--- a/drivers/mtd/maps/dc21285.c
+++ b/drivers/mtd/maps/dc21285.c
@@ -79,8 +79,7 @@ static void dc21285_copy_from(struct map_info *map, void *to, unsigned long from
static void dc21285_write8(struct map_info *map, const map_word d, unsigned long adr)
{
- if (machine_is_netwinder())
- nw_en_write();
+ nw_en_write();
*CSR_ROMWRITEREG = adr & 3;
adr &= ~3;
*(uint8_t*)(map->virt + adr) = d.x[0];
@@ -88,8 +87,7 @@ static void dc21285_write8(struct map_info *map, const map_word d, unsigned long
static void dc21285_write16(struct map_info *map, const map_word d, unsigned long adr)
{
- if (machine_is_netwinder())
- nw_en_write();
+ nw_en_write();
*CSR_ROMWRITEREG = adr & 3;
adr &= ~3;
*(uint16_t*)(map->virt + adr) = d.x[0];
@@ -97,8 +95,7 @@ static void dc21285_write16(struct map_info *map, const map_word d, unsigned lon
static void dc21285_write32(struct map_info *map, const map_word d, unsigned long adr)
{
- if (machine_is_netwinder())
- nw_en_write();
+ nw_en_write();
*(uint32_t*)(map->virt + adr) = d.x[0];
}
--
1.7.5.4
next prev parent reply other threads:[~2012-05-29 10:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-25 8:28 [PATCH] mtd: dc21285.c: handle nw_gpio_lock correctly Christian Dietrich
2012-05-26 13:54 ` Artem Bityutskiy
2012-05-29 10:06 ` [PATCH] netwinder: nw_gpio_lock is a raw_spinlock_t Christian Dietrich
2012-05-29 10:11 ` David Woodhouse
2012-05-29 10:24 ` Artem Bityutskiy
2012-05-31 10:15 ` [PATCH] netwinder: encapsulate CPLD hardware locking and access Christian Dietrich
2012-05-31 12:31 ` David Woodhouse
2012-05-29 10:52 ` [PATCH] netwinder: nw_gpio_lock is a raw_spinlock_t David Woodhouse
2012-05-29 10:06 ` Christian Dietrich [this message]
2012-05-29 10:19 ` [PATCH] mtd: dc21285.c: remove double check of CONFIG_ARCH_NETWINDER David Woodhouse
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=20120529100646.GA23383@faui49q.informatik.uni-erlangen.de \
--to=christian.dietrich@informatik.uni-erlangen.de \
--cc=artem.bityutskiy@linux.intel.com \
--cc=dbaryshkov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=vamos-dev@lists.cs.fau.de \
/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).