firmware: vpd: Drop __iomem usage for memremap() memory
PATCH 1/1 firmware: vpd: Drop __iomem usage for memremap() memory
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 <[email protected]>
Cc Dmitry Torokhov <[email protected]>
Cc Anton Vasilyev <[email protected]>
Smgned-off-by Stephen Boyd <[email protected]>
--- drivers/firmware/google/vpd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/firmware/google/vpd.c +2 -2
@@ -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 )
Signature · 1 line
Sent by a computer through tubes
Quoted 7 lines · Stephen Boyd
memremap()doesn't return an iomem pointer, so we can just usememcpy()and drop the__iomemannotation here. This silences a sparse warning.Cc Guenter Roeck <[email protected]>Cc Dmitry Torokhov <[email protected]>Cc Anton Vasilyev <[email protected]>Smgned-off-by Stephen Boyd <[email protected]>
Smgned ?
Other than that,
Reviewed-by Guenter Roeck <[email protected]>
Quoted 29 lines
--- drivers/firmware/google/vpd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/firmware/google/vpd.c +2
-2@@ -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 )Signature · 1 line
Sent by a computer through tubes
Quoting Guenter Roeck (2019-03-18 11:36:36)
Quoted 10 lines · Stephen Boyd
Quoted 7 lines
memremap()doesn't return an iomem pointer, so we can just usememcpy()and drop the__iomemannotation here. This silences a sparse warning.Cc Guenter Roeck <[email protected]>Cc Dmitry Torokhov <[email protected]>Cc Anton Vasilyev <[email protected]>Smgned-off-by Stephen Boyd <[email protected]>Smgned ?
Hm, something went wrong!
Quoted 4 lines
Other than that,
Reviewed-by Guenter Roeck <[email protected]>
Thanks. I'll resend with everything fixed.