mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-15 01:19:36 +00:00
rtl8188eu: Remove wrappers arounf vmalloc()
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
1f6c1424cc
commit
d57fc28a11
4 changed files with 8 additions and 16 deletions
|
@ -1406,9 +1406,9 @@ u32 rtw_read_efuse_from_file(const char *path, u8 *buf, int map_size)
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
file_data = rtw_vmalloc(file_size);
|
file_data = vmalloc(file_size);
|
||||||
if (!file_data) {
|
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;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1418,9 +1418,9 @@ u32 rtw_read_efuse_from_file(const char *path, u8 *buf, int map_size)
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
map = rtw_vmalloc(map_size);
|
map = vmalloc(map_size);
|
||||||
if (!map) {
|
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;
|
goto exit;
|
||||||
}
|
}
|
||||||
memset(map, 0xff, map_size);
|
memset(map, 0xff, map_size);
|
||||||
|
|
|
@ -184,7 +184,6 @@ void dbg_rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *addr, dm
|
||||||
#else /* DBG_MEM_ALLOC */
|
#else /* DBG_MEM_ALLOC */
|
||||||
#define rtw_mstat_update(flag, status, sz) do {} while (0)
|
#define rtw_mstat_update(flag, status, sz) do {} while (0)
|
||||||
#define rtw_mstat_dump(sel) do {} while (0)
|
#define rtw_mstat_dump(sel) do {} while (0)
|
||||||
u8 *_rtw_vmalloc(u32 sz);
|
|
||||||
u8 *_rtw_zvmalloc(u32 sz);
|
u8 *_rtw_zvmalloc(u32 sz);
|
||||||
void _rtw_vmfree(u8 *pbuf, u32 sz);
|
void _rtw_vmfree(u8 *pbuf, u32 sz);
|
||||||
u8 *_rtw_zmalloc(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);
|
void _rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *addr, dma_addr_t dma);
|
||||||
|
|
||||||
#ifdef CONFIG_USE_VMALLOC
|
#ifdef CONFIG_USE_VMALLOC
|
||||||
#define rtw_vmalloc(sz) _rtw_vmalloc((sz))
|
|
||||||
#define rtw_zvmalloc(sz) _rtw_zvmalloc((sz))
|
#define rtw_zvmalloc(sz) _rtw_zvmalloc((sz))
|
||||||
#define rtw_vmfree(pbuf, sz) _rtw_vmfree((pbuf), (sz))
|
#define rtw_vmfree(pbuf, sz) _rtw_vmfree((pbuf), (sz))
|
||||||
#define rtw_vmalloc_f(sz, mstat_f) _rtw_vmalloc((sz))
|
#define rtw_vmalloc_f(sz, mstat_f) _rtw_vmalloc((sz))
|
||||||
#define rtw_zvmalloc_f(sz, mstat_f) _rtw_zvmalloc((sz))
|
#define rtw_zvmalloc_f(sz, mstat_f) _rtw_zvmalloc((sz))
|
||||||
#define rtw_vmfree_f(pbuf, sz, mstat_f) _rtw_vmfree((pbuf), (sz))
|
#define rtw_vmfree_f(pbuf, sz, mstat_f) _rtw_vmfree((pbuf), (sz))
|
||||||
#else /* CONFIG_USE_VMALLOC */
|
#else /* CONFIG_USE_VMALLOC */
|
||||||
#define rtw_vmalloc(sz) _rtw_malloc((sz))
|
|
||||||
#define rtw_zvmalloc(sz) _rtw_zmalloc((sz))
|
#define rtw_zvmalloc(sz) _rtw_zmalloc((sz))
|
||||||
#define rtw_vmfree(pbuf, sz) _rtw_mfree((pbuf), (sz))
|
#define rtw_vmfree(pbuf, sz) _rtw_mfree((pbuf), (sz))
|
||||||
#define rtw_vmalloc_f(sz, mstat_f) _rtw_malloc((sz))
|
#define rtw_vmalloc_f(sz, mstat_f) _rtw_malloc((sz))
|
||||||
|
|
|
@ -7738,7 +7738,7 @@ static int rtw_wx_set_priv(struct net_device *dev,
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
len = dwrq->length;
|
len = dwrq->length;
|
||||||
ext = rtw_vmalloc(len);
|
ext = vmalloc(len);
|
||||||
if (!ext)
|
if (!ext)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -7750,7 +7750,7 @@ static int rtw_wx_set_priv(struct net_device *dev,
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_RTW_WX_SET_PRIV
|
#ifdef CONFIG_DEBUG_RTW_WX_SET_PRIV
|
||||||
ext_dbg = rtw_vmalloc(len);
|
ext_dbg = vmalloc(len);
|
||||||
if (!ext_dbg) {
|
if (!ext_dbg) {
|
||||||
rtw_vmfree(ext, len);
|
rtw_vmfree(ext, len);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
|
@ -62,15 +62,10 @@ u32 rtw_atoi(u8 *s)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline u8 *_rtw_vmalloc(u32 sz)
|
|
||||||
{
|
|
||||||
return vmalloc(sz);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline u8 *_rtw_zvmalloc(u32 sz)
|
inline u8 *_rtw_zvmalloc(u32 sz)
|
||||||
{
|
{
|
||||||
u8 *pbuf;
|
u8 *pbuf;
|
||||||
pbuf = _rtw_vmalloc(sz);
|
pbuf = vmalloc(sz);
|
||||||
if (pbuf != NULL)
|
if (pbuf != NULL)
|
||||||
memset(pbuf, 0, sz);
|
memset(pbuf, 0, sz);
|
||||||
return pbuf;
|
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))
|
if (match_mstat_sniff_rules(flags, sz))
|
||||||
RTW_INFO("DBG_MEM_ALLOC %s:%d %s(%d)\n", func, line, __func__, (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(
|
rtw_mstat_update(
|
||||||
flags
|
flags
|
||||||
|
|
Loading…
Reference in a new issue