Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp755581pxf; Wed, 7 Apr 2021 10:43:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3L6RR3VJout/7rz7yJacFrigeor8LY4pL2R417fbSqS2NufngSYGVxkvVwqBA1JiGuvtk X-Received: by 2002:a17:906:d15a:: with SMTP id br26mr5093170ejb.328.1617817394243; Wed, 07 Apr 2021 10:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617817394; cv=none; d=google.com; s=arc-20160816; b=AtAbJPqc7lbUWu5jfbIbtxSMFJfg6zmkCJpx1TVpHEm/Wup7Vxcr2pKoDb0nCCEDsd 2PbQfYnk1tk1K+Uo7Ga9yBWQCvepz+z8G/8Prdna857ZdqvAVRWX2A/T2U48clMVBYra DKWDeEjBib/9qKnL1Hjbfsy0G4dQEUGgcjYWa+8yEL42JvQSUA1oIGJdCiXGJHIxX8EQ QB7bfxEQy1LyOt/p4Rtj4uX+yZzhNYfoB5PLLtomq8oLAkeB5o4353ITBm6RaFw6R5Dq 9Wuha6jDD5KRw1VTGEo0PYUo5Vl3S+888TVQdBNXmj1c2RSw87qMEij+NpN1TbOFTa7A KO0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=lsDm/wjns/42gaWfRKAqwoSXRUTFOEGEjhVPtdhai14=; b=yKtLV3Bk8nRfGnGjoohoe2mNnJZMdkOVtBd8fgwj9weG7aXWuSL3gf31INMFSvGWsc 3J4hxhe1NiPMWtGXGcYtI/OYkWe6OWYr4Od7RONRDNZ6ct2fJ6OyImdW/jiNkd8bbN2Z x+w2dWZMqW9kBU9b4F3uvHYM5XXn2A6LS2L7vQOWUsdPwE6me2Bde7M2Dol68JjzlnFn 6wm01iSperB5JiDhE/vs0fPh708nUH/pF3NA5+AAx9N1t+lYk82jlStVYeBR7+whcPdK wFOn8BodgBQYIICDNxSmbuHbQ73kbFdE3YXl5VK8mFwImQ3rj/3R34XHpWgr/IOpeqbG oQrw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rv20si4353677ejb.277.2021.04.07.10.42.50; Wed, 07 Apr 2021 10:43:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348288AbhDGDSx (ORCPT + 99 others); Tue, 6 Apr 2021 23:18:53 -0400 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]:39764 "EHLO out30-130.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230073AbhDGDSx (ORCPT ); Tue, 6 Apr 2021 23:18:53 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R521e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0UUklsn3_1617765508; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UUklsn3_1617765508) by smtp.aliyun-inc.com(127.0.0.1); Wed, 07 Apr 2021 11:18:43 +0800 From: Jiapeng Chong To: gregkh@linuxfoundation.org Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] staging: rtl8723bs: remove unused variable Date: Wed, 7 Apr 2021 11:18:19 +0800 Message-Id: <1617765499-65626-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following gcc warning: drivers/staging/rtl8723bs/core/rtw_ieee80211.c:657:15: warning: variable ‘sec_idx’ set but not used [-Wunused-but-set-variable]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c index be4cffc..df00a79 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c +++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c @@ -654,7 +654,7 @@ int rtw_get_wapi_ie(u8 *in_ie, uint in_len, u8 *wapi_ie, u16 *wapi_len) void rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie, u16 *wpa_len) { - u8 authmode, sec_idx, i; + u8 authmode, i; u8 wpa_oui[4] = {0x0, 0x50, 0xf2, 0x01}; uint cnt; @@ -662,13 +662,11 @@ void rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie cnt = (_TIMESTAMP_ + _BEACON_ITERVAL_ + _CAPABILITY_); - sec_idx = 0; - while (cnt < in_len) { authmode = in_ie[cnt]; if ((authmode == WLAN_EID_VENDOR_SPECIFIC) && (!memcmp(&in_ie[cnt+2], &wpa_oui[0], 4))) { - RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\n rtw_get_wpa_ie: sec_idx =%d in_ie[cnt+1]+2 =%d\n", sec_idx, in_ie[cnt+1]+2)); + RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\n in_ie[cnt+1]+2 =%d\n", in_ie[cnt+1]+2)); if (wpa_ie) { memcpy(wpa_ie, &in_ie[cnt], in_ie[cnt+1]+2); @@ -684,7 +682,7 @@ void rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie cnt += in_ie[cnt+1]+2; /* get next */ } else { if (authmode == WLAN_EID_RSN) { - RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\n get_rsn_ie: sec_idx =%d in_ie[cnt+1]+2 =%d\n", sec_idx, in_ie[cnt+1]+2)); + RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\n in_ie[cnt+1]+2 =%d\n", in_ie[cnt+1]+2)); if (rsn_ie) { memcpy(rsn_ie, &in_ie[cnt], in_ie[cnt+1]+2); -- 1.8.3.1