Staging: ks7010: hostif: Convert the ps_confirm_wait_inc() macro to a real function.
authorQuytelda Kahja <quytelda@tamalin.org>
Tue, 20 Feb 2018 06:35:38 +0000 (22:35 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Feb 2018 13:55:08 +0000 (14:55 +0100)
Convert the unsafe macro into an inline function.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_hostif.c

index f554477fe6bcbf9a5444940ccae3fd6536d434ec..74a08417bd0b91cd29d79c26feee3468e5ae8299 100644 (file)
@@ -1308,11 +1308,11 @@ err_kfree_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,