Skip to content

Commit

Permalink
tpm: fix tpm_acpi sparse warning on different address spaces
Browse files Browse the repository at this point in the history
acpi_os_map_memory expects its return value to be in the __iomem address
space. Tag the variable we're using as such and use memcpy_fromio to
avoid further sparse warnings.

Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
  • Loading branch information
Kent Yoder authored and James Morris committed Sep 12, 2012
1 parent 9ddf6aa commit a40695e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/char/tpm/tpm_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ int read_log(struct tpm_bios_log *log)
{
struct acpi_tcpa *buff;
acpi_status status;
struct acpi_table_header *virt;
void __iomem *virt;
u64 len, start;

if (log->bios_event_log != NULL) {
Expand Down Expand Up @@ -102,7 +102,7 @@ int read_log(struct tpm_bios_log *log)
return -EIO;
}

memcpy(log->bios_event_log, virt, len);
memcpy_fromio(log->bios_event_log, virt, len);

acpi_os_unmap_memory(virt, len);
return 0;
Expand Down

0 comments on commit a40695e

Please sign in to comment.