rtl8188eu: Remove wrappers arounf vmalloc()

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2018-12-31 18:01:37 -06:00
parent 1f6c1424cc
commit d57fc28a11
4 changed files with 8 additions and 16 deletions

View file

@ -1406,9 +1406,9 @@ u32 rtw_read_efuse_from_file(const char *path, u8 *buf, int map_size)
goto exit;
}
file_data = rtw_vmalloc(file_size);
file_data = vmalloc(file_size);
if (!file_data) {
RTW_ERR("%s rtw_vmalloc(%d) fail\n", __func__, file_size);
RTW_ERR("%s vmalloc(%d) fail\n", __func__, file_size);
goto exit;
}
@ -1418,9 +1418,9 @@ u32 rtw_read_efuse_from_file(const char *path, u8 *buf, int map_size)
goto exit;
}
map = rtw_vmalloc(map_size);
map = vmalloc(map_size);
if (!map) {
RTW_ERR("%s rtw_vmalloc(%d) fail\n", __func__, map_size);
RTW_ERR("%s vmalloc(%d) fail\n", __func__, map_size);
goto exit;
}
memset(map, 0xff, map_size);

View file

@ -184,7 +184,6 @@ void dbg_rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *addr, dm
#else /* DBG_MEM_ALLOC */
#define rtw_mstat_update(flag, status, sz) do {} while (0)
#define rtw_mstat_dump(sel) do {} while (0)
u8 *_rtw_vmalloc(u32 sz);
u8 *_rtw_zvmalloc(u32 sz);
void _rtw_vmfree(u8 *pbuf, u32 sz);
u8 *_rtw_zmalloc(u32 sz);
@ -208,14 +207,12 @@ void *_rtw_usb_buffer_alloc(struct usb_device *dev, size_t size, dma_addr_t *dma
void _rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *addr, dma_addr_t dma);
#ifdef CONFIG_USE_VMALLOC
#define rtw_vmalloc(sz) _rtw_vmalloc((sz))
#define rtw_zvmalloc(sz) _rtw_zvmalloc((sz))
#define rtw_vmfree(pbuf, sz) _rtw_vmfree((pbuf), (sz))
#define rtw_vmalloc_f(sz, mstat_f) _rtw_vmalloc((sz))
#define rtw_zvmalloc_f(sz, mstat_f) _rtw_zvmalloc((sz))
#define rtw_vmfree_f(pbuf, sz, mstat_f) _rtw_vmfree((pbuf), (sz))
#else /* CONFIG_USE_VMALLOC */
#define rtw_vmalloc(sz) _rtw_malloc((sz))
#define rtw_zvmalloc(sz) _rtw_zmalloc((sz))
#define rtw_vmfree(pbuf, sz) _rtw_mfree((pbuf), (sz))
#define rtw_vmalloc_f(sz, mstat_f) _rtw_malloc((sz))

View file

@ -7738,7 +7738,7 @@ static int rtw_wx_set_priv(struct net_device *dev,
return -EFAULT;
len = dwrq->length;
ext = rtw_vmalloc(len);
ext = vmalloc(len);
if (!ext)
return -ENOMEM;
@ -7750,7 +7750,7 @@ static int rtw_wx_set_priv(struct net_device *dev,
#ifdef CONFIG_DEBUG_RTW_WX_SET_PRIV
ext_dbg = rtw_vmalloc(len);
ext_dbg = vmalloc(len);
if (!ext_dbg) {
rtw_vmfree(ext, len);
return -ENOMEM;

View file

@ -62,15 +62,10 @@ u32 rtw_atoi(u8 *s)
}
inline u8 *_rtw_vmalloc(u32 sz)
{
return vmalloc(sz);
}
inline u8 *_rtw_zvmalloc(u32 sz)
{
u8 *pbuf;
pbuf = _rtw_vmalloc(sz);
pbuf = vmalloc(sz);
if (pbuf != NULL)
memset(pbuf, 0, sz);
return pbuf;
@ -360,7 +355,7 @@ inline u8 *dbg_rtw_vmalloc(u32 sz, const enum mstat_f flags, const char *func, c
if (match_mstat_sniff_rules(flags, sz))
RTW_INFO("DBG_MEM_ALLOC %s:%d %s(%d)\n", func, line, __func__, (sz));
p = _rtw_vmalloc((sz));
p = vmalloc((sz));
rtw_mstat_update(
flags