RE: NOR read/write beyond end of flash partition

Tigadi Kiran-r10350c
2006-12-01T09:48:23Z

Hi Artem,

As write routine implementation has -ENOSPC, I created patch with read routine returning same value.

So, please let me know which patch is valid?

Regards,
Kiran

-----Original Message-----
From: Artem Bityutskiy [mailto:dedekind@infradead.org]
Sent: Friday, December 01, 2006 2:14 PM
To: Tigadi Kiran-r10350c
Cc: linux-mtd@lists.infradead.org
Subject: RE: NOR read/write beyond end of flash partition

On Thu, 2006-11-30 at 21:23 +0530, Tigadi Kiran-r10350c wrote:
> Hi Artem,
>
> Please find attached patch for drivers/mtd/mtdchar.c file to fix NOR read beyond flash. Let me know whether it is valid fix.

I've looked at the code. Your patch is incorrect as mtd_read() should
return EOF if *ppos == mtd->size, not -ENOSPC.