Commit 9275b933 authored by kbuild test robot's avatar kbuild test robot Committed by Thomas Gleixner
Browse files

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: 1d2e733b

 ("resource: Provide resource struct in resource walk callback")
Signed-off-by: default avatarFengguang Wu <>
Signed-off-by: default avatarThomas Gleixner <>
Cc: Juergen Gross <>
Cc: Tom Lendacky <>
Cc: Brijesh Singh <>
Cc: Kees Cook <>
Cc: Michael Ellerman <>
Cc: Borislav Petkov <>
parent 819aeee0
......@@ -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;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment