Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp805666pxk; Mon, 31 Aug 2020 01:10:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHPMS01OBWweHHHw3v2fiuFqr2SdiH+MPQ35LQtstZI16wsL7KTDLeKdd1Nka11yB8SG0P X-Received: by 2002:a17:906:2b06:: with SMTP id a6mr34151ejg.209.1598861403696; Mon, 31 Aug 2020 01:10:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598861403; cv=none; d=google.com; s=arc-20160816; b=zc7yptfRtYuW0pWSUZJcp4GPgag6l7tP98r5LmUNR+XoGG5P80EJzXjM6PRKsWg5aT hY4gKsHwByuZmhDMP4zzM6GcO9q80R1cFrvOpvuIfz96Ym8MECFmfUmzYnke2DqbCWAS kNQlroDE4X3G7JLhei05UMRotkRcTv2M+HmTHMGEgpSFnadqmzhwOpf1PRQDGyPpiSIh umUjmJSeB56YzkfCX2ERRvNfD8BiYmMK/yPugGRGQm/EcybcOBaUTWncA++sJAGWdOaW j6DObe09685cG978sKoAmh80TMBPu6mdhwczqjkKiUH3vP95zN9BoQX5XETiaEZOp4ZH J5ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=LiEYraM/QbNjzyJRN/2v2Nt2F0bz58s5dWImLL001T0=; b=EzUXI05FjOv04ySeG2CQShys4eOVjkuc6nhoHaW69rc1y6xYkF87aUaqMXHxbj+o7c 9Sbr1FAppturomdUAJSB4d6U6nabCSQPAnmg/HFrfaYLD7Pz8xC4CMIR4q26Z26AIFY5 EPrA1K0pum+gLUbyPtwVgWivqC5UweMs8um4MCw+1JPxCkzWqKaUCI4CgYUS0d0TDgMC rYEzNGh/5Uky45Q8lZ2HLmxLkuwah/2WfIJdEPH1dYSlvkwgEhz/RMVjAh/RYmkLV5Nu KPcThfslpEPzj22fC/tRAhsMYZz1zVOHZ6zW8JgJYUe22yLwdBODZf3Rw4drlbTCo/Wc OQmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v24si4629167edq.36.2020.08.31.01.09.28; Mon, 31 Aug 2020 01:10:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727844AbgHaIJA (ORCPT + 99 others); Mon, 31 Aug 2020 04:09:00 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:44196 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726573AbgHaII7 (ORCPT ); Mon, 31 Aug 2020 04:08:59 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 31261FB2EF1CFF7FDF93; Mon, 31 Aug 2020 16:08:56 +0800 (CST) Received: from huawei.com (10.175.127.227) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Mon, 31 Aug 2020 16:08:49 +0800 From: Jason Yan To: , , , , , , CC: Hulk Robot Subject: [PATCH] ath6kl: wmi: remove set but not used 'rate' Date: Mon, 31 Aug 2020 16:08:24 +0800 Message-ID: <20200831080824.3249197-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.175.127.227] X-CFilter-Loop: Reflected Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This addresses the following gcc warning with "make W=1": drivers/net/wireless/ath/ath6kl/wmi.c: In function ‘ath6kl_wmi_bitrate_reply_rx’: drivers/net/wireless/ath/ath6kl/wmi.c:1204:6: warning: variable ‘rate’ set but not used [-Wunused-but-set-variable] 1204 | s32 rate; | ^~~~ The variable 'sgi' is alse removed because after 'rate' is removed, it is not used too. Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/net/wireless/ath/ath6kl/wmi.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index 6885d2ded53a..a4339cca661f 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c @@ -1201,8 +1201,7 @@ static int ath6kl_wmi_pstream_timeout_event_rx(struct wmi *wmi, u8 *datap, static int ath6kl_wmi_bitrate_reply_rx(struct wmi *wmi, u8 *datap, int len) { struct wmi_bit_rate_reply *reply; - s32 rate; - u32 sgi, index; + u32 index; if (len < sizeof(struct wmi_bit_rate_reply)) return -EINVAL; @@ -1211,15 +1210,10 @@ static int ath6kl_wmi_bitrate_reply_rx(struct wmi *wmi, u8 *datap, int len) ath6kl_dbg(ATH6KL_DBG_WMI, "rateindex %d\n", reply->rate_index); - if (reply->rate_index == (s8) RATE_AUTO) { - rate = RATE_AUTO; - } else { + if (reply->rate_index != (s8) RATE_AUTO) { index = reply->rate_index & 0x7f; if (WARN_ON_ONCE(index > (RATE_MCS_7_40 + 1))) return -EINVAL; - - sgi = (reply->rate_index & 0x80) ? 1 : 0; - rate = wmi_rate_tbl[index][sgi]; } ath6kl_wakeup_event(wmi->parent_dev); -- 2.25.4