From: Zhou Wang <wangzhou.bry@gmail.com>
To: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
linux-mtd@lists.infradead.org,
Mark Rutland <mark.rutland@arm.com>,
pawel.moll@arm.com, ijc+devicetree@hellion.org.uk,
Rob Herring <robh+dt@kernel.org>,
galak@codeaurora.org, caizhiyong@huawei.com,
"xuwei (O)" <xuwei5@hisilicon.com>,
wangzhou1@hisilicon.com,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
devicetree@vger.kernel.org
Subject: Re: [PATCH v2 1/2] mtd: hisilicon: add a new NAND controller driver for hisilicon hip04 Soc
Date: Sat, 25 Oct 2014 11:30:19 +0800 [thread overview]
Message-ID: <544B194B.1090409@gmail.com> (raw)
In-Reply-To: <CAN1soZz8NYxppaY4cXadqynERZ=6ZRAynDtptGAps+yUJZ0Qsw@mail.gmail.com>
On 2014年10月24日 19:46, Haojian Zhuang wrote:
> On Thu, Oct 23, 2014 at 10:04 PM, Zhou Wang <wangzhou.bry@gmail.com> wrote:
>> Signed-off-by: Zhou Wang <wangzhou.bry@gmail.com>
>> ---
>> drivers/mtd/nand/Kconfig | 5 +
>> drivers/mtd/nand/Makefile | 1 +
>> drivers/mtd/nand/hisi504_nand.c | 836 +++++++++++++++++++++++++++++++++++++++
>> 3 files changed, 842 insertions(+)
>> create mode 100644 drivers/mtd/nand/hisi504_nand.c
>>
>
> I think that you need to run scripts/checkpatch.pl. There're some
> warnings reported on this patch.
>
Hi Haojian,
I will run the checkpatch.pl again and fix the warnings.
But for lines like this:
+ if (host->command == NAND_CMD_ERASE1)
+ host->addr_value[0] |= ((page_addr >>16) & 0xff) << 16;
+ else
+ host->addr_value[1] |= ((page_addr >> 16) & 0xff);
Only over 80 for some characters in one line, it will report a warning.
Can I just leave the warning there for the tidy of the code?
>> +
>> + case NAND_CMD_SEQIN:
>> + host->offset = column;
>> +
>
> It's better not using waterfall style. Maybe you can write it clearly.
> case NAND_CMD_SEQIN:
> host->offset = column;
> set_addr(mtd, column, page_addr);
> break;
Thanks, I will modify the code like this above.
>
>> + chip->ecc.mode = of_get_nand_ecc_mode(np);
>> + /* read ecc-bits from dts */
>> + of_property_read_u32(np, "hisi,nand-ecc-bits", &host->ecc_bits);
>
> Do you need to check the ecc_bits at here? Maybe user inputed the
> wrong ecc_bits in DTS.
Yes, it is better to check the ecc_bits here, thanks for your reminding.
Best regards,
Zhou Wang
>
> Best Regards
> Haojian
>
next prev parent reply other threads:[~2014-10-25 3:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-23 14:04 [PATCH v2 0/2] mtd: hisilicon: add a new driver for NAND controller of " Zhou Wang
2014-10-23 14:04 ` [PATCH v2 1/2] mtd: hisilicon: add a new NAND controller driver for " Zhou Wang
2014-10-24 11:46 ` Haojian Zhuang
2014-10-25 3:30 ` Zhou Wang [this message]
2014-10-23 14:04 ` [PATCH v2 2/2] mtd: hisilicon: add device tree binding documentation Zhou Wang
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=544B194B.1090409@gmail.com \
--to=wangzhou.bry@gmail.com \
--cc=caizhiyong@huawei.com \
--cc=computersforpeace@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=galak@codeaurora.org \
--cc=haojian.zhuang@gmail.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=wangzhou1@hisilicon.com \
--cc=xuwei5@hisilicon.com \
/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
Powered by JetHome