From: Artem Bityutskiy <dedekind1@gmail.com>
To: Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
vamos-dev@lists.cs.fau.de
Subject: Re: [PATCH] mtd: dc21285.c: handle nw_gpio_lock correctly
Date: Sat, 26 May 2012 16:54:24 +0300 [thread overview]
Message-ID: <1338040464.2525.38.camel@koala> (raw)
In-Reply-To: <20120525082812.GA12238@faui49q.informatik.uni-erlangen.de>
[-- Attachment #1: Type: text/plain, Size: 1662 bytes --]
On Fri, 2012-05-25 at 10:28 +0200, Christian Dietrich wrote:
> nw_gpio_lock is a raw_spinlock_t, therefore raw_spin_lock_irqsave should be
> used. it doesn't make a difference, while rlock is the first element of
> spinlock_t.
>
> Also the check for machine_is_netwinder() is a double check of
> CONFIG_ARCH_NETWINDER.
>
> Signed-off-by: Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de>
I do not understand this commit message. Please, split your patch on 2
patches and put a better to each one. Thanks!
> ---
> drivers/mtd/maps/dc21285.c | 13 +++++--------
> 1 files changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/mtd/maps/dc21285.c b/drivers/mtd/maps/dc21285.c
> index 080f060..38fbf23 100644
> --- a/drivers/mtd/maps/dc21285.c
> +++ b/drivers/mtd/maps/dc21285.c
> @@ -38,9 +38,9 @@ static void nw_en_write(void)
> * we want to write a bit pattern XXX1 to Xilinx to enable
> * the write gate, which will be open for about the next 2ms.
> */
> - spin_lock_irqsave(&nw_gpio_lock, flags);
> + raw_spin_lock_irqsave(&nw_gpio_lock, flags);
Please, make this to be a separate patch.
And surely there are many other places in the kernel which need this
conversion?
> 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;
I do not understand why this "if" statement is not needed? Why it was
there in the first place and why you remove it? Please, describe this in
the commit message.
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-05-26 13:54 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 [this message]
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 ` [PATCH] mtd: dc21285.c: remove double check of CONFIG_ARCH_NETWINDER Christian Dietrich
2012-05-29 10:19 ` 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=1338040464.2525.38.camel@koala \
--to=dedekind1@gmail.com \
--cc=christian.dietrich@informatik.uni-erlangen.de \
--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