[PATCH] mtd: sh_flctl: add support for Renesas SuperH FLCTL

Yoshihiro Shimoda shimoda.yoshihiro at renesas.com
Thu Sep 18 08:25:57 EDT 2008


Paul Mundt wrote:
> On Tue, Sep 09, 2008 at 05:00:30PM +0900, Yoshihiro Shimoda wrote:
>> Several Renesas SuperH CPU has FLCTL. The FLCTL support NAND Flash.
>> This driver support SH7723.
>>
>> Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro at renesas.com>
> 
>> +	flctl->reg = ioremap(res->start, res->end - res->start);
>> +	if (flctl->reg == NULL) {
>> +		printk(KERN_ERR "%s: ioremap error.\n", __func__);
>> +		ret = -ENOMEM;
>> +		goto err;
>> +	}
>> +
> You have an off-by-1 here, this wants to be res->end - res->start + 1.
> 
> Other than that, it looks ok to me at first glance.
> 
> Acked-by: Paul Mundt <lethal at linux-sh.org>
> 

Thank you for your comment. I'll fix up this code.

thanks,
Yoshihiro Shimoda




More information about the linux-mtd mailing list