From patchwork Sat Jan 31 15:03:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 5754771 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EA82CBF440 for ; Sat, 31 Jan 2015 15:00:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 38C432026D for ; Sat, 31 Jan 2015 15:00:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 686D420263 for ; Sat, 31 Jan 2015 15:00:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753606AbbAaPAD (ORCPT ); Sat, 31 Jan 2015 10:00:03 -0500 Received: from mail-wg0-f53.google.com ([74.125.82.53]:59138 "EHLO mail-wg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752097AbbAaPAA (ORCPT ); Sat, 31 Jan 2015 10:00:00 -0500 Received: by mail-wg0-f53.google.com with SMTP id a1so31465242wgh.12 for ; Sat, 31 Jan 2015 06:59:59 -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=0i7amK6lReaSlgqL4/2QYn5rB8y7fwSXVrZGZfijR28=; b=DPx2cD4by3D/TV8CS/nGpfe9qGDLkmlcYsI3ceHzhv5QTZwqgCEN/2ew+DQaYPX2A0 VC2mmzO3TNzm1pG8wjQOXgw4QC0u+59V2BjlO4mboOmKPLpQxhLxFg5DQbdzdnKAu6TC KzA1RBLmlRbvjTRHb15xD9ZhJPSA6K5nBSzR9ccZA8znp+jXSV7mRQWq1CYEBVU2WGKY C4dUrgJgKz4XXQKItxfaiL9Zt3CerXQ1Tbylgj5w6pXFRmj5A8vcqT3yIvz4U1NW6b8M MOi/eBnamw2b/z4Nk+TOj9gyiq15vCAD46gnizk3v58kClTP8W1TLJNA3ZY64UlXx8Eg ayfQ== X-Gm-Message-State: ALoCoQmsBPQf+aSk8j4Ib1EctApwkIx/g+gPU75/KmNMjAFL9o+8CWEVaCQLugydnuQVgpYJJydD X-Received: by 10.180.72.199 with SMTP id f7mr5540402wiv.58.1422716399481; Sat, 31 Jan 2015 06:59:59 -0800 (PST) Received: from localhost.localdomain (h-246-111.a218.priv.bahnhof.se. [85.24.246.111]) by mx.google.com with ESMTPSA id f7sm19534508wjq.28.2015.01.31.06.59.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 31 Jan 2015 06:59:58 -0800 (PST) From: Rickard Strandqvist To: Larry Finger , Jes Sorensen Cc: Rickard Strandqvist , Greg Kroah-Hartman , Greg Donald , Yeliz Taneroglu , Tina Ruchandani , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: rtl8723au: core: rtw_security: Removed variables that is never used Date: Sat, 31 Jan 2015 16:03:20 +0100 Message-Id: <1422716600-4498-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=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 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_security.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_security.c b/drivers/staging/rtl8723au/core/rtw_security.c index 715a474..8799ba4 100644 --- a/drivers/staging/rtl8723au/core/rtw_security.c +++ b/drivers/staging/rtl8723au/core/rtw_security.c @@ -612,7 +612,6 @@ int rtw_tkip_encrypt23a(struct rtw_adapter *padapter, u8 hw_hdr_offset = 0; struct arc4context mycontext; int curfragnum, length; - u32 prwskeylen; u8 *pframe, *payload, *iv, *prwskey; union pn48 dot11txpn; struct sta_info *stainfo; @@ -651,8 +650,6 @@ int rtw_tkip_encrypt23a(struct rtw_adapter *padapter, else prwskey = &stainfo->dot118021x_UncstKey.skey[0]; - prwskeylen = 16; - for (curfragnum = 0;curfragnumnr_frags;curfragnum++) { iv = pframe+pattrib->hdrlen; payload = pframe+pattrib->iv_len+pattrib->hdrlen;