From: Todd Poynor <tpoynor@mvista.com>
To: "Vladimir A. Barinov" <vbarinov@ru.mvista.com>
Cc: linux-mips@linux-mips.org, linux-mtd@lists.infradead.org
Subject: Re: [PATCH] PNX8550 NAND flash driver
Date: Tue, 21 Feb 2006 16:57:35 -0800 [thread overview]
Message-ID: <43FBB6FF.4070203@mvista.com> (raw)
In-Reply-To: <43F1D439.60205@ru.mvista.com>
Hi Vladimir -- a couple comments.
> + PNX8550_XIO_FLASH_CTRL = reg_nand;
> + barrier();
> +}
barrier() at the end of a function shouldn't be needed, function exit is
an implicit optimizer flush?
> + pnx8550_nand_alloc_transfer_buffer();
> +
> + memcpy(transferBuffer, buf, len);
Something should check for NULL return from kmalloc in both places this
is called.
> + /* Scan to find existence of the device */
> + if (nand_scan(&pnx8550_mtd, 1)) {
> + printk(KERN_ERR "No NAND devices\n");
> + return -ENXIO;
> + }
> +
> + if (!transferBuffer) {
> + printk(KERN_ERR
> + "Unable to allocate NAND data buffer for PNX8550\n");
> + return -ENOMEM;
> + }
Not sure why transferBuffer was expected to be allocated at this point
(only when first read/write_buf called, scan does read_byte)?
--
Todd
next prev parent reply other threads:[~2006-02-22 1:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-16 17:23 [PATCH] PNX8550 NAND flash driver Vladimir A. Barinov
2005-12-20 14:28 ` Vladimir A. Barinov
2006-01-12 18:24 ` Todd Poynor
2006-02-14 13:00 ` Vladimir A. Barinov
2006-02-22 0:57 ` Todd Poynor [this message]
2006-07-10 9:53 ` Thomas Gleixner
2006-07-25 18:34 ` Jurgen
2006-07-26 7:02 ` Thomas Gleixner
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=43FBB6FF.4070203@mvista.com \
--to=tpoynor@mvista.com \
--cc=linux-mips@linux-mips.org \
--cc=linux-mtd@lists.infradead.org \
--cc=vbarinov@ru.mvista.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