From patchwork Sat Jan 31 14:58:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 5754711 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 7077F9F358 for ; Sat, 31 Jan 2015 14:55:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A93952026D for ; Sat, 31 Jan 2015 14:55:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ACF3320263 for ; Sat, 31 Jan 2015 14:55:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753676AbbAaOza (ORCPT ); Sat, 31 Jan 2015 09:55:30 -0500 Received: from mail-wg0-f49.google.com ([74.125.82.49]:40155 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752832AbbAaOz3 (ORCPT ); Sat, 31 Jan 2015 09:55:29 -0500 Received: by mail-wg0-f49.google.com with SMTP id k14so31545660wgh.8 for ; Sat, 31 Jan 2015 06:55:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=f7NAh7X94HYGMmLV/a+0qJArTMNTpj2QGjHY/l6sgrU=; b=maJj1dx3SPLD8FZKHvoMbt0wf392fgFOYomtIxlLn0b3Q203VA9wXoZ+YLLbh5xgus cDFnlWf/We9Q91muyOCm2GzEgmf1Uo4FFtGfX8CYwOM0g1Pb+EsH1EsvuYU+n2eqOf61 gm4d347NBgwZe0cVlt6DE+odatjmdUayhPXN/mXgOaqs06xq7tvXHACRX+xkYlQjKOo4 TdsZekE5O9OM9qWfDB5fJAiPZHal7Cqdn0DJVxykubcGqV/wGJH0oj2oxhfgel15B1m3 xeTtyO8+qUtaKtbiIqcmzJukxPDHv0aoX7TdMwMOPfyZ9U6XvzYg1CQYzD993LWAeb/G RZUw== X-Gm-Message-State: ALoCoQkomDpYpIbDasPe0OlUwMzRtl7mB1eRhevxW1yvOcjiBsceA/8OnypzbrjPPsxdS71JHwun X-Received: by 10.194.158.39 with SMTP id wr7mr15733wjb.118.1422716127885; Sat, 31 Jan 2015 06:55:27 -0800 (PST) Received: from localhost.localdomain (h-246-111.a218.priv.bahnhof.se. [85.24.246.111]) by mx.google.com with ESMTPSA id da2sm19521641wjb.21.2015.01.31.06.55.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 31 Jan 2015 06:55:27 -0800 (PST) From: Rickard Strandqvist To: Larry Finger , Jes Sorensen Cc: Rickard Strandqvist , Greg Kroah-Hartman , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: rtl8723au: core: rtw_mlme: Removed variables that is never used Date: Sat, 31 Jan 2015 15:58:49 +0100 Message-Id: <1422716329-3718-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 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 --- drivers/staging/rtl8723au/core/rtw_mlme.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c b/drivers/staging/rtl8723au/core/rtw_mlme.c index 7299ef0..8b2db4b 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme.c @@ -2123,7 +2123,6 @@ bool rtw_restructure_ht_ie23a(struct rtw_adapter *padapter, u8 *in_ie, { u32 out_len; int max_rx_ampdu_factor; - unsigned char *pframe; const u8 *p; struct ieee80211_ht_cap ht_capie; u8 WMM_IE[7] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01, 0x00}; @@ -2139,10 +2138,10 @@ bool rtw_restructure_ht_ie23a(struct rtw_adapter *padapter, u8 *in_ie, if (pmlmepriv->qos_option == 0) { out_len = *pout_len; - pframe = rtw_set_ie23a(out_ie + out_len, - WLAN_EID_VENDOR_SPECIFIC, - sizeof(WMM_IE), WMM_IE, - pout_len); + rtw_set_ie23a(out_ie + out_len, + WLAN_EID_VENDOR_SPECIFIC, + sizeof(WMM_IE), WMM_IE, + pout_len); pmlmepriv->qos_option = 1; } @@ -2172,18 +2171,18 @@ bool rtw_restructure_ht_ie23a(struct rtw_adapter *padapter, u8 *in_ie, ht_capie.ampdu_params_info |= (IEEE80211_HT_AMPDU_PARM_DENSITY & 0x00); - pframe = rtw_set_ie23a(out_ie + out_len, WLAN_EID_HT_CAPABILITY, - sizeof(struct ieee80211_ht_cap), - (unsigned char *)&ht_capie, pout_len); + rtw_set_ie23a(out_ie + out_len, WLAN_EID_HT_CAPABILITY, + sizeof(struct ieee80211_ht_cap), + (unsigned char *)&ht_capie, pout_len); phtpriv->ht_option = true; p = cfg80211_find_ie(WLAN_EID_HT_OPERATION, in_ie, in_len); if (p && (p[1] == sizeof(struct ieee80211_ht_operation))) { out_len = *pout_len; - pframe = rtw_set_ie23a(out_ie + out_len, - WLAN_EID_HT_OPERATION, - p[1], p + 2 , pout_len); + rtw_set_ie23a(out_ie + out_len, + WLAN_EID_HT_OPERATION, + p[1], p + 2, pout_len); } }