From patchwork Sat Sep 1 07:48:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10584631 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5CA1916B1 for ; Sat, 1 Sep 2018 07:38:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E95C2A52D for ; Sat, 1 Sep 2018 07:38:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B6312A535; Sat, 1 Sep 2018 07:38:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF1292A52D for ; Sat, 1 Sep 2018 07:38:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727251AbeIALtC (ORCPT ); Sat, 1 Sep 2018 07:49:02 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:11621 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725964AbeIALtC (ORCPT ); Sat, 1 Sep 2018 07:49:02 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id C282A763F2BEB; Sat, 1 Sep 2018 15:37:56 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.399.0; Sat, 1 Sep 2018 15:37:50 +0800 From: YueHaibing To: Kalle Valo , Pavani Muthyala , Kees Cook , Colin Ian King , Amitkumar Karwar , Prameela Rani Garnepudi , Siva Rebbagondla , Sushant Kumar Mishra CC: YueHaibing , , , Subject: [PATCH v4] rsi: remove set but not used variables 'header_size' and 'tx_params' Date: Sat, 1 Sep 2018 07:48:27 +0000 Message-ID: <1535788107-171830-1-git-send-email-yuehaibing@huawei.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1535786170-169698-1-git-send-email-yuehaibing@huawei.com> References: <1535786170-169698-1-git-send-email-yuehaibing@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/rsi/rsi_91x_hal.c: In function 'rsi_send_data_pkt': drivers/net/wireless/rsi/rsi_91x_hal.c:288:5: warning: variable 'header_size' set but not used [-Wunused-but-set-variable] 'tx_params' only used for 'header_size' dereferenced,so also can be removed. Signed-off-by: YueHaibing --- v4:add missing changlog,also wipe a messy code in commit log v3:fix patch title as Siva Rebbagondla suggested v2:remove unused 'tx_params' --- drivers/net/wireless/rsi/rsi_91x_hal.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/wireless/rsi/rsi_91x_hal.c b/drivers/net/wireless/rsi/rsi_91x_hal.c index 01edf96..182b066 100644 --- a/drivers/net/wireless/rsi/rsi_91x_hal.c +++ b/drivers/net/wireless/rsi/rsi_91x_hal.c @@ -282,10 +282,8 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb) struct rsi_hw *adapter = common->priv; struct ieee80211_vif *vif; struct ieee80211_tx_info *info; - struct skb_info *tx_params; struct ieee80211_bss_conf *bss; int status = -EINVAL; - u8 header_size; if (!skb) return 0; @@ -297,8 +295,6 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb) goto err; vif = info->control.vif; bss = &vif->bss_conf; - tx_params = (struct skb_info *)info->driver_data; - header_size = tx_params->internal_hdr_size; if (((vif->type == NL80211_IFTYPE_STATION) || (vif->type == NL80211_IFTYPE_P2P_CLIENT)) &&