linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Venu Byravarasu <vbyravarasu@nvidia.com>
Cc: "Nicolas Ferre" <nicolas.ferre@atmel.com>,
	"Voss, Nikolaus" <N.Voss@weinmann.de>,
	"Eric Bénard" <eric@eukrea.com>,
	"'linux-mtd@lists.infradead.org'" <linux-mtd@lists.infradead.org>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] mtd: atmel_nand: fix access to 16 bit NAND devices
Date: Fri, 03 Feb 2012 07:32:41 +0200	[thread overview]
Message-ID: <1328247161.6750.23.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <D958900912E20642BCBC71664EFECE3E6DD0B99114@BGMAIL02.nvidia.com>

[-- Attachment #1: Type: text/plain, Size: 773 bytes --]

On Fri, 2012-02-03 at 09:05 +0530, Venu Byravarasu wrote:
> I see a problem with atmel_read_buf16 & atmel_write_buf16 functions.
> As they are calling __raw_readsw & __raw_writesw respectively, which 
> would cause panic in cases of 16 bit unaligned buffers.
> However, the buf passed to these functions is of type u8* from 
> atmel_read_buf & atmel_write_buf functions.

I think this is a valid concern. In theory, the NAND infrustructure must
guarantee that the buffer is always of even length, and most probably it
does, but we could add a WARN_ON(len & 1) statements in
'atmel_read_buf()' and 'atmel_write_buf()'.

And probably the type could indeed be changed.

But these concerns should be addressed separately.

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2012-02-03  5:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-18  9:16 [PATCH] mtd: atmel_nand: fix access to 16 bit NAND devices Nikolaus Voss
2012-01-27 13:29 ` Artem Bityutskiy
2012-01-30  7:57   ` Voss, Nikolaus
2012-01-30  8:57     ` Nicolas Ferre
2012-02-01 10:43       ` Eric Bénard
2012-02-02 12:06       ` Artem Bityutskiy
2012-02-03  3:35         ` Venu Byravarasu
2012-02-03  5:32           ` Artem Bityutskiy [this message]

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=1328247161.6750.23.camel@sauron.fi.intel.com \
    --to=dedekind1@gmail.com \
    --cc=N.Voss@weinmann.de \
    --cc=eric@eukrea.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=vbyravarasu@nvidia.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;
as well as URLs for NNTP newsgroup(s).