All of lore.kernel.org
 help / color / mirror / Atom feed
* [tip:x86/asm 9/17] arch/x86/kernel/crash.c:627:34-37: ERROR: Missing resource_size with res
@ 2017-11-07 19:18 kbuild test robot
  2017-11-07 19:18 ` [PATCH] resource: fix resource_size.cocci warnings kbuild test robot
  0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2017-11-07 19:18 UTC (permalink / raw)
  To: Tom Lendacky
  Cc: kbuild-all, linux-kernel, tipbuild, Thomas Gleixner,
	Brijesh Singh, Kees Cook, Borislav Petkov

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/asm
head:   819aeee065e5d1b417ecd633897427c89f3253ec
commit: 1d2e733b13b450e5854f4a8f8efcd77fa7362d62 [9/17] resource: Provide resource struct in resource walk callback


coccinelle warnings: (new ones prefixed by >>)

>> arch/x86/kernel/crash.c:627:34-37: ERROR: Missing resource_size with res
   arch/x86/kernel/crash.c:528:16-19: ERROR: Missing resource_size with res

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

* [PATCH] resource: fix resource_size.cocci warnings
  2017-11-07 19:18 [tip:x86/asm 9/17] arch/x86/kernel/crash.c:627:34-37: ERROR: Missing resource_size with res kbuild test robot
@ 2017-11-07 19:18 ` kbuild test robot
  2017-11-07 19:49   ` [tip:x86/asm] resource: Fix " tip-bot for kbuild test robot
  0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2017-11-07 19:18 UTC (permalink / raw)
  To: Tom Lendacky
  Cc: kbuild-all, linux-kernel, tipbuild, Thomas Gleixner,
	Brijesh Singh, Kees Cook, Borislav Petkov, Ingo Molnar,
	H. Peter Anvin, x86, Michael Ellerman, Juergen Gross

arch/x86/kernel/crash.c:627:34-37: ERROR: Missing resource_size with res
arch/x86/kernel/crash.c:528:16-19: ERROR: Missing resource_size with res


 Use resource_size function on resource object
 instead of explicit computation.

Generated by: scripts/coccinelle/api/resource_size.cocci

Fixes: 1d2e733b13b4 ("resource: Provide resource struct in resource walk callback")
CC: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 crash.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/x86/kernel/crash.c
+++ b/arch/x86/kernel/crash.c
@@ -525,7 +525,7 @@ static int memmap_entry_callback(struct
 	struct e820_entry ei;
 
 	ei.addr = res->start;
-	ei.size = res->end - res->start + 1;
+	ei.size = resource_size(res);
 	ei.type = cmd->type;
 	add_e820_entry(params, &ei);
 
@@ -624,7 +624,7 @@ static int determine_backup_region(struc
 	struct kimage *image = arg;
 
 	image->arch.backup_src_start = res->start;
-	image->arch.backup_src_sz = res->end - res->start + 1;
+	image->arch.backup_src_sz = resource_size(res);
 
 	/* Expecting only one range for backup region */
 	return 1;

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

* [tip:x86/asm] resource: Fix resource_size.cocci warnings
  2017-11-07 19:18 ` [PATCH] resource: fix resource_size.cocci warnings kbuild test robot
@ 2017-11-07 19:49   ` tip-bot for kbuild test robot
  0 siblings, 0 replies; 3+ messages in thread
From: tip-bot for kbuild test robot @ 2017-11-07 19:49 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: bp, linux-kernel, keescook, fengguang.wu, tglx, mingo, hpa,
	thomas.lendacky, jgross, brijesh.singh, mpe

Commit-ID:  9275b933d409d3a4efa08102ca813557b93fb0b9
Gitweb:     https://git.kernel.org/tip/9275b933d409d3a4efa08102ca813557b93fb0b9
Author:     kbuild test robot <fengguang.wu@intel.com>
AuthorDate: Wed, 8 Nov 2017 03:18:01 +0800
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 7 Nov 2017 20:44:56 +0100

resource: Fix resource_size.cocci warnings

arch/x86/kernel/crash.c:627:34-37: ERROR: Missing resource_size with res
arch/x86/kernel/crash.c:528:16-19: ERROR: Missing resource_size with res

 Use resource_size function on resource object
 instead of explicit computation.

Generated by: scripts/coccinelle/api/resource_size.cocci

Fixes: 1d2e733b13b4 ("resource: Provide resource struct in resource walk callback")
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Juergen Gross <jgross@suse.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: kbuild-all@01.org
Cc: tipbuild@zytor.com
Cc: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20171107191801.GA91887@lkp-snb01

---
 arch/x86/kernel/crash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
index 815008c..10e74d4 100644
--- a/arch/x86/kernel/crash.c
+++ b/arch/x86/kernel/crash.c
@@ -525,7 +525,7 @@ static int memmap_entry_callback(struct resource *res, void *arg)
 	struct e820_entry ei;
 
 	ei.addr = res->start;
-	ei.size = res->end - res->start + 1;
+	ei.size = resource_size(res);
 	ei.type = cmd->type;
 	add_e820_entry(params, &ei);
 
@@ -624,7 +624,7 @@ static int determine_backup_region(struct resource *res, void *arg)
 	struct kimage *image = arg;
 
 	image->arch.backup_src_start = res->start;
-	image->arch.backup_src_sz = res->end - res->start + 1;
+	image->arch.backup_src_sz = resource_size(res);
 
 	/* Expecting only one range for backup region */
 	return 1;

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

end of thread, other threads:[~2017-11-07 19:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-07 19:18 [tip:x86/asm 9/17] arch/x86/kernel/crash.c:627:34-37: ERROR: Missing resource_size with res kbuild test robot
2017-11-07 19:18 ` [PATCH] resource: fix resource_size.cocci warnings kbuild test robot
2017-11-07 19:49   ` [tip:x86/asm] resource: Fix " tip-bot for kbuild test robot

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.