aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/83xx
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@inria.fr>2020-01-01 18:49:45 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2020-01-07 22:04:40 +1100
commitbfbe37f0ce994e7a9945653d7624fadc5c500a9f (patch)
treed27024ac860ff294ceafaa732a8e6d430305bf5a /arch/powerpc/platforms/83xx
parentpowerpc/mpic: constify copied structure (diff)
downloadlinux-dev-bfbe37f0ce994e7a9945653d7624fadc5c500a9f.tar.xz
linux-dev-bfbe37f0ce994e7a9945653d7624fadc5c500a9f.zip
powerpc/83xx: use resource_size
Use resource_size rather than a verbose computation on the end and start fields. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) <smpl> @@ struct resource ptr; @@ - (ptr.end - ptr.start + 1) + resource_size(&ptr) </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Acked-by: Scott Wood <oss@buserror.net> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/1577900990-8588-6-git-send-email-Julia.Lawall@inria.fr
Diffstat (limited to 'arch/powerpc/platforms/83xx')
-rw-r--r--arch/powerpc/platforms/83xx/km83xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/83xx/km83xx.c b/arch/powerpc/platforms/83xx/km83xx.c
index 273145aed90a..b0d5471f620d 100644
--- a/arch/powerpc/platforms/83xx/km83xx.c
+++ b/arch/powerpc/platforms/83xx/km83xx.c
@@ -64,7 +64,7 @@ static void quirk_mpc8360e_qe_enet10(void)
return;
}
- base = ioremap(res.start, res.end - res.start + 1);
+ base = ioremap(res.start, resource_size(&res));
/*
* set output delay adjustments to default values according