public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Bug in physmap driver?
@ 2009-04-16 15:00 David Howells
  2009-04-16 15:06 ` Lennert Buytenhek
  0 siblings, 1 reply; 6+ messages in thread
From: David Howells @ 2009-04-16 15:00 UTC (permalink / raw)
  To: David Woodhouse; +Cc: dhowells, linux-mtd



In physmap_flash_probe(), isn't the '+ 1' in:

		info->map[i].size = dev->resource[i].end - dev->resource[i].start + 1;

incorrect?  It results in an artificially inflated size:

(gdb) p info->map[0]
$7 = {name = 0xc08aa520 "physmap-flash.0", size = 0x200001, phys = 0xff000000, virt = 0x0, cached = 0x0, bankwidth = 0x4, read = 0, copy_from = 0, write = 0, copy_to = 0, inval_cache = 0, set_vpp = 0, pfow_base = 0x0, map_priv_1 = 0x0, map_priv_2 = 0x0, fldrv_priv = 0x0, fldrv = 0x0}

which is then handed to devm_ioremap().

David

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-04-16 16:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-16 15:00 Bug in physmap driver? David Howells
2009-04-16 15:06 ` Lennert Buytenhek
2009-04-16 15:09   ` David Howells
2009-04-16 15:14     ` Lennert Buytenhek
2009-04-16 15:27       ` David Howells
2009-04-16 16:23         ` Nicolas Pitre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox