Messages in this thread | | | Subject | RE: [PATCH] mtd: atmel_nand: fix access to 16 bit NAND devices | From | Artem Bityutskiy <> | Date | Fri, 03 Feb 2012 07:32:41 +0200 |
| |
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 [unhandled content-type:application/pgp-signature] | |