From: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
To: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: linux-mtd <linux-mtd@lists.infradead.org>,
Richard Weinberger <richard@nod.at>,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>
Subject: Re: [PATCH v6 4/4] mtd: nand: tango: import driver for tango chips
Date: Tue, 25 Oct 2016 13:30:39 +0200 [thread overview]
Message-ID: <580F425F.8090000@sigmadesigns.com> (raw)
In-Reply-To: <20161024171026.710d0f6a@bbrezillon>
Heya :-)
On 24/10/2016 17:10, Boris Brezillon wrote:
> Marc Gonzalez wrote:
>
>> This driver supports the NAND Flash controller embedded in recent
>> Tango chips, such as SMP8758 and SMP8759.
>
> A few comments below (most of them are about coding style).
20c25f430311 tweak chip->options
cd1f53e6d2b8 Move ECC init code around
b90efb09a921 Increment ecc_stats.failed on error
2236f67af8d6 move brace for checkpatch
83c1c0311c2a braces in for loop
13faec8fa36b proper braces for if-block
f879bf99d5c3 Move test before DMA write
a2d319b18702 no brackets for readl_poll_timeout
67acc45e26e1 Remove nice alignment
dd71ae037721 fix TIMING macro
Time to squash and send v7, along with the bindings doc.
>> +#define TIMING(t0, t1, t2, t3) (t0 << 24 | t1 << 16 | t2 << 8 | t3 << 0)
>
> Wrap tX params with parenthesis to make sure the shift operation is
> applied to the correct value (for example, if t0 = a + b, then the
> resulting operation will be a + (b << 24) instead of (a + b) << 24 if
> you don't put those parenthesis).
Fixed.
For the record, addition has higher precedence than shift.
Thus a + b << n = (a + b) << n
But your point is valid for bit-wise operations, e.g.
a & b << n = a & (b << n)
>> + writel_relaxed(page, nfc->reg_base + NFC_ADDR_PAGE);
>> + writel_relaxed( 0, nfc->reg_base + NFC_ADDR_OFFSET);
>> + writel_relaxed( cmd, nfc->reg_base + NFC_FLASH_CMD);
>
> A vestige of you weird alignment policy ;). Please fix that.
Fixed. Even checkpatch complains...
(Sad puppy face)
Regards.
prev parent reply other threads:[~2016-10-25 11:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-24 12:48 [PATCH v6 0/4] Tango NAND Flash controller driver (and dependencies) Marc Gonzalez
2016-10-24 12:50 ` [PATCH v6 1/4] mtd: nand: Add a few more timings to nand_sdr_timings Marc Gonzalez
2016-10-24 12:51 ` [PATCH v6 2/4] mtd: nand: Wait tCCS after a column change Marc Gonzalez
2016-10-24 12:54 ` [PATCH v6 3/4] mtd: nand: Actually apply the optimal timings Marc Gonzalez
2016-10-24 12:55 ` [PATCH v6 4/4] mtd: nand: tango: import driver for tango chips Marc Gonzalez
2016-10-24 15:10 ` Boris Brezillon
2016-10-25 11:30 ` Marc Gonzalez [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=580F425F.8090000@sigmadesigns.com \
--to=marc_gonzalez@sigmadesigns.com \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
/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).