mirror of
https://github.com/Mange/rtl8192eu-linux-driver
synced 2025-12-08 07:14:03 +00:00
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. Link: https://lore.kernel.org/r/20210818234853.208448-4-phil@philpotter.co.uk
This commit is contained in:
committed by
Carlos Garcés
parent
6e2f371df5
commit
1f0cf855dc
@@ -212,7 +212,6 @@ void dbg_rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *addr, dm
|
||||
#define rtw_mstat_update(flag, status, sz) do {} while (0)
|
||||
#define rtw_mstat_dump(sel) do {} while (0)
|
||||
#define match_mstat_sniff_rules(flags, size) _FALSE
|
||||
void *_rtw_vmalloc(u32 sz);
|
||||
void *_rtw_zvmalloc(u32 sz);
|
||||
void *_rtw_zmalloc(u32 sz);
|
||||
void *_rtw_malloc(u32 sz);
|
||||
@@ -238,7 +237,7 @@ void _rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *addr, dma_a
|
||||
|
||||
#ifdef CONFIG_USE_VMALLOC
|
||||
#define rtw_zvmalloc(sz) _rtw_zvmalloc((sz))
|
||||
#define rtw_vmalloc_f(sz, mstat_f) _rtw_vmalloc((sz))
|
||||
#define rtw_vmalloc_f(sz, mstat_f) 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 */
|
||||
|
||||
Reference in New Issue
Block a user