Skip to content

Commit

Permalink
x86/efi: Use early_memunmap() to squelch sparse errors
Browse files Browse the repository at this point in the history
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] <asn:2>*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] <asn:2>*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
9e5c33d ("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 <dyoung@redhat.com>
Cc: Saurabh Tangri <saurabh.tangri@intel.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
  • Loading branch information
Matt Fleming committed Jun 19, 2014
1 parent eeb9db0 commit 98a716b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/platform/efi/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 98a716b

Please sign in to comment.