All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] firmware: vpd: Drop __iomem usage for memremap() memory
@ 2019-03-18 15:54 Stephen Boyd
  2019-03-18 18:36 ` Guenter Roeck
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Boyd @ 2019-03-18 15:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, Guenter Roeck, Dmitry Torokhov, Anton Vasilyev

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>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Anton Vasilyev <vasilyev@ispras.ru>
Smgned-off-by: Stephen Boyd <swboyd@chromium.org>
---
 drivers/firmware/google/vpd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/firmware/google/vpd.c b/drivers/firmware/google/vpd.c
index c0c0b4e4e281..f240946ed701 100644
--- a/drivers/firmware/google/vpd.c
+++ b/drivers/firmware/google/vpd.c
@@ -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)
-- 
Sent by a computer through tubes


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] firmware: vpd: Drop __iomem usage for memremap() memory
  2019-03-18 15:54 [PATCH] firmware: vpd: Drop __iomem usage for memremap() memory Stephen Boyd
@ 2019-03-18 18:36 ` Guenter Roeck
  2019-03-18 19:38   ` Stephen Boyd
  0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2019-03-18 18:36 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Greg Kroah-Hartman, linux-kernel, Dmitry Torokhov, Anton Vasilyev

On Mon, Mar 18, 2019 at 08:54:57AM -0700, Stephen Boyd wrote:
> 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>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Anton Vasilyev <vasilyev@ispras.ru>
> Smgned-off-by: Stephen Boyd <swboyd@chromium.org>

Smgned ?

Other than that,

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/firmware/google/vpd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/firmware/google/vpd.c b/drivers/firmware/google/vpd.c
> index c0c0b4e4e281..f240946ed701 100644
> --- a/drivers/firmware/google/vpd.c
> +++ b/drivers/firmware/google/vpd.c
> @@ -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)
> -- 
> Sent by a computer through tubes
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] firmware: vpd: Drop __iomem usage for memremap() memory
  2019-03-18 18:36 ` Guenter Roeck
@ 2019-03-18 19:38   ` Stephen Boyd
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2019-03-18 19:38 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Greg Kroah-Hartman, linux-kernel, Dmitry Torokhov, Anton Vasilyev

Quoting Guenter Roeck (2019-03-18 11:36:36)
> On Mon, Mar 18, 2019 at 08:54:57AM -0700, Stephen Boyd wrote:
> > 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>
> > Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > Cc: Anton Vasilyev <vasilyev@ispras.ru>
> > Smgned-off-by: Stephen Boyd <swboyd@chromium.org>
> 
> Smgned ?

Hm, something went wrong!

> 
> Other than that,
> 
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>

Thanks. I'll resend with everything fixed.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-18 19:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-18 15:54 [PATCH] firmware: vpd: Drop __iomem usage for memremap() memory Stephen Boyd
2019-03-18 18:36 ` Guenter Roeck
2019-03-18 19:38   ` Stephen Boyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.