lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1422716508-4246-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
Date:	Sat, 31 Jan 2015 16:01:48 +0100
From:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To:	Larry Finger <Larry.Finger@...inger.net>,
	Jes Sorensen <Jes.Sorensen@...hat.com>
Cc:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Greg Donald <gdonald@...il.com>,
	Roberta Dobrescu <roberta.dobrescu@...il.com>,
	linux-wireless@...r.kernel.org, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] staging: rtl8723au: core: rtw_recv: Removed variables that is never used

Variable was assigned a value that was never used.
I have also removed all the code that thereby serves no purpose.

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
---
 drivers/staging/rtl8723au/core/rtw_recv.c |   19 +++----------------
 1 file changed, 3 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_recv.c b/drivers/staging/rtl8723au/core/rtw_recv.c
index 559ddde..6068990 100644
--- a/drivers/staging/rtl8723au/core/rtw_recv.c
+++ b/drivers/staging/rtl8723au/core/rtw_recv.c
@@ -1561,7 +1561,6 @@ static int wlanhdr_to_ethhdr (struct recv_frame *precvframe)
 		*ptr = 0x87;
 		*(ptr + 1) = 0x12;
 
-		eth_type = 0x8712;
 		/*  append rx status for mp test packets */
 
 		ptr = skb_pull(skb, (hdrlen - sizeof(struct ethhdr) + 2) - 24);
@@ -1591,17 +1590,15 @@ struct recv_frame *recvframe_defrag(struct rtw_adapter *adapter,
 				    struct rtw_queue *defrag_q)
 {
 	struct list_head *plist, *phead, *ptmp;
-	u8	*data, wlanhdr_offset;
+	u8	wlanhdr_offset;
 	u8	curfragnum;
 	struct recv_frame *pnfhdr;
-	struct recv_frame *prframe, *pnextrframe;
-	struct rtw_queue	*pfree_recv_queue;
+	struct recv_frame *prframe;
 	struct sk_buff *skb;
 
 
 
 	curfragnum = 0;
-	pfree_recv_queue = &adapter->recvpriv.free_recv_queue;
 
 	phead = get_list_head(defrag_q);
 	plist = phead->next;
@@ -1622,11 +1619,8 @@ struct recv_frame *recvframe_defrag(struct rtw_adapter *adapter,
 
 	phead = get_list_head(defrag_q);
 
-	data = prframe->pkt->data;
-
 	list_for_each_safe(plist, ptmp, phead) {
 		pnfhdr = container_of(plist, struct recv_frame, list);
-		pnextrframe = (struct recv_frame *)pnfhdr;
 		/* check the fragment sequence  (2nd ~n fragment frame) */
 
 		if (curfragnum != pnfhdr->attrib.frag_num) {
@@ -1684,7 +1678,7 @@ struct recv_frame *recvframe_chk_defrag23a(struct rtw_adapter *padapter,
 	struct sta_priv *pstapriv;
 	struct list_head *phead;
 	struct recv_frame *prtnframe = NULL;
-	struct rtw_queue *pfree_recv_queue, *pdefrag_q;
+	struct rtw_queue *pdefrag_q;
 
 
 
@@ -1692,8 +1686,6 @@ struct recv_frame *recvframe_chk_defrag23a(struct rtw_adapter *padapter,
 
 	pfhdr = precv_frame;
 
-	pfree_recv_queue = &padapter->recvpriv.free_recv_queue;
-
 	/* need to define struct of wlan header frame ctrl */
 	ismfrag = pfhdr->attrib.mfrag;
 	fragnum = pfhdr->attrib.frag_num;
@@ -1798,12 +1790,9 @@ struct recv_frame *recvframe_chk_defrag23a(struct rtw_adapter *padapter,
 int amsdu_to_msdu(struct rtw_adapter *padapter, struct recv_frame *prframe);
 int amsdu_to_msdu(struct rtw_adapter *padapter, struct recv_frame *prframe)
 {
-	struct rx_pkt_attrib *pattrib;
 	struct sk_buff *skb, *sub_skb;
 	struct sk_buff_head skb_list;
 
-	pattrib = &prframe->attrib;
-
 	skb = prframe->pkt;
 	skb_pull(skb, prframe->attrib.hdrlen);
 	__skb_queue_head_init(&skb_list);
@@ -1921,10 +1910,8 @@ int recv_indicatepkts_in_order(struct rtw_adapter *padapter,
 	struct rx_pkt_attrib *pattrib;
 	/* u8 index = 0; */
 	int bPktInBuf = false;
-	struct recv_priv *precvpriv;
 	struct rtw_queue *ppending_recvframe_queue;
 
-	precvpriv = &padapter->recvpriv;
 	ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
 	/* DbgPrint("+recv_indicatepkts_in_order\n"); */
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ