From b8f73d9a8f0be99f17194347442ff89a7cc35781 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Fri, 14 Aug 2015 23:12:02 -0500 Subject: [PATCH] rtl8188eu: Fix Sparse warnings in core/rtw_sta_mgt.c Sparse reports the following: CHECK /home/finger/rtl8188eu/core/rtw_sta_mgt.c /home/finger/rtl8188eu/core/rtw_sta_mgt.c:32:6: warning: symbol '_rtw_init_stainfo' was not declared. Should it be static? /home/finger/rtl8188eu/core/rtw_sta_mgt.c:166:9: warning: symbol '_rtw_free_sta_xmit_priv_lock' was not declared. Should it be static? /home/finger/rtl8188eu/core/rtw_sta_mgt.c:174:6: warning: symbol 'rtw_mfree_stainfo' was not declared. Should it be static? Signed-off-by: Larry Finger --- core/rtw_sta_mgt.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/core/rtw_sta_mgt.c b/core/rtw_sta_mgt.c index 6126027..6834953 100644 --- a/core/rtw_sta_mgt.c +++ b/core/rtw_sta_mgt.c @@ -29,7 +29,7 @@ #include -void _rtw_init_stainfo(struct sta_info *psta) +static void _rtw_init_stainfo(struct sta_info *psta) { memset((u8 *)psta, 0, sizeof (struct sta_info)); @@ -163,24 +163,8 @@ inline struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int return (struct sta_info *)(stapriv->pstainfo_buf + offset * sizeof(struct sta_info)); } -void _rtw_free_sta_xmit_priv_lock(struct sta_xmit_priv *psta_xmitpriv) -{ -} - -static void _rtw_free_sta_recv_priv_lock(struct sta_recv_priv *psta_recvpriv) -{ -} - -void rtw_mfree_stainfo(struct sta_info *psta) -{ - _rtw_free_sta_xmit_priv_lock(&psta->sta_xmitpriv); - _rtw_free_sta_recv_priv_lock(&psta->sta_recvpriv); -} - - /* this function is used to free the memory of lock || sema for all stainfos */ -void rtw_mfree_all_stainfo(struct sta_priv *pstapriv ); -void rtw_mfree_all_stainfo(struct sta_priv *pstapriv ) +static void rtw_mfree_all_stainfo(struct sta_priv *pstapriv ) { unsigned long irqL; struct list_head *plist, *phead; @@ -197,8 +181,6 @@ void rtw_mfree_all_stainfo(struct sta_priv *pstapriv ) { psta = LIST_CONTAINOR(plist, struct sta_info ,list); plist = get_next(plist); - - rtw_mfree_stainfo(psta); } spin_unlock_bh(&pstapriv->sta_hash_lock);