[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1391741147-3047-9-git-send-email-Larry.Finger@lwfinger.net>
Date: Thu, 6 Feb 2014 20:45:43 -0600
From: Larry Finger <Larry.Finger@...inger.net>
To: gregkh@...uxfoundation.org
Cc: netdev@...r.kernel.org, devel@...verdev.osuosl.org,
Larry Finger <Larry.Finger@...inger.net>
Subject: [PATCH 08/12] staging: r8188eu: Remove wrappers around vfree
Signed-off-by: Larry Finger <Larry.Finger@...inger.net>
---
drivers/staging/rtl8188eu/core/rtw_mlme.c | 5 ++---
drivers/staging/rtl8188eu/core/rtw_mp.c | 2 +-
drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +-
drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 2 +-
drivers/staging/rtl8188eu/core/rtw_xmit.c | 6 +++---
drivers/staging/rtl8188eu/hal/odm_interface.c | 6 ------
drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 2 +-
drivers/staging/rtl8188eu/include/odm_interface.h | 1 -
drivers/staging/rtl8188eu/include/osdep_service.h | 2 --
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 4 ++--
drivers/staging/rtl8188eu/os_dep/osdep_service.c | 7 +------
drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 +-
12 files changed, 13 insertions(+), 28 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index c85fcfe..2037be0 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -129,9 +129,8 @@ _func_enter_;
rtw_free_mlme_priv_ie_data(pmlmepriv);
if (pmlmepriv) {
- if (pmlmepriv->free_bss_buf) {
- rtw_vmfree(pmlmepriv->free_bss_buf, MAX_BSS_CNT * sizeof(struct wlan_network));
- }
+ if (pmlmepriv->free_bss_buf)
+ vfree(pmlmepriv->free_bss_buf);
}
_func_exit_;
}
diff --git a/drivers/staging/rtl8188eu/core/rtw_mp.c b/drivers/staging/rtl8188eu/core/rtw_mp.c
index a88c5f1..9e97b57 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mp.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mp.c
@@ -943,7 +943,7 @@ void _rtw_mp_xmit_priv(struct xmit_priv *pxmitpriv)
}
if (pxmitpriv->pallocated_xmit_extbuf)
- rtw_vmfree(pxmitpriv->pallocated_xmit_extbuf, num_xmit_extbuf * sizeof(struct xmit_buf) + 4);
+ vfree(pxmitpriv->pallocated_xmit_extbuf);
if (padapter->registrypriv.mp_mode == 0) {
max_xmit_extbuf_size = 20000;
diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c
index b2e00f9..8490d51 100644
--- a/drivers/staging/rtl8188eu/core/rtw_recv.c
+++ b/drivers/staging/rtl8188eu/core/rtw_recv.c
@@ -129,7 +129,7 @@ _func_enter_;
rtw_os_recv_resource_free(precvpriv);
if (precvpriv->pallocated_frame_buf) {
- rtw_vmfree(precvpriv->pallocated_frame_buf, NR_RECVFRAME * sizeof(union recv_frame) + RXFRAME_ALIGN_SZ);
+ vfree(precvpriv->pallocated_frame_buf);
}
rtw_hal_free_recv_priv(padapter);
diff --git a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
index 21b205f..6df9669 100644
--- a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
+++ b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
@@ -208,7 +208,7 @@ _func_enter_;
rtw_mfree_sta_priv_lock(pstapriv);
if (pstapriv->pallocated_stainfo_buf)
- rtw_vmfree(pstapriv->pallocated_stainfo_buf, sizeof(struct sta_info)*NUM_STA+4);
+ vfree(pstapriv->pallocated_stainfo_buf);
}
_func_exit_;
diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c
index e98c038..aa77270 100644
--- a/drivers/staging/rtl8188eu/core/rtw_xmit.c
+++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c
@@ -259,10 +259,10 @@ void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv)
}
if (pxmitpriv->pallocated_frame_buf)
- rtw_vmfree(pxmitpriv->pallocated_frame_buf, NR_XMITFRAME * sizeof(struct xmit_frame) + 4);
+ vfree(pxmitpriv->pallocated_frame_buf);
if (pxmitpriv->pallocated_xmitbuf)
- rtw_vmfree(pxmitpriv->pallocated_xmitbuf, NR_XMITBUFF * sizeof(struct xmit_buf) + 4);
+ vfree(pxmitpriv->pallocated_xmitbuf);
/* free xmit extension buff */
pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmit_extbuf;
@@ -272,7 +272,7 @@ void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv)
}
if (pxmitpriv->pallocated_xmit_extbuf) {
- rtw_vmfree(pxmitpriv->pallocated_xmit_extbuf, num_xmit_extbuf * sizeof(struct xmit_buf) + 4);
+ vfree(pxmitpriv->pallocated_xmit_extbuf);
}
rtw_free_hwxmits(padapter);
diff --git a/drivers/staging/rtl8188eu/hal/odm_interface.c b/drivers/staging/rtl8188eu/hal/odm_interface.c
index 5ba95ab..568c734 100644
--- a/drivers/staging/rtl8188eu/hal/odm_interface.c
+++ b/drivers/staging/rtl8188eu/hal/odm_interface.c
@@ -26,12 +26,6 @@ void ODM_AllocateMemory(struct odm_dm_struct *pDM_Odm, void **pPtr, u32 length)
*pPtr = vzalloc(length);
}
-/* length could be ignored, used to detect memory leakage. */
-void ODM_FreeMemory(struct odm_dm_struct *pDM_Odm, void *pPtr, u32 length)
-{
- rtw_vmfree(pPtr, length);
-}
-
s32 ODM_CompareMemory(struct odm_dm_struct *pDM_Odm, void *pBuf1, void *pBuf2, u32 length)
{
return _rtw_memcmp(pBuf1, pBuf2, length);
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
index d364abc..f29c003 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
@@ -387,7 +387,7 @@ void rtw_IOL_cmd_tx_pkt_buf_dump(struct adapter *Adapter, int data_len)
} while (!rstatus && (loop++ < 10));
}
rtw_IOL_cmd_buf_dump(Adapter, data_len, pbuf);
- rtw_vmfree(pbuf, data_len+10);
+ vfree(pbuf);
}
DBG_88E("###### %s ######\n", __func__);
}
diff --git a/drivers/staging/rtl8188eu/include/odm_interface.h b/drivers/staging/rtl8188eu/include/odm_interface.h
index 9284eb8..eb96d7a 100644
--- a/drivers/staging/rtl8188eu/include/odm_interface.h
+++ b/drivers/staging/rtl8188eu/include/odm_interface.h
@@ -79,7 +79,6 @@ typedef void (*RT_WORKITEM_CALL_BACK)(void *pContext);
/* Memory Relative Function. */
void ODM_AllocateMemory(struct odm_dm_struct *pDM_Odm, void **pPtr, u32 length);
-void ODM_FreeMemory(struct odm_dm_struct *pDM_Odm, void *pPtr, u32 length);
s32 ODM_CompareMemory(struct odm_dm_struct *pDM_Odm, void *pBuf1, void *pBuf2,
u32 length);
diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h
index 0d34c36..495420e 100644
--- a/drivers/staging/rtl8188eu/include/osdep_service.h
+++ b/drivers/staging/rtl8188eu/include/osdep_service.h
@@ -230,11 +230,9 @@ extern unsigned char WPA_TKIP_CIPHER[4];
extern unsigned char RSN_TKIP_CIPHER[4];
#define rtw_update_mem_stat(flag, sz) do {} while (0)
-void _rtw_vmfree(u8 *pbuf, u32 sz);
u8 *_rtw_zmalloc(u32 sz);
u8 *_rtw_malloc(u32 sz);
void _rtw_mfree(u8 *pbuf, u32 sz);
-#define rtw_vmfree(pbuf, sz) _rtw_vmfree((pbuf), (sz))
#define rtw_malloc(sz) _rtw_malloc((sz))
#define rtw_zmalloc(sz) _rtw_zmalloc((sz))
#define rtw_mfree(pbuf, sz) _rtw_mfree((pbuf), (sz))
diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
index 50c61c3..0204082 100644
--- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
@@ -5653,7 +5653,7 @@ static int rtw_wx_set_priv(struct net_device *dev,
return -ENOMEM;
if (copy_from_user(ext, dwrq->pointer, len)) {
- rtw_vmfree(ext, len);
+ vfree(ext);
return -EFAULT;
}
@@ -5693,7 +5693,7 @@ static int rtw_wx_set_priv(struct net_device *dev,
FREE_EXT:
- rtw_vmfree(ext, len);
+ vfree(ext);
return ret;
}
diff --git a/drivers/staging/rtl8188eu/os_dep/osdep_service.c b/drivers/staging/rtl8188eu/os_dep/osdep_service.c
index 02f5e0c..622b70c 100644
--- a/drivers/staging/rtl8188eu/os_dep/osdep_service.c
+++ b/drivers/staging/rtl8188eu/os_dep/osdep_service.c
@@ -55,11 +55,6 @@ u32 rtw_atoi(u8 *s)
return num;
}
-inline void _rtw_vmfree(u8 *pbuf, u32 sz)
-{
- vfree(pbuf);
-}
-
u8 *_rtw_malloc(u32 sz)
{
u8 *pbuf = NULL;
@@ -260,7 +255,7 @@ void rtw_free_netdev(struct net_device *netdev)
if (!pnpi->priv)
goto RETURN;
- rtw_vmfree(pnpi->priv, pnpi->sizeof_priv);
+ vfree(pnpi->priv);
free_netdev(netdev);
RETURN:
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
index e5539dd..0a585b2 100644
--- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
@@ -746,7 +746,7 @@ free_adapter:
if (pnetdev)
rtw_free_netdev(pnetdev);
else if (padapter)
- rtw_vmfree((u8 *)padapter, sizeof(*padapter));
+ vfree(padapter);
padapter = NULL;
}
exit:
--
1.8.4.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists