From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Hauke Mehrtens <hauke@hauke-m.de>
Cc: computersforpeace@gmail.com, linux-mtd@lists.infradead.org,
David.Woodhouse@intel.com, john@phrozen.org
Subject: Re: [PATCH 2/6] MTD: xway: fix invalid operator
Date: Tue, 7 Jun 2016 21:04:04 +0200 [thread overview]
Message-ID: <20160607210404.7b9f0309@bbrezillon> (raw)
In-Reply-To: <b7697bbc-0f14-67da-fab9-2a93c67422da@hauke-m.de>
On Tue, 7 Jun 2016 19:40:14 +0200
Hauke Mehrtens <hauke@hauke-m.de> wrote:
> On 06/07/2016 11:28 AM, Boris Brezillon wrote:
> > On Sun, 5 Jun 2016 23:20:05 +0200
> > Hauke Mehrtens <hauke@hauke-m.de> wrote:
> >
> >> From: John Crispin <john@phrozen.org>
> >>
> >> xway_read_byte should use a logic or and not an add operator when
> >> working out the NAND address. The NAND address bits are used to
> >> activate the pins to the NAND flash.
> >>
> >> Signed-off-by: John Crispin <john@phrozen.org>
> >> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> >> ---
> >> drivers/mtd/nand/xway_nand.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/mtd/nand/xway_nand.c b/drivers/mtd/nand/xway_nand.c
> >> index ccac19c..0ab6e83 100644
> >> --- a/drivers/mtd/nand/xway_nand.c
> >> +++ b/drivers/mtd/nand/xway_nand.c
> >> @@ -134,7 +134,7 @@ static unsigned char xway_read_byte(struct mtd_info *mtd)
> >> int ret;
> >>
> >> spin_lock_irqsave(&ebu_lock, flags);
> >> - ret = ltq_r8((void __iomem *)(nandaddr + NAND_READ_DATA));
> >> + ret = ltq_r8((void __iomem *)(nandaddr | NAND_READ_DATA));
> >
> > It's doing exactly the same, isn't it? What's the rationale behind this
> > change?
>
> Yes that is correct, this is only a style change.
>
> In the other places we are also using the bool operations and this
> address space is not a list of registers, but some address bits are used
> to activate or deactivate some pins and all data written to this address
> range is handled in the same way.
Well, I find it clearer to use the '+' operator when manipulating
pointer addresses, but maybe that's just a matter of taste.
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-06-07 19:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-05 21:20 [PATCH 0/6] MTD: xway: updates from OpenWrt/LEDE Hauke Mehrtens
2016-06-05 21:20 ` [PATCH 1/6] MTD: xway: add some more documentation Hauke Mehrtens
2016-06-05 21:20 ` [PATCH 2/6] MTD: xway: fix invalid operator Hauke Mehrtens
2016-06-07 9:28 ` Boris Brezillon
2016-06-07 17:40 ` Hauke Mehrtens
2016-06-07 19:04 ` Boris Brezillon [this message]
2016-06-05 21:20 ` [PATCH 3/6] MTD: xway: the latched command should be persistent Hauke Mehrtens
2016-06-07 9:30 ` Boris Brezillon
2016-06-05 21:20 ` [PATCH 4/6] MTD: xway: remove endless loop Hauke Mehrtens
2016-06-05 21:20 ` [PATCH 5/6] MTD: xway: add missing write_buf and read_buf to nand driver Hauke Mehrtens
2016-06-07 9:34 ` Boris Brezillon
2016-06-05 21:20 ` [PATCH 6/6] MTD: xway: fix nand locking Hauke Mehrtens
2016-06-07 9:24 ` [PATCH 0/6] MTD: xway: updates from OpenWrt/LEDE Boris Brezillon
2016-06-07 17:37 ` Hauke Mehrtens
2016-06-07 9:48 ` Boris Brezillon
2016-06-07 10:12 ` John Crispin
2016-06-07 17:36 ` Hauke Mehrtens
2016-06-07 19:01 ` Boris Brezillon
2016-06-07 19:10 ` Boris Brezillon
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=20160607210404.7b9f0309@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=David.Woodhouse@intel.com \
--cc=computersforpeace@gmail.com \
--cc=hauke@hauke-m.de \
--cc=john@phrozen.org \
--cc=linux-mtd@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