summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-11-11 23:05:07 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2010-11-12 16:55:30 +0100
commit88cf81fc8944a6892db104caaa490885d48b959c (patch)
tree47d5577fce949c58f2d69fdde549ba76e69ce770 /block
parentdrivers/macintosh/adb-iop.c: flags should be unsigned long (diff)
downloadlinux-88cf81fc8944a6892db104caaa490885d48b959c.tar.xz
linux-88cf81fc8944a6892db104caaa490885d48b959c.zip
rapidio: use resource_size()
The size calculation is done incorrectly here because it should include both the start and end (end - start + 1). It's easiest to just use resource_size() which does the right thing. I was worried there was something non-standard going on because the printk() subtracts "end - 1", but the rest of the file uses the normal resource size calculations. This function is only called from fsl_rio_setup() in arch/powerpc/sysdev/fsl_rio.c and the calculation there is also: port->iores.start = law_start; port->iores.end = law_start + law_size - 1; So I think this is the correct fix. Signed-off-by: Dan Carpenter <error27@gmail.com> Cc: Alexandre Bounine <alexandre.bounine@idt.com> Acked-by: Li Yang <leoli@freescale.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions