From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geert Uytterhoeven Subject: Re: [PATCH] mmc: tmio: enable odd number size transfer Date: Mon, 8 Sep 2014 10:18:33 +0200 Message-ID: References: <87wq9eohuc.wl%kuninori.morimoto.gx@gmail.com> <87r3zmo969.wl%kuninori.morimoto.gx@gmail.com> <87ppf6o7sw.wl%kuninori.morimoto.gx@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <87ppf6o7sw.wl%kuninori.morimoto.gx@gmail.com> Sender: linux-sh-owner@vger.kernel.org To: Kuninori Morimoto Cc: Ulf Hansson , Chris Ball , Simon , Kuninori Morimoto , Linux-SH , linux-mmc List-Id: linux-mmc@vger.kernel.org Hi Morimoto-san, On Mon, Sep 8, 2014 at 10:06 AM, Kuninori Morimoto wrote: > About endianness / byte access, it requires byte access > especially "read" case. > Because if count was odd number, > using shift with u16 will might be buffer overflow Of course the buffer must be accessed using byte accesses. But sd_ctrl_read16() returns u16, and sd_ctrl_write16() takes u16. 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