From patchwork Thu Feb 18 14:19:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 8350251 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B574C9F38B for ; Thu, 18 Feb 2016 14:21:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EB340201C0 for ; Thu, 18 Feb 2016 14:21:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1514920145 for ; Thu, 18 Feb 2016 14:21:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946295AbcBROUh (ORCPT ); Thu, 18 Feb 2016 09:20:37 -0500 Received: from m50-132.163.com ([123.125.50.132]:45306 "EHLO m50-132.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1425356AbcBROUd (ORCPT ); Thu, 18 Feb 2016 09:20:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=KnUDV4q1R5LDQInlUK vcj71+dp/gvaj3WsiZzSKUsuk=; b=JY+a4HvDS4cEisY8tjSR4G11341Ry4MDZ6 AW5N1MF1TK5G92zW66l9f8cRCPbLNd3V7DNUc5P7pvz3qxzo89WakKsut3RkLk4h 5TYF5tCDzPWl7B+VAYFqPjoIkWNOXUMUS5eR6Lrl56YvkxrOCh0weMcxaSO6yKLo znEXk89/M= Received: from localhost (unknown [116.77.148.202]) by smtp2 (Coremail) with SMTP id DNGowECZYNUC08VWgeGPAA--.6692S3; Thu, 18 Feb 2016 22:19:46 +0800 (CST) From: Geliang Tang To: Larry Finger , Jes Sorensen , Greg Kroah-Hartman , Julian Calaby Cc: Geliang Tang , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 2/3] staging: rtl8723au: core: rtw_recv: remove useless codes Date: Thu, 18 Feb 2016 22:19:30 +0800 Message-Id: <30e1fa83bf812ef6f56221165a278560064150d7.1455804404.git.geliangtang@163.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: References: In-Reply-To: References: X-CM-TRANSID: DNGowECZYNUC08VWgeGPAA--.6692S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7ZF1kJr4rXr43KFW3uFyxAFb_yoW8Ww1Upa y8CwnxAF48JF1Uurs8JFs5uFWa9w4kWryUKa9Yy34Sgry8t3yvqryayF1Yvr45trWkCw4f uF1UKw13Ww4kWrJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07US-eOUUUUU= X-Originating-IP: [116.77.148.202] X-CM-SenderInfo: 5jhoxtpqjwt0rj6rljoofrz/1tbiNQMTmVSIMAIgEgAAsg Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There are some useless codes in rtw_free_recvframe23a_queue() and recvframe_defrag(), so remove them. Signed-off-by: Geliang Tang Acked-by: Jes Sorensen --- drivers/staging/rtl8723au/core/rtw_recv.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_recv.c b/drivers/staging/rtl8723au/core/rtw_recv.c index 0b4593c..d1e0f65 100644 --- a/drivers/staging/rtl8723au/core/rtw_recv.c +++ b/drivers/staging/rtl8723au/core/rtw_recv.c @@ -195,12 +195,11 @@ using spinlock to protect static void rtw_free_recvframe23a_queue(struct rtw_queue *pframequeue) { struct recv_frame *hdr, *ptmp; - struct list_head *plist, *phead; + struct list_head *phead; spin_lock(&pframequeue->lock); phead = get_list_head(pframequeue); - plist = phead->next; list_for_each_entry_safe(hdr, ptmp, phead, list) rtw_free_recvframe23a(hdr); @@ -1547,7 +1546,7 @@ struct recv_frame *recvframe_defrag(struct rtw_adapter *adapter, struct rtw_queue *defrag_q) { struct list_head *plist, *phead; - u8 *data, wlanhdr_offset; + u8 wlanhdr_offset; u8 curfragnum; struct recv_frame *pnfhdr, *ptmp; struct recv_frame *prframe, *pnextrframe; @@ -1576,10 +1575,6 @@ struct recv_frame *recvframe_defrag(struct rtw_adapter *adapter, curfragnum++; - phead = get_list_head(defrag_q); - - data = prframe->pkt->data; - list_for_each_entry_safe(pnfhdr, ptmp, phead, list) { pnextrframe = (struct recv_frame *)pnfhdr; /* check the fragment sequence (2nd ~n fragment frame) */