]> Pileus Git - ~andy/linux/commitdiff
tpm: fix tpm_acpi sparse warning on different address spaces
authorKent Yoder <key@linux.vnet.ibm.com>
Tue, 4 Sep 2012 16:18:21 +0000 (11:18 -0500)
committerJames Morris <james.l.morris@oracle.com>
Wed, 12 Sep 2012 03:18:31 +0000 (13:18 +1000)
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>
drivers/char/tpm/tpm_acpi.c

index fe3fa9431dc9615e5e09024a68e588cb168061ab..56051d0c97a25caa4872d274d1c526d3368453e7 100644 (file)
@@ -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;