From patchwork Sat Jan 31 15:11:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 5754871 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 23F42BF440 for ; Sat, 31 Jan 2015 15:08:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 61F702026D for ; Sat, 31 Jan 2015 15:08:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 82D1D20263 for ; Sat, 31 Jan 2015 15:08:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754121AbbAaPIA (ORCPT ); Sat, 31 Jan 2015 10:08:00 -0500 Received: from mail-we0-f181.google.com ([74.125.82.181]:40382 "EHLO mail-we0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751950AbbAaPH7 (ORCPT ); Sat, 31 Jan 2015 10:07:59 -0500 Received: by mail-we0-f181.google.com with SMTP id k48so31885689wev.12 for ; Sat, 31 Jan 2015 07:07:58 -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=rNP0XRoWvOCfaO6GiG/38stlhxripSJYwhCCbyyp1nM=; b=jckacUVL9ztbsU2Cl9eAHmdInLpZVgDd4T/O/RiMAxcaYxDT8jFuwfABmz5+JogNxN 2Ma00Bx0WLynANzkbCbIYDsL6XuRsYK4QfaSP7f0MjxtbhpVU4invgVKzYpBGxxPSRaI 98mk6bAur2pSneyEzR+C6b4I0xOqgzYzauQqIEJ+jEXiAMFop0NJgEZXRefucOniOh+5 tUu88MzBws3TNmsH4H0U5mZQyH6qAFruAobZHQTvWyzz/NuOOEtfMaHVp3+rBu88VDt3 82bT9wSb8C8tDcjwpzgGUZGZn6TdYGSQJVHEB6yRXPxz0MGXEvrNmah79kIpRSueibKS FyUQ== X-Gm-Message-State: ALoCoQknEDDyGi/1QEqvl7ABYHMcYS5Wlv4Y3PyvGeowCXUsvCRWjShTVQF9XwhbBS+c1n8DIST8 X-Received: by 10.180.211.34 with SMTP id mz2mr5528740wic.18.1422716878113; Sat, 31 Jan 2015 07:07:58 -0800 (PST) Received: from localhost.localdomain (h-246-111.a218.priv.bahnhof.se. [85.24.246.111]) by mx.google.com with ESMTPSA id dc1sm11531433wib.18.2015.01.31.07.07.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 31 Jan 2015 07:07:57 -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: hal: rtl8723a_hal_init: Removed variables that is never used Date: Sat, 31 Jan 2015 16:11:19 +0100 Message-Id: <1422717079-5629-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/hal/rtl8723a_hal_init.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index a5eadd4..f2bcf4f 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -604,7 +604,7 @@ rtl8723a_readefuse(struct rtw_adapter *padapter, u16 rtl8723a_EfuseGetCurrentSize_WiFi(struct rtw_adapter *padapter) { u16 efuse_addr = 0; - u8 hoffset = 0, hworden = 0; + u8 hworden = 0; u8 efuse_data, word_cnts = 0; struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter); @@ -627,17 +627,14 @@ u16 rtl8723a_EfuseGetCurrentSize_WiFi(struct rtw_adapter *padapter) break; if (EXT_HEADER(efuse_data)) { - hoffset = GET_HDR_OFFSET_2_0(efuse_data); efuse_addr++; efuse_OneByteRead23a(padapter, efuse_addr, &efuse_data); if (ALL_WORDS_DISABLED(efuse_data)) { continue; } - hoffset |= ((efuse_data & 0xF0) >> 1); hworden = efuse_data & 0x0F; } else { - hoffset = (efuse_data >> 4) & 0x0F; hworden = efuse_data & 0x0F; } @@ -657,7 +654,7 @@ u16 rtl8723a_EfuseGetCurrentSize_BT(struct rtw_adapter *padapter) u16 btusedbytes; u16 efuse_addr; u8 bank, startBank; - u8 hoffset = 0, hworden = 0; + u8 hworden = 0; u8 efuse_data, word_cnts = 0; u16 retU2 = 0; struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter); @@ -700,7 +697,6 @@ u16 rtl8723a_EfuseGetCurrentSize_BT(struct rtw_adapter *padapter) break; if (EXT_HEADER(efuse_data)) { - hoffset = GET_HDR_OFFSET_2_0(efuse_data); efuse_addr++; efuse_OneByteRead23a(padapter, efuse_addr, &efuse_data); @@ -709,10 +705,8 @@ u16 rtl8723a_EfuseGetCurrentSize_BT(struct rtw_adapter *padapter) continue; } - hoffset |= ((efuse_data & 0xF0) >> 1); hworden = efuse_data & 0x0F; } else { - hoffset = (efuse_data >> 4) & 0x0F; hworden = efuse_data & 0x0F; } word_cnts = Efuse_CalculateWordCnts23a(hworden);