linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: r8188eu: os_dep: Hoist vmalloc.h include into osdep_service.h
@ 2021-08-11  0:55 Nathan Chancellor
  2021-08-11  1:28 ` Larry Finger
  0 siblings, 1 reply; 2+ messages in thread
From: Nathan Chancellor @ 2021-08-11  0:55 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter, Greg Kroah-Hartman
  Cc: linux-staging, linux-kernel, Nathan Chancellor

After commit 71f09c5ae9d2 ("staging: r8188eu: Remove wrapper around
vfree"), the driver fails to build on Hexagon due to an implicit
declaration in several different files:

drivers/staging/r8188eu/core/rtw_mlme.c:129:3: error: implicit
declaration of function 'vfree'
[-Werror,-Wimplicit-function-declaration]
                vfree(pmlmepriv->free_bss_buf);
                ^
1 error generated.

Previously, vfree() was only called in osdep_service.c, which includes
vmalloc.h for vmalloc() and vfree(). Now, the driver relies on vfree()
getting implicitly included from another file.

Hoist the vmalloc.h include from osdep_service.c to osdep_service.h so
that the driver continues to build fine on all architectures.

Fixes: 71f09c5ae9d2 ("staging: r8188eu: Remove wrapper around vfree")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 drivers/staging/r8188eu/include/osdep_service.h | 1 +
 drivers/staging/r8188eu/os_dep/osdep_service.c  | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/r8188eu/include/osdep_service.h b/drivers/staging/r8188eu/include/osdep_service.h
index 7e002009f9a0..0d1419af8274 100644
--- a/drivers/staging/r8188eu/include/osdep_service.h
+++ b/drivers/staging/r8188eu/include/osdep_service.h
@@ -39,6 +39,7 @@
 #include <linux/interrupt.h>	/*  for struct tasklet_struct */
 #include <linux/ip.h>
 #include <linux/kthread.h>
+#include <linux/vmalloc.h>
 
 #include <linux/usb.h>
 #include <linux/usb/ch9.h>
diff --git a/drivers/staging/r8188eu/os_dep/osdep_service.c b/drivers/staging/r8188eu/os_dep/osdep_service.c
index 910da0f0004a..9ea4e1a7c45f 100644
--- a/drivers/staging/r8188eu/os_dep/osdep_service.c
+++ b/drivers/staging/r8188eu/os_dep/osdep_service.c
@@ -6,7 +6,6 @@
 #include "../include/osdep_service.h"
 #include "../include/drv_types.h"
 #include "../include/recv_osdep.h"
-#include "../include/linux/vmalloc.h"
 #include "../include/rtw_ioctl_set.h"
 
 /*

base-commit: ae7471cae00a432d1c9692452b1b9175a8f3c1b3
-- 
2.33.0.rc1


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

* Re: [PATCH] staging: r8188eu: os_dep: Hoist vmalloc.h include into osdep_service.h
  2021-08-11  0:55 [PATCH] staging: r8188eu: os_dep: Hoist vmalloc.h include into osdep_service.h Nathan Chancellor
@ 2021-08-11  1:28 ` Larry Finger
  0 siblings, 0 replies; 2+ messages in thread
From: Larry Finger @ 2021-08-11  1:28 UTC (permalink / raw)
  To: Nathan Chancellor, Phillip Potter, Greg Kroah-Hartman
  Cc: linux-staging, linux-kernel

On 8/10/21 7:55 PM, Nathan Chancellor wrote:
> After commit 71f09c5ae9d2 ("staging: r8188eu: Remove wrapper around
> vfree"), the driver fails to build on Hexagon due to an implicit
> declaration in several different files:
> 
> drivers/staging/r8188eu/core/rtw_mlme.c:129:3: error: implicit
> declaration of function 'vfree'
> [-Werror,-Wimplicit-function-declaration]
>                  vfree(pmlmepriv->free_bss_buf);
>                  ^
> 1 error generated.
> 
> Previously, vfree() was only called in osdep_service.c, which includes
> vmalloc.h for vmalloc() and vfree(). Now, the driver relies on vfree()
> getting implicitly included from another file.
> 
> Hoist the vmalloc.h include from osdep_service.c to osdep_service.h so
> that the driver continues to build fine on all architectures.
> 
> Fixes: 71f09c5ae9d2 ("staging: r8188eu: Remove wrapper around vfree")
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
>   drivers/staging/r8188eu/include/osdep_service.h | 1 +
>   drivers/staging/r8188eu/os_dep/osdep_service.c  | 1 -
>   2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/r8188eu/include/osdep_service.h b/drivers/staging/r8188eu/include/osdep_service.h
> index 7e002009f9a0..0d1419af8274 100644
> --- a/drivers/staging/r8188eu/include/osdep_service.h
> +++ b/drivers/staging/r8188eu/include/osdep_service.h
> @@ -39,6 +39,7 @@
>   #include <linux/interrupt.h>	/*  for struct tasklet_struct */
>   #include <linux/ip.h>
>   #include <linux/kthread.h>
> +#include <linux/vmalloc.h>
>   
>   #include <linux/usb.h>
>   #include <linux/usb/ch9.h>
> diff --git a/drivers/staging/r8188eu/os_dep/osdep_service.c b/drivers/staging/r8188eu/os_dep/osdep_service.c
> index 910da0f0004a..9ea4e1a7c45f 100644
> --- a/drivers/staging/r8188eu/os_dep/osdep_service.c
> +++ b/drivers/staging/r8188eu/os_dep/osdep_service.c
> @@ -6,7 +6,6 @@
>   #include "../include/osdep_service.h"
>   #include "../include/drv_types.h"
>   #include "../include/recv_osdep.h"
> -#include "../include/linux/vmalloc.h"
>   #include "../include/rtw_ioctl_set.h"
>   
>   /*
> 
> base-commit: ae7471cae00a432d1c9692452b1b9175a8f3c1b3
> 

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>

For some reason this header is pulled in on x86_64. What CPU does Hexagon use?

Larry


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

end of thread, other threads:[~2021-08-11  1:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11  0:55 [PATCH] staging: r8188eu: os_dep: Hoist vmalloc.h include into osdep_service.h Nathan Chancellor
2021-08-11  1:28 ` Larry Finger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).