mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-15 01:19:36 +00:00
rtl8188eu: Remove all code associated with DBG_MEMORY_LEAK
This parameter is always undefined. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
4a5aa7a8b7
commit
1f6c1424cc
5 changed files with 1 additions and 57 deletions
|
@ -3079,20 +3079,6 @@ int proc_get_rtkm_info(struct seq_file *m, void *v)
|
|||
}
|
||||
#endif /* CONFIG_PREALLOC_RX_SKB_BUFFER */
|
||||
|
||||
#ifdef DBG_MEMORY_LEAK
|
||||
#include <asm/atomic.h>
|
||||
extern atomic_t _malloc_cnt;;
|
||||
extern atomic_t _malloc_size;;
|
||||
|
||||
int proc_get_malloc_cnt(struct seq_file *m, void *v)
|
||||
{
|
||||
RTW_PRINT_SEL(m, "_malloc_cnt=%d\n", atomic_read(&_malloc_cnt));
|
||||
RTW_PRINT_SEL(m, "_malloc_size=%d\n", atomic_read(&_malloc_size));
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* DBG_MEMORY_LEAK */
|
||||
|
||||
#ifdef CONFIG_FIND_BEST_CHANNEL
|
||||
int proc_get_best_channel(struct seq_file *m, void *v)
|
||||
{
|
||||
|
|
|
@ -349,8 +349,6 @@
|
|||
|
||||
/* #define DBG_HAL_INIT_PROFILING */
|
||||
|
||||
/* #define DBG_MEMORY_LEAK */
|
||||
|
||||
/* TX use 1 urb */
|
||||
/* #define CONFIG_SINGLE_XMIT_BUF */
|
||||
/* RX use 1 urb */
|
||||
|
|
|
@ -412,10 +412,6 @@ int proc_get_tx_stat(struct seq_file *m, void *v);
|
|||
int proc_get_all_sta_info(struct seq_file *m, void *v);
|
||||
#endif /* CONFIG_AP_MODE */
|
||||
|
||||
#ifdef DBG_MEMORY_LEAK
|
||||
int proc_get_malloc_cnt(struct seq_file *m, void *v);
|
||||
#endif /* DBG_MEMORY_LEAK */
|
||||
|
||||
#ifdef CONFIG_FIND_BEST_CHANNEL
|
||||
int proc_get_best_channel(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_best_channel(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
|
|
|
@ -25,11 +25,6 @@
|
|||
|
||||
#define RT_TAG '1178'
|
||||
|
||||
#ifdef DBG_MEMORY_LEAK
|
||||
atomic_t _malloc_cnt = ATOMIC_INIT(0);
|
||||
atomic_t _malloc_size = ATOMIC_INIT(0);
|
||||
#endif /* DBG_MEMORY_LEAK */
|
||||
|
||||
/*
|
||||
* Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE
|
||||
* @return: one of RTW_STATUS_CODE
|
||||
|
@ -69,17 +64,7 @@ u32 rtw_atoi(u8 *s)
|
|||
|
||||
inline u8 *_rtw_vmalloc(u32 sz)
|
||||
{
|
||||
u8 *pbuf;
|
||||
|
||||
pbuf = vmalloc(sz);
|
||||
#ifdef DBG_MEMORY_LEAK
|
||||
if (pbuf != NULL) {
|
||||
atomic_inc(&_malloc_cnt);
|
||||
atomic_add(sz, &_malloc_size);
|
||||
}
|
||||
#endif /* DBG_MEMORY_LEAK */
|
||||
|
||||
return pbuf;
|
||||
return vmalloc(sz);
|
||||
}
|
||||
|
||||
inline u8 *_rtw_zvmalloc(u32 sz)
|
||||
|
@ -94,10 +79,6 @@ inline u8 *_rtw_zvmalloc(u32 sz)
|
|||
inline void _rtw_vmfree(u8 *pbuf, u32 sz)
|
||||
{
|
||||
vfree(pbuf);
|
||||
#ifdef DBG_MEMORY_LEAK
|
||||
atomic_dec(&_malloc_cnt);
|
||||
atomic_sub(sz, &_malloc_size);
|
||||
#endif /* DBG_MEMORY_LEAK */
|
||||
}
|
||||
|
||||
u8 *_rtw_malloc(u32 sz)
|
||||
|
@ -111,17 +92,9 @@ u8 *_rtw_malloc(u32 sz)
|
|||
#endif
|
||||
pbuf = kmalloc(sz, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
|
||||
|
||||
#ifdef DBG_MEMORY_LEAK
|
||||
if (pbuf != NULL) {
|
||||
atomic_inc(&_malloc_cnt);
|
||||
atomic_add(sz, &_malloc_size);
|
||||
}
|
||||
#endif /* DBG_MEMORY_LEAK */
|
||||
|
||||
return pbuf;
|
||||
}
|
||||
|
||||
|
||||
u8 *_rtw_zmalloc(u32 sz)
|
||||
{
|
||||
u8 *pbuf = _rtw_malloc(sz);
|
||||
|
@ -139,11 +112,6 @@ void _rtw_mfree(u8 *pbuf, u32 sz)
|
|||
else
|
||||
#endif
|
||||
kfree(pbuf);
|
||||
|
||||
#ifdef DBG_MEMORY_LEAK
|
||||
atomic_dec(&_malloc_cnt);
|
||||
atomic_sub(sz, &_malloc_size);
|
||||
#endif /* DBG_MEMORY_LEAK */
|
||||
}
|
||||
|
||||
inline struct sk_buff *_rtw_skb_alloc(u32 sz)
|
||||
|
|
|
@ -2338,10 +2338,6 @@ static const struct rtw_proc_hdl adapter_proc_hdls[] = {
|
|||
RTW_PROC_HDL_SSEQ("all_sta_info", proc_get_all_sta_info, NULL),
|
||||
#endif /* CONFIG_AP_MODE */
|
||||
|
||||
#ifdef DBG_MEMORY_LEAK
|
||||
RTW_PROC_HDL_SSEQ("_malloc_cnt", proc_get_malloc_cnt, NULL),
|
||||
#endif /* DBG_MEMORY_LEAK */
|
||||
|
||||
#ifdef CONFIG_FIND_BEST_CHANNEL
|
||||
RTW_PROC_HDL_SSEQ("best_channel", proc_get_best_channel, proc_set_best_channel),
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue