From: Kent Yoder Date: Tue, 4 Sep 2012 16:18:21 +0000 (-0500) Subject: tpm: fix tpm_acpi sparse warning on different address spaces X-Git-Tag: upstream/snapshot3+hdmi~5243^2~70 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a40695edad6a69561b299272028c172e2d981666;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git tpm: fix tpm_acpi sparse warning on different address spaces 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 Signed-off-by: James Morris --- diff --git a/drivers/char/tpm/tpm_acpi.c b/drivers/char/tpm/tpm_acpi.c index fe3fa94..56051d0 100644 --- a/drivers/char/tpm/tpm_acpi.c +++ b/drivers/char/tpm/tpm_acpi.c @@ -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) { @@ -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;