Re: [PATCH] PNX8550 NAND flash driver

Todd Poynor
2006-02-22T01:18:03Z

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