From patchwork Mon Nov 28 10:20:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= X-Patchwork-Id: 9449285 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.web.codeaurora.org (Postfix) with ESMTP id 6EB3C6071E for ; Mon, 28 Nov 2016 10:22:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B4662623C for ; Mon, 28 Nov 2016 10:22:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 501E22675C; Mon, 28 Nov 2016 10:22:00 +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.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, 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 C648326419 for ; Mon, 28 Nov 2016 10:21:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932334AbcK1KVh (ORCPT ); Mon, 28 Nov 2016 05:21:37 -0500 Received: from mail.toke.dk ([52.28.52.200]:35431 "EHLO mail.toke.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754360AbcK1KUh (ORCPT ); Mon, 28 Nov 2016 05:20:37 -0500 Received: from mail.toke.dk (localhost.localdomain [127.0.0.1]) by mail.toke.dk (Postfix) with ESMTPS id 78E79CD18; Mon, 28 Nov 2016 11:20:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=20161023; t=1480328435; bh=uN+5TSxLTeq0SvIMkUimYHOFVZvOPOJOqIvcraVBTaw=; h=From:To:Cc:Subject:Date:From; b=imPfFSgNQQj7m7lW5Qhmh59x3fVGLmJLNH7rhk5ULP8+VHloQJ78XWYqSdptXW44k /0CIBsDsXy0Jx4/vDUcHFY2mENfNeIj+4BXTgNyaWy78PmZA8kqj3XzzdUQdZcmiWx WwqInvr4A98X+Su4/Hzy0l8UtzF75gH7BOt9qiVZzu11/ye/vRLFeFczVMMh8+zZCY 8rnZjTIhC9mHE6XRiP1f4bYhvvxcxSBJRGndwNY8VypH3b+Rf8E/hVRBfMTUwLhmVm M2QnMlyDb/3yy1EdjTTcLE5ir6h5yl3Xx694N2owMxn3njhYBwLUip1J+YtU2+FQ0v rue75Ra+rHCPg== Received: by alrua-kau.kau.toke.dk (Postfix, from userid 1000) id C1DB4C402A9; Mon, 28 Nov 2016 11:20:34 +0100 (CET) From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= To: linux-wireless@vger.kernel.org Cc: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= Subject: [PATCH] ath9k: Turn ath_txq_lock/unlock() into static inlines. Date: Mon, 28 Nov 2016 11:20:24 +0100 Message-Id: <20161128102024.14925-1-toke@toke.dk> MIME-Version: 1.0 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 These are one-line functions that just call spin_lock/unlock_bh(); turn them into static inlines to avoid the function call overhead. Signed-off-by: Toke Høiland-Jørgensen --- drivers/net/wireless/ath/ath9k/ath9k.h | 11 +++++++++-- drivers/net/wireless/ath/ath9k/xmit.c | 12 ------------ 2 files changed, 9 insertions(+), 14 deletions(-) base-commit: 705d7aa062203226c8df73f18622664e30bd8a61 diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 378d345..dca4aaa3 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h @@ -555,6 +555,15 @@ static inline void ath_chanctx_check_active(struct ath_softc *sc, #endif /* CONFIG_ATH9K_CHANNEL_CONTEXT */ +static inline void ath_txq_lock(struct ath_softc *sc, struct ath_txq *txq) +{ + spin_lock_bh(&txq->axq_lock); +} +static inline void ath_txq_unlock(struct ath_softc *sc, struct ath_txq *txq) +{ + spin_unlock_bh(&txq->axq_lock); +} + void ath_startrecv(struct ath_softc *sc); bool ath_stoprecv(struct ath_softc *sc); u32 ath_calcrxfilter(struct ath_softc *sc); @@ -562,8 +571,6 @@ int ath_rx_init(struct ath_softc *sc, int nbufs); void ath_rx_cleanup(struct ath_softc *sc); int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp); struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype); -void ath_txq_lock(struct ath_softc *sc, struct ath_txq *txq); -void ath_txq_unlock(struct ath_softc *sc, struct ath_txq *txq); void ath_txq_unlock_complete(struct ath_softc *sc, struct ath_txq *txq); void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq); bool ath_drain_all_txq(struct ath_softc *sc); diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 486afa9..e5c0829 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@ -97,18 +97,6 @@ static void ath_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) dev_kfree_skb(skb); } -void ath_txq_lock(struct ath_softc *sc, struct ath_txq *txq) - __acquires(&txq->axq_lock) -{ - spin_lock_bh(&txq->axq_lock); -} - -void ath_txq_unlock(struct ath_softc *sc, struct ath_txq *txq) - __releases(&txq->axq_lock) -{ - spin_unlock_bh(&txq->axq_lock); -} - void ath_txq_unlock_complete(struct ath_softc *sc, struct ath_txq *txq) __releases(&txq->axq_lock) {