From: Zhou Wang <wangzhou.bry@gmail.com>
To: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org, pawel.moll@arm.com,
ijc+devicetree@hellion.org.uk,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"xuwei \(O\)" <xuwei5@hisilicon.com>,
wangzhou1@hisilicon.com, Rob Herring <robh+dt@kernel.org>,
linux-mtd@lists.infradead.org, galak@codeaurora.org,
caizhiyong@huawei.com, Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.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
>
WARNING: multiple messages have this Message-ID (diff)
From: Zhou Wang <wangzhou.bry-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Haojian Zhuang <haojian.zhuang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
Brian Norris
<computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
pawel.moll-5wv7dgnIgG8@public.gmane.org,
ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
caizhiyong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
"xuwei (O)" <xuwei5-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>,
wangzhou1-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.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-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 2014年10月24日 19:46, Haojian Zhuang wrote:
> On Thu, Oct 23, 2014 at 10:04 PM, Zhou Wang <wangzhou.bry-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> Signed-off-by: Zhou Wang <wangzhou.bry-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> ---
>> 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
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
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:31 UTC|newest]
Thread overview: 12+ 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 hisilicon hip04 Soc Zhou Wang
2014-10-23 14:04 ` Zhou Wang
2014-10-23 14:04 ` [PATCH v2 1/2] mtd: hisilicon: add a new NAND controller driver for " Zhou Wang
2014-10-23 14:04 ` Zhou Wang
2014-10-24 11:46 ` Haojian Zhuang
2014-10-24 11:46 ` Haojian Zhuang
2014-10-24 11:46 ` Haojian Zhuang
2014-10-25 3:30 ` Zhou Wang [this message]
2014-10-25 3:30 ` Zhou Wang
2014-10-25 3:30 ` Zhou Wang
2014-10-23 14:04 ` [PATCH v2 2/2] mtd: hisilicon: add device tree binding documentation Zhou Wang
2014-10-23 14:04 ` 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.