mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] firmware: dcdbas: include linux/io.h
@ 2018-10-02 21:16 Arnd Bergmann
  2018-10-03 11:20 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2018-10-02 21:16 UTC (permalink / raw)
  To: Stuart Hayes, Darren Hart, Andy Shevchenko
  Cc: Arnd Bergmann, platform-driver-x86, linux-kernel

memremap() is declared in linux/io.h, not in asm/io.h, so we should
include that header to avoid build errors:

drivers/platform/x86/dcdbas.c: In function 'dcdbas_check_wsmt':
drivers/platform/x86/dcdbas.c:572:15: error: implicit declaration of function 'memremap'; did you mean 'ioremap'? [-Werror=implicit-function-declaration]
  eps_buffer = memremap(eps->smm_comm_buff_addr, remap_size, MEMREMAP_WB);
               ^~~~~~~~
               ioremap
drivers/platform/x86/dcdbas.c:572:61: error: 'MEMREMAP_WB' undeclared (first use in this function)
  eps_buffer = memremap(eps->smm_comm_buff_addr, remap_size, MEMREMAP_WB);
                                                             ^~~~~~~~~~~
drivers/platform/x86/dcdbas.c:572:61: note: each undeclared identifier is reported only once for each function it appears in
drivers/platform/x86/dcdbas.c: In function 'dcdbas_exit':
drivers/platform/x86/dcdbas.c:748:3: error: implicit declaration of function 'memunmap'; did you mean 'vm_munmap'? [-Werror=implicit-function-declaration]

Fixes: 12c956c4f32e ("firmware: dcdbas: Add support for WSMT ACPI table")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/platform/x86/dcdbas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/dcdbas.c b/drivers/platform/x86/dcdbas.c
index ae28e48ff7dc..daa7e3574568 100644
--- a/drivers/platform/x86/dcdbas.c
+++ b/drivers/platform/x86/dcdbas.c
@@ -37,7 +37,7 @@
 #include <linux/string.h>
 #include <linux/types.h>
 #include <linux/mutex.h>
-#include <asm/io.h>
+#include <linux/io.h>
 
 #include "dcdbas.h"
 
-- 
2.18.0


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

* Re: [PATCH] firmware: dcdbas: include linux/io.h
  2018-10-02 21:16 [PATCH] firmware: dcdbas: include linux/io.h Arnd Bergmann
@ 2018-10-03 11:20 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2018-10-03 11:20 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Stuart Hayes, Darren Hart, Andy Shevchenko, Platform Driver,
	Linux Kernel Mailing List

On Wed, Oct 3, 2018 at 12:17 AM Arnd Bergmann <arnd@arndb.de> wrote:
>
> memremap() is declared in linux/io.h, not in asm/io.h, so we should
> include that header to avoid build errors:
>
> drivers/platform/x86/dcdbas.c: In function 'dcdbas_check_wsmt':
> drivers/platform/x86/dcdbas.c:572:15: error: implicit declaration of function 'memremap'; did you mean 'ioremap'? [-Werror=implicit-function-declaration]
>   eps_buffer = memremap(eps->smm_comm_buff_addr, remap_size, MEMREMAP_WB);
>                ^~~~~~~~
>                ioremap
> drivers/platform/x86/dcdbas.c:572:61: error: 'MEMREMAP_WB' undeclared (first use in this function)
>   eps_buffer = memremap(eps->smm_comm_buff_addr, remap_size, MEMREMAP_WB);
>                                                              ^~~~~~~~~~~
> drivers/platform/x86/dcdbas.c:572:61: note: each undeclared identifier is reported only once for each function it appears in
> drivers/platform/x86/dcdbas.c: In function 'dcdbas_exit':
> drivers/platform/x86/dcdbas.c:748:3: error: implicit declaration of function 'memunmap'; did you mean 'vm_munmap'? [-Werror=implicit-function-declaration]
>

Pushed to for-next, sorry for inconveniences and thanks for the quick fix!

> Fixes: 12c956c4f32e ("firmware: dcdbas: Add support for WSMT ACPI table")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/platform/x86/dcdbas.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/dcdbas.c b/drivers/platform/x86/dcdbas.c
> index ae28e48ff7dc..daa7e3574568 100644
> --- a/drivers/platform/x86/dcdbas.c
> +++ b/drivers/platform/x86/dcdbas.c
> @@ -37,7 +37,7 @@
>  #include <linux/string.h>
>  #include <linux/types.h>
>  #include <linux/mutex.h>
> -#include <asm/io.h>
> +#include <linux/io.h>
>
>  #include "dcdbas.h"
>
> --
> 2.18.0
>


-- 
With Best Regards,
Andy Shevchenko

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

end of thread, other threads:[~2018-10-03 11:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-02 21:16 [PATCH] firmware: dcdbas: include linux/io.h Arnd Bergmann
2018-10-03 11:20 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®