aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/r8188eu
diff options
context:
space:
mode:
authorPhillip Potter <phil@philpotter.co.uk>2021-08-19 00:48:52 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-08-19 07:42:57 +0200
commit41b8a938674b5bc9e57aedef9ff104dfc8deeaaf (patch)
treec4c7ddef74003326479443f96632117d5528adc2 /drivers/staging/r8188eu
parentstaging: r8188eu: remove rtw_zvmalloc preprocessor definition (diff)
downloadlinux-dev-41b8a938674b5bc9e57aedef9ff104dfc8deeaaf.tar.xz
linux-dev-41b8a938674b5bc9e57aedef9ff104dfc8deeaaf.zip
staging: r8188eu: remove function _rtw_zvmalloc
Remove the function _rtw_zvmalloc from os_dep/osdep_service.c, as this function is now unused and is just an inline wrapper around vmalloc which zeroes out the memory. All previous callers have been converted to use vzalloc. 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 <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210818234853.208448-7-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/r8188eu')
-rw-r--r--drivers/staging/r8188eu/include/osdep_service.h1
-rw-r--r--drivers/staging/r8188eu/os_dep/osdep_service.c9
2 files changed, 0 insertions, 10 deletions
diff --git a/drivers/staging/r8188eu/include/osdep_service.h b/drivers/staging/r8188eu/include/osdep_service.h
index dba7a7bec9d1..bda435ca9d08 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_zvmalloc(u32 sz);
void *rtw_malloc2d(int h, int w, int size);
diff --git a/drivers/staging/r8188eu/os_dep/osdep_service.c b/drivers/staging/r8188eu/os_dep/osdep_service.c
index 8a797bfcb7f5..95ac6086370b 100644
--- a/drivers/staging/r8188eu/os_dep/osdep_service.c
+++ b/drivers/staging/r8188eu/os_dep/osdep_service.c
@@ -36,15 +36,6 @@ u32 rtw_atoi(u8 *s)
return num;
}
-inline u8 *_rtw_zvmalloc(u32 sz)
-{
- u8 *pbuf;
- pbuf = vmalloc(sz);
- if (pbuf)
- memset(pbuf, 0, sz);
- return pbuf;
-}
-
void *rtw_malloc2d(int h, int w, int size)
{
int j;