From patchwork Thu Sep 24 09:15:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glen Lee X-Patchwork-Id: 7254591 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 A89D6BEEC1 for ; Thu, 24 Sep 2015 09:13:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B7A972098A for ; Thu, 24 Sep 2015 09:13:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7C0F9208EB for ; Thu, 24 Sep 2015 09:13:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753040AbbIXJNp (ORCPT ); Thu, 24 Sep 2015 05:13:45 -0400 Received: from eusmtp01.atmel.com ([212.144.249.242]:25534 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753014AbbIXJNo (ORCPT ); Thu, 24 Sep 2015 05:13:44 -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:38 +0200 From: Glen Lee To: CC: , , , , , , , , , , , Subject: [PATCH 09/15] staging: wilc1000: remove pointer variables of txq_add_to_head_cs Date: Thu, 24 Sep 2015 18:15:00 +0900 Message-ID: <1443086106-20482-9-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 txq_add_to_head_critical_section and txq_add_to_head_lock which are pointer of g_linux_wlan->txq_add_to_head_cs. Just use g_linux_wlan->txq_add_to_head_cs as argument of function. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/linux_wlan.c | 3 --- drivers/staging/wilc1000/wilc_wlan.c | 13 ++++++------- drivers/staging/wilc1000/wilc_wlan_if.h | 3 --- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 2893776..61161b9 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -1059,9 +1059,6 @@ void linux_to_wlan(wilc_wlan_inp_t *nwi, linux_wlan_t *nic) 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; - - nwi->os_context.txq_add_to_head_critical_section = (void *)&g_linux_wlan->txq_add_to_head_cs; - #if defined(MEMORY_STATIC) nwi->os_context.rx_buffer_size = LINUX_RX_SIZE; #endif diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 5bca997..f042b78 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -68,7 +68,6 @@ typedef struct { **/ void *txq_lock; - struct semaphore *txq_add_to_head_lock; unsigned long txq_spinlock_flags; struct txq_entry_t *txq_head; @@ -228,7 +227,8 @@ static int wilc_wlan_txq_add_to_head(struct txq_entry_t *tqe) { wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan; unsigned long flags; - if (p->os_func.os_wait(p->txq_add_to_head_lock, CFG_PKTS_TIMEOUT)) + if (p->os_func.os_wait(&g_linux_wlan->txq_add_to_head_cs, + CFG_PKTS_TIMEOUT)) return -1; spin_lock_irqsave(&g_linux_wlan->txq_spinlock, flags); @@ -248,7 +248,7 @@ static int wilc_wlan_txq_add_to_head(struct txq_entry_t *tqe) PRINT_D(TX_DBG, "Number of entries in TxQ = %d\n", p->txq_entries); spin_unlock_irqrestore(&g_linux_wlan->txq_spinlock, flags); - up(p->txq_add_to_head_lock); + up(&g_linux_wlan->txq_add_to_head_cs); /** @@ -843,7 +843,8 @@ static int wilc_wlan_handle_txq(u32 *pu32TxqCount) if (p->quit) break; - p->os_func.os_wait(p->txq_add_to_head_lock, CFG_PKTS_TIMEOUT); + p->os_func.os_wait(&g_linux_wlan->txq_add_to_head_cs, + CFG_PKTS_TIMEOUT); #ifdef TCP_ACK_FILTER wilc_wlan_txq_filter_dup_tcp_ack(); #endif @@ -1112,7 +1113,7 @@ _end_: if (ret != 1) break; } while (0); - up(p->txq_add_to_head_lock); + up(&g_linux_wlan->txq_add_to_head_cs); p->txq_exit = 1; PRINT_D(TX_DBG, "THREAD: Exiting txq\n"); @@ -1971,8 +1972,6 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup) g_wlan.hif_lock = inp->os_context.hif_critical_section; g_wlan.txq_lock = inp->os_context.txq_critical_section; - g_wlan.txq_add_to_head_lock = inp->os_context.txq_add_to_head_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; diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index f761347..6f19277 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -112,9 +112,6 @@ typedef struct { u32 tx_buffer_size; void *txq_critical_section; - - void *txq_add_to_head_critical_section; - #if defined(MEMORY_STATIC) u32 rx_buffer_size; #endif