]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
firmware: vpd: Drop __iomem usage for memremap() memory
authorStephen Boyd <swboyd@chromium.org>
Mon, 18 Mar 2019 19:41:16 +0000 (12:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Mar 2019 17:21:29 +0000 (02:21 +0900)
memremap() doesn't return an iomem pointer, so we can just use memcpy()
and drop the __iomem annotation here. This silences a sparse warning.

Cc: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Anton Vasilyev <vasilyev@ispras.ru>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/google/vpd.c

index c0c0b4e4e281c61801bc8df219b927aa869135a6..f240946ed701cb08913b5047e75b99ec4fd4d6f0 100644 (file)
@@ -254,7 +254,7 @@ static int vpd_section_destroy(struct vpd_section *sec)
 
 static int vpd_sections_init(phys_addr_t physaddr)
 {
-       struct vpd_cbmem __iomem *temp;
+       struct vpd_cbmem *temp;
        struct vpd_cbmem header;
        int ret = 0;
 
@@ -262,7 +262,7 @@ static int vpd_sections_init(phys_addr_t physaddr)
        if (!temp)
                return -ENOMEM;
 
-       memcpy_fromio(&header, temp, sizeof(struct vpd_cbmem));
+       memcpy(&header, temp, sizeof(struct vpd_cbmem));
        memunmap(temp);
 
        if (header.magic != VPD_CBMEM_MAGIC)