Skip to contentSkip to conversation

staging: sm750fb: Replace a bit shift by a use of BIT.

PATCH New Arushi Singhal 1 participant 1 message Mar 22, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: sm750fb: Replace a bit shift by a use of BIT.

This patch replaces bit shifting on 1 with the BIT(x) macro. This was done with coccinelle:
@@
constant c;
@@

-1 << c
+BIT(c)

---
 drivers/staging/sm750fb/ddk750_chip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/ddk750_chip.c +1 -1
index 5e4bfb601cea..112ee4182a0a 100644
@@ -44,7 +44,7 @@ static unsigned int get_mxclk_freq(void)
 	OD = (pll_reg & PLL_CTRL_OD_MASK) >> PLL_CTRL_OD_SHIFT;
 	POD = (pll_reg & PLL_CTRL_POD_MASK) >> PLL_CTRL_POD_SHIFT;
 
-	return DEFAULT_INPUT_CLOCK * M / N / (1 << OD) / (1 << POD);
+	return DEFAULT_INPUT_CLOCK * M / N / (BIT(OD)) / (BIT(POD));
 }
 
 /*
Signature · 1 line
2.11.0