From: Hiep Cao Minh <cm-hiep@jinso.co.jp>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: DongCV <cv-dong@jinso.co.jp>, "Mark Brown" <broonie@kernel.org>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
linux-spi <linux-spi@vger.kernel.org>,
"Kuninori Morimoto" <kuninori.morimoto.gx@renesas.com>,
"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
"Ryusuke Sakato" <ryusuke.sakato.bx@renesas.com>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
Dung:人ソ <nv-dung@jinso.co.jp>, 稲吉 <h-inayoshi@jinso.co.jp>
Subject: Re: [PATCH] spi: rspi: fix the bug related to mount/remount jffs2
Date: Wed, 15 Feb 2017 09:26:25 +0900 [thread overview]
Message-ID: <58A3A031.3080307@jinso.co.jp> (raw)
In-Reply-To: <CAMuHMdU4v=KszacVQ5GX-JVoov0TdfH=+fkpyC505eUWTGpEqg@mail.gmail.com>
Hi Geert,
Sorry for the delay.
Thanks for your reply.
> On Mon, Feb 13, 2017 at 7:50 AM, Hiep Cao Minh <cm-hiep@jinso.co.jp> wrote:
>> Sorry to bother you!
> No, thank you for finally make me see my wrong reasoning!
>
>>> qspi_transfer_in() does:
>>>
>>> while (n > 0) {
>>> len = qspi_set_receive_trigger(rspi, n);
>>> // len will be <= n
>> I agree. This is len = min value of n and 32.
>>> if (len == QSPI_BUFFER_SIZE) {
>>> // receive blocks of len bytes
>> Yes, This is len == 32 bytes
>>> ...
>>> } else {
>>> // receive n (not len) bytes
>> This is always n == len ( This case, len or n is always < 32)
>> Because this is the last n bytes should be received.
> Right.
> Doh, I must have missed that if "len < n", the first branch is always taken.
>
>>> ret = rspi_pio_transfer(rspi, NULL, rx, n);
> It would have been clearer to use "len" here instead of "n".
I agree, Dong will update your suggestion at the patch.
Thank you.
Hiep.
next prev parent reply other threads:[~2017-02-15 0:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-06 1:02 [PATCH] spi: rspi: fix the bug related to mount/remount jffs2 DongCV
2017-02-06 11:02 ` Geert Uytterhoeven
2017-02-07 10:25 ` DongCV
2017-02-08 8:58 ` Geert Uytterhoeven
2017-02-13 6:50 ` Hiep Cao Minh
2017-02-13 8:07 ` Geert Uytterhoeven
2017-02-15 0:26 ` Hiep Cao Minh [this message]
2017-02-06 12:46 ` Mark Brown
2017-02-13 8:26 ` Geert Uytterhoeven
2017-02-16 19:05 ` Applied "spi: rspi: Fixes bogus received byte in qspi_transfer_in()" to the spi tree Mark Brown
[not found] <74ea1835-3ce3-612c-ece5-52c8dba0ca87@jinso.co.jp>
[not found] ` <CAMuHMdVZOOLGziGm4YdHn_bRB_JOzWEeQ=Ogr8TiB47KTza7OA@mail.gmail.com>
2017-01-27 9:02 ` [PATCH] spi: rspi: fix the bug related to mount/remount jffs2 Geert Uytterhoeven
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=58A3A031.3080307@jinso.co.jp \
--to=cm-hiep@jinso.co.jp \
--cc=broonie@kernel.org \
--cc=cv-dong@jinso.co.jp \
--cc=geert+renesas@glider.be \
--cc=geert@linux-m68k.org \
--cc=h-inayoshi@jinso.co.jp \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=nv-dung@jinso.co.jp \
--cc=ryusuke.sakato.bx@renesas.com \
--cc=yoshihiro.shimoda.uh@renesas.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