From patchwork Thu Sep 24 09:15:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glen Lee X-Patchwork-Id: 7254611 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E4E9DBEEC1 for ; Thu, 24 Sep 2015 09:14:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 12B5020987 for ; Thu, 24 Sep 2015 09:14:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 05490206E4 for ; Thu, 24 Sep 2015 09:14:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753115AbbIXJN7 (ORCPT ); Thu, 24 Sep 2015 05:13:59 -0400 Received: from eusmtp01.atmel.com ([212.144.249.242]:25584 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753130AbbIXJN5 (ORCPT ); Thu, 24 Sep 2015 05:13:57 -0400 Received: from glen-ubuntu.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.30) with Microsoft SMTP Server id 14.3.235.1; Thu, 24 Sep 2015 11:13:51 +0200 From: Glen Lee To: CC: , , , , , , , , , , , Subject: [PATCH 11/15] staging: wilc1000: remove variable tx_buffer_size Date: Thu, 24 Sep 2015 18:15:02 +0900 Message-ID: <1443086106-20482-11-git-send-email-glen.lee@atmel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1443086106-20482-1-git-send-email-glen.lee@atmel.com> References: <1443086106-20482-1-git-send-email-glen.lee@atmel.com> MIME-Version: 1.0 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, 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 This patch removes unnecessary two variables tx_buffer_size and just use LINUX_TX_SIZE as argument. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/linux_wlan.c | 1 - drivers/staging/wilc1000/wilc_wlan.c | 6 ++---- drivers/staging/wilc1000/wilc_wlan_if.h | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 5bb5588..62ca83f 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -1056,7 +1056,6 @@ void linux_to_wlan(wilc_wlan_inp_t *nwi, linux_wlan_t *nic) PRINT_D(INIT_DBG, "Linux to Wlan services ...\n"); nwi->os_context.os_private = (void *)nic; - nwi->os_context.tx_buffer_size = LINUX_TX_SIZE; nwi->os_context.txq_critical_section = (void *)&g_linux_wlan->txq_cs; #if defined(MEMORY_STATIC) nwi->os_context.rx_buffer_size = LINUX_RX_SIZE; diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 9df2110..4fc0a6a 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -58,7 +58,6 @@ typedef struct { /** * TX buffer **/ - u32 tx_buffer_size; u8 *tx_buffer; u32 tx_buffer_offset; @@ -873,7 +872,7 @@ static int wilc_wlan_handle_txq(u32 *pu32TxqCount) if (vmm_sz & 0x3) { /* has to be word aligned */ vmm_sz = (vmm_sz + 4) & ~0x3; } - if ((sum + vmm_sz) > p->tx_buffer_size) { + if ((sum + vmm_sz) > LINUX_TX_SIZE) { break; } PRINT_D(TX_DBG, "VMM Size AFTER alignment = %d\n", vmm_sz); @@ -1970,7 +1969,6 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup) memcpy((void *)&g_wlan.io_func, (void *)&inp->io_func, sizeof(wilc_wlan_io_func_t)); g_wlan.txq_lock = inp->os_context.txq_critical_section; - g_wlan.tx_buffer_size = inp->os_context.tx_buffer_size; #if defined (MEMORY_STATIC) g_wlan.rx_buffer_size = inp->os_context.rx_buffer_size; #endif @@ -2017,7 +2015,7 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup) * alloc tx, rx buffer **/ if (g_wlan.tx_buffer == NULL) - g_wlan.tx_buffer = kmalloc(g_wlan.tx_buffer_size, GFP_KERNEL); + g_wlan.tx_buffer = kmalloc(LINUX_TX_SIZE, GFP_KERNEL); PRINT_D(TX_DBG, "g_wlan.tx_buffer = %p\n", g_wlan.tx_buffer); if (g_wlan.tx_buffer == NULL) { diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index 42013e7..a746ad4 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -107,7 +107,6 @@ typedef struct { typedef struct { void *os_private; - u32 tx_buffer_size; void *txq_critical_section; #if defined(MEMORY_STATIC) u32 rx_buffer_size;