All of lore.kernel.org
 help / color / mirror / Atom feed
From: "tip-bot2 for Julia Lawall" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Julia Lawall <Julia.Lawall@inria.fr>,
	Borislav Petkov <bp@suse.de>, x86 <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: [tip: x86/cleanups] x86/crash: Use resource_size()
Date: Thu, 09 Jan 2020 13:47:34 -0000	[thread overview]
Message-ID: <157857765487.30329.12185541615823835729.tip-bot2@tip-bot2> (raw)
In-Reply-To: <1577900990-8588-10-git-send-email-Julia.Lawall@inria.fr>

The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     1429b568ad71943a374aa4a8d3772d5a8816ddba
Gitweb:        https://git.kernel.org/tip/1429b568ad71943a374aa4a8d3772d5a8816ddba
Author:        Julia Lawall <Julia.Lawall@inria.fr>
AuthorDate:    Wed, 01 Jan 2020 18:49:49 +01:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Thu, 09 Jan 2020 14:40:03 +01:00

x86/crash: 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>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/1577900990-8588-10-git-send-email-Julia.Lawall@inria.fr
---
 arch/x86/kernel/crash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
index 00fc55a..fd87b59 100644
--- a/arch/x86/kernel/crash.c
+++ b/arch/x86/kernel/crash.c
@@ -370,7 +370,7 @@ int crash_setup_memmap_entries(struct kimage *image, struct boot_params *params)
 	/* Add crashk_low_res region */
 	if (crashk_low_res.end) {
 		ei.addr = crashk_low_res.start;
-		ei.size = crashk_low_res.end - crashk_low_res.start + 1;
+		ei.size = resource_size(&crashk_low_res);
 		ei.type = E820_TYPE_RAM;
 		add_e820_entry(params, &ei);
 	}

  reply	other threads:[~2020-01-09 13:47 UTC|newest]

Thread overview: 68+ 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 ` Julia Lawall
2020-01-01 17:49 ` Julia Lawall
2020-01-01 17:49 ` Julia Lawall
2020-01-01 17:49 ` [alsa-devel] " Julia Lawall
2020-01-01 17:49 ` Julia Lawall
2020-01-01 17:49 ` [PATCH 01/10] USB: omap_udc: " Julia Lawall
2020-01-01 17:49   ` Julia Lawall
2020-01-01 17:49 ` [PATCH 02/10] ALSA: ml403-ac97cr: " Julia Lawall
2020-01-01 17:49   ` [alsa-devel] " Julia Lawall
2020-01-01 17:49   ` Julia Lawall
2020-01-01 19:17   ` Takashi Iwai
2020-01-01 19:17     ` [alsa-devel] " Takashi Iwai
2020-01-01 19:17     ` Takashi Iwai
2020-01-01 19:23     ` Julia Lawall
2020-01-01 19:23       ` [alsa-devel] " Julia Lawall
2020-01-01 19:23       ` Julia Lawall
2020-01-02 15:13       ` Takashi Iwai
2020-01-02 15:13         ` [alsa-devel] " Takashi Iwai
2020-01-02 15:13         ` Takashi Iwai
2020-01-01 17:49 ` [PATCH 03/10] fbdev: s1d13xxxfb: " Julia Lawall
2020-01-01 17:49   ` Julia Lawall
2020-01-01 17:49   ` Julia Lawall
2020-01-15 16:06   ` Bartlomiej Zolnierkiewicz
2020-01-15 16:06     ` Bartlomiej Zolnierkiewicz
2020-01-15 16:06     ` Bartlomiej Zolnierkiewicz
2020-01-01 17:49 ` [PATCH 04/10] fsl/fman: " Julia Lawall
2020-01-01 17:49   ` Julia Lawall
2020-01-03  0:31   ` David Miller
2020-01-03  0:31     ` David Miller
2020-01-01 17:49 ` [PATCH 05/10] powerpc/83xx: " Julia Lawall
2020-01-01 17:49   ` Julia Lawall
2020-01-01 17:49   ` Julia Lawall
2020-01-06 18:06   ` Scott Wood
2020-01-06 18:06     ` Scott Wood
2020-01-06 18:06     ` Scott Wood
2020-01-29  5:17   ` Michael Ellerman
2020-01-29  5:17     ` Michael Ellerman
2020-01-29  5:17     ` Michael Ellerman
2020-01-01 17:49 ` [PATCH 06/10] ASoC: SOF: imx8: " Julia Lawall
2020-01-01 17:49   ` Julia Lawall
2020-01-01 17:49   ` [alsa-devel] " Julia Lawall
2020-01-01 17:49   ` Julia Lawall
2020-01-01 21:41   ` Applied "ASoC: SOF: imx8: use resource_size" to the asoc tree Mark Brown
2020-01-01 21:41     ` Mark Brown
2020-01-01 21:41     ` [alsa-devel] " Mark Brown
2020-01-01 21:41     ` Mark Brown
2020-01-01 17:49 ` [PATCH 07/10] video: fbdev: use resource_size Julia Lawall
2020-01-01 17:49   ` Julia Lawall
2020-01-01 17:49   ` Julia Lawall
2020-01-15 16:10   ` Bartlomiej Zolnierkiewicz
2020-01-15 16:10     ` Bartlomiej Zolnierkiewicz
2020-01-15 16:10     ` Bartlomiej Zolnierkiewicz
2020-01-01 17:49 ` [PATCH 08/10] MIPS: " Julia Lawall
2020-01-01 17:49   ` Julia Lawall
2020-01-01 22:25   ` Philippe Mathieu-Daudé
2020-01-01 22:25     ` Philippe Mathieu-Daudé
2020-01-10 19:36   ` Paul Burton
2020-01-10 19:36     ` Paul Burton
2020-01-01 17:49 ` [PATCH 09/10] x86/crash: " Julia Lawall
2020-01-01 17:49   ` Julia Lawall
2020-01-09 13:47   ` tip-bot2 for Julia Lawall [this message]
2020-01-01 17:49 ` [PATCH 10/10] powerpc/powernv: " Julia Lawall
2020-01-01 17:49   ` Julia Lawall
2020-01-01 17:49   ` Julia Lawall
2020-01-29  5:17   ` Michael Ellerman
2020-01-29  5:17     ` Michael Ellerman
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=157857765487.30329.12185541615823835729.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=Julia.Lawall@inria.fr \
    --cc=bp@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=x86@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.