
17 Feb
2009
17 Feb
'09
7:51 p.m.
On Tue, Feb 17, 2009 at 10:15:07AM -0700, Derek Ou wrote:
- /* Reject writes when offset is not page aligned */
- if ((offset & (nand->writesize - 1)) != 0 ) {
No space before ')'. Better yet, just get rid of the != 0 part.
- /* now, pad data with 0xff */
- if (page_offset != 0)
memset(buffer + *length, 0xff, pad_len);
You cannot write to the caller's buffer (or worse, past the end of the caller's buffer) like this. You'll need to allocate a new, padded buffer.
-Scott