diff options
author | Sanjana Sanikommu <sanjana99reddy99@gmail.com> | 2019-03-25 13:14:01 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-26 05:49:12 +0900 |
commit | c8723cb8d06bb1064508055881c1bd0c90a15a18 (patch) | |
tree | a67e2170d84de4e531845b2f363f81e3fb7507d3 | |
parent | dc1e3766ec72f6d5b5a610eb772ea1868d367163 (diff) | |
download | linux-stable-c8723cb8d06bb1064508055881c1bd0c90a15a18.tar.gz linux-stable-c8723cb8d06bb1064508055881c1bd0c90a15a18.tar.bz2 linux-stable-c8723cb8d06bb1064508055881c1bd0c90a15a18.zip |
staging: sm750fb: Prefer using the BIT macro
Challenge suggested by coccinelle.
Replace bit shifting on 1 with the BIT(x) macro.
Coccinelle script:
@@
constant c;
@@
-(1 << c)
+BIT(c)
Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/sm750fb/ddk750_chip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c index 93abfa8b0090..cd2ca0de1ae9 100644 --- a/drivers/staging/sm750fb/ddk750_chip.c +++ b/drivers/staging/sm750fb/ddk750_chip.c @@ -45,7 +45,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); } /* |