staging: vt6656: Prefer using BIT Macro
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Fri, 16 Oct 2015 16:42:35 +0000 (22:12 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Oct 2015 06:05:17 +0000 (23:05 -0700)
Replace bit shifting on 1 with the BIT(x) Macro

The semantic patch used to find this is:
@@ int g; @@

-(1 << g)
+BIT(g)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/card.c

index 167dca9d243a1c94422fe6ef8d6fd1e1dae0e5a9..70685e5a79a909d42937b7980c6efdcd4b37d31e 100644 (file)
@@ -473,7 +473,7 @@ int vnt_ofdm_min_rate(struct vnt_private *priv)
        int ii;
 
        for (ii = RATE_54M; ii >= RATE_6M; ii--) {
-               if ((priv->basic_rates) & ((u16)(1 << ii)))
+               if ((priv->basic_rates) & ((u16)BIT(ii)))
                        return true;
        }