Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1606168 > unrolled thread
| Started by | Arushi Singhal <arushisinghal19971997@gmail.com> |
|---|---|
| First post | 2017-03-22 03:50 +0100 |
| Last post | 2017-03-22 03:50 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH] staging: sm750fb: Replace a bit shift by a use of BIT. Arushi Singhal <arushisinghal19971997@gmail.com> - 2017-03-22 03:50 +0100
| From | Arushi Singhal <arushisinghal19971997@gmail.com> |
|---|---|
| Date | 2017-03-22 03:50 +0100 |
| Subject | [PATCH] staging: sm750fb: Replace a bit shift by a use of BIT. |
| Message-ID | <tnEvv-3Xg-9@gated-at.bofh.it> |
This patch replaces bit shifting on 1 with the BIT(x) macro. This was done with coccinelle: @@ constant c; @@ -1 << c +BIT(c) Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> --- drivers/staging/sm750fb/ddk750_chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c index 5e4bfb601cea..112ee4182a0a 100644 --- a/drivers/staging/sm750fb/ddk750_chip.c +++ b/drivers/staging/sm750fb/ddk750_chip.c @@ -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)); } /* -- 2.11.0
Back to top | Article view | linux.kernel
csiph-web