linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>, Chris Ball <cjb@laptop.org>,
	Simon <horms@verge.net.au>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Linux-SH <linux-sh@vger.kernel.org>,
	linux-mmc <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH] mmc: tmio: enable odd number size transfer
Date: Mon, 8 Sep 2014 09:49:20 +0200	[thread overview]
Message-ID: <CAMuHMdVqFvgPBVenEnoRfpDyMSc_z+9EEF19VHM8CESXmBwFMQ@mail.gmail.com> (raw)
In-Reply-To: <87r3zmo969.wl%kuninori.morimoto.gx@gmail.com>

Hi Morimoto-san,

On Mon, Sep 8, 2014 at 9:36 AM, Kuninori Morimoto
<kuninori.morimoto.gx@gmail.com> wrote:
>  > +       buf8 = (u8 *)(buf + ((count - 1) >> 1));
>>
>> The "-1" is not really needed.
>
> This -1 is needed.
>
> We want to have...
> count - offset
> 1       0
> 2       0
> 3       1
> 4       1
> ...

If count is even, we never get that far, so the even numbers should not
be present in your table above?

If count is odd, "(count - 1) >> 1 == count >> 1".

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2014-09-08  7:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-08  4:29 [PATCH] mmc: tmio: enable odd number size transfer Kuninori Morimoto
2014-09-08  7:28 ` Geert Uytterhoeven
2014-09-08  7:36   ` Kuninori Morimoto
2014-09-08  7:49     ` Geert Uytterhoeven [this message]
2014-09-08  8:06       ` Kuninori Morimoto
2014-09-08  8:18         ` Geert Uytterhoeven
2014-09-08  8:50 ` Sergei Shtylyov

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=CAMuHMdVqFvgPBVenEnoRfpDyMSc_z+9EEF19VHM8CESXmBwFMQ@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=cjb@laptop.org \
    --cc=horms@verge.net.au \
    --cc=kuninori.morimoto.gx@gmail.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=ulf.hansson@linaro.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;
as well as URLs for NNTP newsgroup(s).