[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180220063538.6471-3-quytelda@tamalin.org>
Date: Mon, 19 Feb 2018 22:35:38 -0800
From: Quytelda Kahja <quytelda@...alin.org>
To: gregkh@...uxfoundation.org, wsa@...-dreams.de
Cc: driverdev-devel@...uxdriverproject.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org, Quytelda Kahja <quytelda@...alin.org>
Subject: [PATCH v2 3/3] Staging: ks7010: hostif: Convert the ps_confirm_wait_inc() macro to a real function.
Convert the unsafe macro into an inline function.
Signed-off-by: Quytelda Kahja <quytelda@...alin.org>
---
drivers/staging/ks7010/ks_hostif.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index f554477fe6bc..74a08417bd0b 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1308,11 +1308,11 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb)
return ret;
}
-#define ps_confirm_wait_inc(priv) \
- do { \
- if (atomic_read(&priv->psstatus.status) > PS_ACTIVE_SET) \
- atomic_inc(&priv->psstatus.confirm_wait); \
- } while (0)
+static inline void ps_confirm_wait_inc(struct ks_wlan_private *priv)
+{
+ if (atomic_read(&priv->psstatus.status) > PS_ACTIVE_SET)
+ atomic_inc(&priv->psstatus.confirm_wait);
+}
static
void hostif_mib_get_request(struct ks_wlan_private *priv,
--
2.16.2
Powered by blists - more mailing lists