linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julia Lawall <Julia.Lawall@inria.fr>
To: Scott Wood <oss@buserror.net>
Cc: kernel-janitors@vger.kernel.org,
	Kumar Gala <galak@kernel.crashing.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH 05/10] powerpc/83xx: use resource_size
Date: Wed,  1 Jan 2020 18:49:45 +0100	[thread overview]
Message-ID: <1577900990-8588-6-git-send-email-Julia.Lawall@inria.fr> (raw)
In-Reply-To: <1577900990-8588-1-git-send-email-Julia.Lawall@inria.fr>

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>

---
 arch/powerpc/platforms/83xx/km83xx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/83xx/km83xx.c b/arch/powerpc/platforms/83xx/km83xx.c
index 3d89569e9e71..ada42f03915a 100644
--- a/arch/powerpc/platforms/83xx/km83xx.c
+++ b/arch/powerpc/platforms/83xx/km83xx.c
@@ -63,7 +63,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


  parent reply	other threads:[~2020-01-01 18:26 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-01 17:49 [PATCH 00/10] use resource_size Julia Lawall
2020-01-01 17:49 ` [PATCH 01/10] USB: omap_udc: " Julia Lawall
2020-01-01 17:49 ` [PATCH 02/10] ALSA: ml403-ac97cr: " Julia Lawall
2020-01-01 19:17   ` Takashi Iwai
2020-01-01 19:23     ` Julia Lawall
2020-01-02 15:13       ` Takashi Iwai
2020-01-01 17:49 ` [PATCH 03/10] fbdev: s1d13xxxfb: " Julia Lawall
2020-01-15 16:06   ` Bartlomiej Zolnierkiewicz
2020-01-01 17:49 ` [PATCH 04/10] fsl/fman: " Julia Lawall
2020-01-03  0:31   ` David Miller
2020-01-01 17:49 ` Julia Lawall [this message]
2020-01-06 18:06   ` [PATCH 05/10] powerpc/83xx: " Scott Wood
2020-01-29  5:17   ` Michael Ellerman
2020-01-01 17:49 ` [PATCH 06/10] ASoC: SOF: imx8: " Julia Lawall
2020-01-01 21:41   ` Applied "ASoC: SOF: imx8: use resource_size" to the asoc tree Mark Brown
2020-01-01 17:49 ` [PATCH 07/10] video: fbdev: use resource_size Julia Lawall
2020-01-15 16:10   ` Bartlomiej Zolnierkiewicz
2020-01-01 17:49 ` [PATCH 08/10] MIPS: " Julia Lawall
2020-01-01 22:25   ` Philippe Mathieu-Daudé
2020-01-10 19:36   ` Paul Burton
2020-01-01 17:49 ` [PATCH 09/10] x86/crash: " Julia Lawall
2020-01-09 13:47   ` [tip: x86/cleanups] x86/crash: Use resource_size() tip-bot2 for Julia Lawall
2020-01-01 17:49 ` [PATCH 10/10] powerpc/powernv: use resource_size Julia Lawall
2020-01-29  5:17   ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1577900990-8588-6-git-send-email-Julia.Lawall@inria.fr \
    --to=julia.lawall@inria.fr \
    --cc=benh@kernel.crashing.org \
    --cc=galak@kernel.crashing.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=oss@buserror.net \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).