From: Matt Fleming Date: Mon, 9 Jun 2014 12:41:26 +0000 (+0100) Subject: x86/efi: Use early_memunmap() to squelch sparse errors X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=98a716b66cab993e15001c7ec06f637ca6f1079b;p=openwrt%2Fstaging%2Fblogic.git x86/efi: Use early_memunmap() to squelch sparse errors The kbuild reports the following sparse errors, >> arch/x86/platform/efi/quirks.c:242:23: sparse: incorrect type in >> argument 1 (different address spaces) arch/x86/platform/efi/quirks.c:242:23: expected void [noderef] *addr arch/x86/platform/efi/quirks.c:242:23: got void *[assigned] tablep >> arch/x86/platform/efi/quirks.c:245:23: sparse: incorrect type in >> argument 1 (different address spaces) arch/x86/platform/efi/quirks.c:245:23: expected void [noderef] *addr arch/x86/platform/efi/quirks.c:245:23: got struct efi_setup_data *[assigned] data Dave Young had made previous attempts to convert the early_iounmap() calls to early_memunmap() but ran into merge conflicts with commit 9e5c33d7aeee ("mm: create generic early_ioremap() support"). Now that we've got that commit in place we can switch to using early_memunmap() since we're already using early_memremap() in efi_reuse_config(). Cc: Dave Young Cc: Saurabh Tangri Signed-off-by: Matt Fleming --- diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c index 7e3099c610dd..b4cb9182f155 100644 --- a/arch/x86/platform/efi/quirks.c +++ b/arch/x86/platform/efi/quirks.c @@ -239,10 +239,10 @@ int __init efi_reuse_config(u64 tables, int nr_tables) ((efi_config_table_64_t *)p)->table = data->smbios; p += sz; } - early_iounmap(tablep, nr_tables * sz); + early_memunmap(tablep, nr_tables * sz); out_memremap: - early_iounmap(data, sizeof(*data)); + early_memunmap(data, sizeof(*data)); out: return ret; }