From patchwork Sat Dec 20 12:48:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 5522571 X-Patchwork-Delegate: kvalo@adurom.com 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CE925BEEA8 for ; Sat, 20 Dec 2014 12:46:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0BD1B2013D for ; Sat, 20 Dec 2014 12:46:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2F1072014A for ; Sat, 20 Dec 2014 12:46:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753107AbaLTMpd (ORCPT ); Sat, 20 Dec 2014 07:45:33 -0500 Received: from mail-wi0-f172.google.com ([209.85.212.172]:40498 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753081AbaLTMp2 (ORCPT ); Sat, 20 Dec 2014 07:45:28 -0500 Received: by mail-wi0-f172.google.com with SMTP id n3so4286825wiv.11 for ; Sat, 20 Dec 2014 04:45:27 -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=njoZW6QMoXeGdkT4DUeJ5uE3VW7kdKQ4+QWsWGEsoS0=; b=P0nR4SYW9Ds2QV4uNRun1+kbblvBHm6Y22ccI9mT/Mww/Dj9uL0wrFZV5B+Xic8TW3 auAM6lVA3fvV5oRo986piqmppGOPAr2vBi3PmC06+4cMCAOT7hCyH9kjnjT9EvmNbKT4 7yZFG063gxYj5hfQPz3VTZfZXwfM+bLRCXLsSm74PN9/D0G+M1yma+j8eKG7kXfMVtQS 2Al1uwJrwwVhN8pFBnIkewSi3u7h4YsqUMQrvhBOwgXVaqkDOWcUeMYcmWl1ZUtHhd/G yEq8/ysPTbfYcIVyr/39u0IJKIoDT//bOEdNjdYjUVL5l3DxKNHKD0J64Nq0tKP+3AB9 B3Ag== X-Gm-Message-State: ALoCoQl4hOQ8ANl2b3haEQZHpJpXJtzq/I3XO3tHV7TTYwsNbjbKxSS7w5eKJNxFGJCd+BVQbmwM X-Received: by 10.180.80.133 with SMTP id r5mr14366604wix.20.1419079527373; Sat, 20 Dec 2014 04:45:27 -0800 (PST) Received: from localhost.localdomain (h-246-111.a218.priv.bahnhof.se. [85.24.246.111]) by mx.google.com with ESMTPSA id 18sm16223918wjr.46.2014.12.20.04.45.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Dec 2014 04:45:26 -0800 (PST) From: Rickard Strandqvist To: Larry Finger , Chaoming Li Cc: Rickard Strandqvist , "John W. Linville" , Greg Kroah-Hartman , Rasmus Villemoes , Joe Perches , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: wireless: rtlwifi: rtl8192ee: trx.c: Remove unused function Date: Sat, 20 Dec 2014 13:48:14 +0100 Message-Id: <1419079694-32476-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 Remove the function rtl92ee_get_available_desc() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist Acked-by: Larry Finger --- drivers/net/wireless/rtlwifi/rtl8192ee/trx.c | 21 --------------------- drivers/net/wireless/rtlwifi/rtl8192ee/trx.h | 1 - 2 files changed, 22 deletions(-) diff --git a/drivers/net/wireless/rtlwifi/rtl8192ee/trx.c b/drivers/net/wireless/rtlwifi/rtl8192ee/trx.c index 2fcbef1..8186ed2 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ee/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ee/trx.c @@ -710,27 +710,6 @@ static u16 get_desc_addr_fr_q_idx(u16 queue_index) return desc_address; } -void rtl92ee_get_available_desc(struct ieee80211_hw *hw, u8 q_idx) -{ - struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); - struct rtl_priv *rtlpriv = rtl_priv(hw); - u16 point_diff = 0; - u16 current_tx_read_point = 0, current_tx_write_point = 0; - u32 tmp_4byte; - - tmp_4byte = rtl_read_dword(rtlpriv, - get_desc_addr_fr_q_idx(q_idx)); - current_tx_read_point = (u16)((tmp_4byte >> 16) & 0x0fff); - current_tx_write_point = (u16)((tmp_4byte) & 0x0fff); - - point_diff = ((current_tx_read_point > current_tx_write_point) ? - (current_tx_read_point - current_tx_write_point) : - (TX_DESC_NUM_92E - current_tx_write_point + - current_tx_read_point)); - - rtlpci->tx_ring[q_idx].avl_desc = point_diff; -} - void rtl92ee_pre_fill_tx_bd_desc(struct ieee80211_hw *hw, u8 *tx_bd_desc, u8 *desc, u8 queue_index, struct sk_buff *skb, dma_addr_t addr) diff --git a/drivers/net/wireless/rtlwifi/rtl8192ee/trx.h b/drivers/net/wireless/rtlwifi/rtl8192ee/trx.h index 6f9be1c..4426c49 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ee/trx.h +++ b/drivers/net/wireless/rtlwifi/rtl8192ee/trx.h @@ -829,7 +829,6 @@ void rtl92ee_rx_check_dma_ok(struct ieee80211_hw *hw, u8 *header_desc, u8 queue_index); u16 rtl92ee_rx_desc_buff_remained_cnt(struct ieee80211_hw *hw, u8 queue_index); -void rtl92ee_get_available_desc(struct ieee80211_hw *hw, u8 queue_index); void rtl92ee_pre_fill_tx_bd_desc(struct ieee80211_hw *hw, u8 *tx_bd_desc, u8 *desc, u8 queue_index, struct sk_buff *skb, dma_addr_t addr);