staging: r8188eu: mark _rtw_free_sta_priv as void
PATCH 1/1 staging: r8188eu: mark _rtw_free_sta_priv as void
_rtw_free_sta_priv() always returns _SUCCESS and it's return value isn't checked either.
So it makes sense to mark it as void instead of u32.
Signed-off-by Vihas Makwana <[email protected]>
--- drivers/staging/r8188eu/core/rtw_sta_mgt.c | 4 +--- drivers/staging/r8188eu/include/sta_info.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/staging/r8188eu/core/rtw_sta_mgt.c +1 -3
@@ -117,7 +117,7 @@ inline struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, intreturn (struct sta_info *)(stapriv->pstainfo_buf + offset *sizeof (struct sta_info )); } -u32 _rtw_free_sta_priv (struct sta_priv *pstapriv) +void _rtw_free_sta_priv (struct sta_priv *pstapriv) {struct list_head *phead, *plist;struct sta_info *psta =NULL ;
@@ -147,8 +147,6 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)vfree (pstapriv->pallocated_stainfo_buf); } - -return _SUCCESS; }struct sta_info *rtw_alloc_stainfo (struct sta_priv *pstapriv,u8 *hwaddr)
drivers/staging/r8188eu/include/sta_info.h +1 -1
@@ -344,7 +344,7 @@ static inline u32 wifi_mac_hash(u8 *mac) }extern u32 _rtw_init_sta_priv (struct sta_priv *pstapriv); -extern u32 _rtw_free_sta_priv (struct sta_priv *pstapriv); +extern void _rtw_free_sta_priv (struct sta_priv *pstapriv);#define stainfo_offset_valid (offset) (offset < NUM_STA && offset >= 0)int rtw_stainfo_offset (struct sta_priv *stapriv,struct sta_info *sta);
Signature · 1 line
2.30.2