Skip to contentSkip to conversation

staging: rtl8723bs: rtw_os_recv_resource_alloc(): Change type

PATCH New Nishka Dasgupta 1 participant 2 messages Jun 7, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 staging: rtl8723bs: rtw_os_recv_resource_alloc(): Change type

Remove assignment of the return value of rtw_os_recv_resource_alloc as this assignment at the call site is never used.
Remove return statement from rtw_os_recv_resource_alloc() as its return variable is never used.
Change the type of the function to void.

---
 drivers/staging/rtl8723bs/core/rtw_recv.c      | 2 +-
 drivers/staging/rtl8723bs/include/recv_osdep.h | 2 +-
 drivers/staging/rtl8723bs/os_dep/recv_linux.c  | 6 +-----
 3 files changed, 3 insertions(+), 7 deletions(-)
drivers/staging/rtl8723bs/core/rtw_recv.c +1 -1
index b9c9bba1a335..687ff3c6f09f 100644
@@ -67,7 +67,7 @@ sint _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter)
 
 		list_add_tail(&(precvframe->u.list), &(precvpriv->free_recv_queue.queue));
 
-		res = rtw_os_recv_resource_alloc(padapter, precvframe);
+		rtw_os_recv_resource_alloc(padapter, precvframe);
 
 		precvframe->u.hdr.len = 0;
 
drivers/staging/rtl8723bs/include/recv_osdep.h +1 -1
index 6fea0e948271..0e1baf170cfb 100644
@@ -22,7 +22,7 @@ int	rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter);
 void rtw_free_recv_priv (struct recv_priv *precvpriv);
 
 
-int rtw_os_recv_resource_alloc(struct adapter *padapter, union recv_frame *precvframe);
+void rtw_os_recv_resource_alloc(struct adapter *padapter, union recv_frame *precvframe);
 void rtw_os_recv_resource_free(struct recv_priv *precvpriv);
 
 
drivers/staging/rtl8723bs/os_dep/recv_linux.c +1 -5
index 67ec336264e5..45145efa3f68 100644
@@ -21,13 +21,9 @@ void rtw_os_free_recvframe(union recv_frame *precvframe)
 }
 
 /* alloc os related resource in union recv_frame */
-int rtw_os_recv_resource_alloc(struct adapter *padapter, union recv_frame *precvframe)
+void rtw_os_recv_resource_alloc(struct adapter *padapter, union recv_frame *precvframe)
 {
-	int	res = _SUCCESS;
-
 	precvframe->u.hdr.pkt_newalloc = precvframe->u.hdr.pkt = NULL;
-
-	return res;
 }
 
 /* free os related resource in union recv_frame */
Signature · 1 line
2.19.1
#1 lore raw

PATCH 2/2 staging: rtl8723bs: rtw_os_recvbuf_resource_free(): Change type

Change return type of function rtw_os_recvbuf_resource_free to void as its return value is never stored, checked or otherwise used.

---
 drivers/staging/rtl8723bs/include/recv_osdep.h | 2 +-
 drivers/staging/rtl8723bs/os_dep/recv_linux.c  | 6 +-----
 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/staging/rtl8723bs/include/recv_osdep.h +1 -1
index 0e1baf170cfb..1056f615d0f9 100644
@@ -29,7 +29,7 @@ void rtw_os_recv_resource_free(struct recv_priv *precvpriv);
 void rtw_os_free_recvframe(union recv_frame *precvframe);
 
 
-int rtw_os_recvbuf_resource_free(struct adapter *padapter, struct recv_buf *precvbuf);
+void rtw_os_recvbuf_resource_free(struct adapter *padapter, struct recv_buf *precvbuf);
 
 _pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, u16 nSubframe_Length, u8 *pdata);
 void rtw_os_recv_indicate_pkt(struct adapter *padapter, _pkt *pkt, struct rx_pkt_attrib *pattrib);
drivers/staging/rtl8723bs/os_dep/recv_linux.c +1 -5
index 45145efa3f68..3fe9c2255edd 100644
@@ -46,16 +46,12 @@ void rtw_os_recv_resource_free(struct recv_priv *precvpriv)
 }
 
 /* free os related resource in struct recv_buf */
-int rtw_os_recvbuf_resource_free(struct adapter *padapter, struct recv_buf *precvbuf)
+void rtw_os_recvbuf_resource_free(struct adapter *padapter, struct recv_buf *precvbuf)
 {
-	int ret = _SUCCESS;
-
 	if (precvbuf->pskb)
 	{
 		dev_kfree_skb_any(precvbuf->pskb);
 	}
-	return ret;
-
 }
 
 _pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, u16 nSubframe_Length, u8 *pdata)
Signature · 1 line
2.19.1