aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Potter <[email protected]>2021-08-19 00:48:49 +0100
committerGreg Kroah-Hartman <[email protected]>2021-08-19 07:42:57 +0200
commitc29e42afe91980f930b560dad24215569fa64f4a (patch)
tree84a7ee8a4f1b31a33779d5731d64cf13fe11f53d
parent07f1a10d30e382fcb370b1b7b98ea48af13087c5 (diff)
staging: r8188eu: remove function _rtw_vmalloc
Remove the function _rtw_vmalloc from os_dep/osdep_service.c, converting its only user (also in os_dep/osdep_service.c) to use plain vmalloc. This function is just an inline wrapper around vmalloc which returns a u8 pointer, which isn't needed. Also remove the declaration from include/osdep_service.h. It is considered generally bad practice to declare functions as inline in the majority of cases, as not only can this qualifier be ignored by the compiler but the compiler generally makes good decisions about inlining anyway. Signed-off-by: Phillip Potter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/r8188eu/include/osdep_service.h1
-rw-r--r--drivers/staging/r8188eu/os_dep/osdep_service.c9
2 files changed, 1 insertions, 9 deletions
diff --git a/drivers/staging/r8188eu/include/osdep_service.h b/drivers/staging/r8188eu/include/osdep_service.h
index a9f147cd42fe..4c00adeb72ee 100644
--- a/drivers/staging/r8188eu/include/osdep_service.h
+++ b/drivers/staging/r8188eu/include/osdep_service.h
@@ -171,7 +171,6 @@ extern unsigned char WPA_TKIP_CIPHER[4];
extern unsigned char RSN_TKIP_CIPHER[4];
#define rtw_update_mem_stat(flag, sz) do {} while (0)
-u8 *_rtw_vmalloc(u32 sz);
u8 *_rtw_zvmalloc(u32 sz);
#define rtw_zvmalloc(sz) _rtw_zvmalloc((sz))
diff --git a/drivers/staging/r8188eu/os_dep/osdep_service.c b/drivers/staging/r8188eu/os_dep/osdep_service.c
index 6218a9052ee9..800f493f1000 100644
--- a/drivers/staging/r8188eu/os_dep/osdep_service.c
+++ b/drivers/staging/r8188eu/os_dep/osdep_service.c
@@ -36,17 +36,10 @@ u32 rtw_atoi(u8 *s)
return num;
}
-inline u8 *_rtw_vmalloc(u32 sz)
-{
- u8 *pbuf;
- pbuf = vmalloc(sz);
- return pbuf;
-}
-
inline u8 *_rtw_zvmalloc(u32 sz)
{
u8 *pbuf;
- pbuf = _rtw_vmalloc(sz);
+ pbuf = vmalloc(sz);
if (pbuf)
memset(pbuf, 0, sz);
return pbuf;