diff options
author | Quytelda Kahja <quytelda@tamalin.org> | 2018-02-19 22:35:38 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-02-22 14:55:08 +0100 |
commit | b6520468c4078ca25c0cda43e3e543112d87c98a (patch) | |
tree | 21f5ebe7db852a4309812a8c8e8dce67d3b15e15 /drivers | |
parent | e4281f385b28d716493f6666db13e61849d6f798 (diff) | |
download | lwn-b6520468c4078ca25c0cda43e3e543112d87c98a.tar.gz lwn-b6520468c4078ca25c0cda43e3e543112d87c98a.zip |
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@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/ks7010/ks_hostif.c | 10 |
1 files 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 @@ 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, |