staging: sm750fb: ddk750_chip.c: Replace bit shifting with BIT macro
Subsystems (2)
PATCH 1/1 staging: sm750fb: ddk750_chip.c: Replace bit shifting with BIT macro
Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.
Signed-off-by Payal Kshirsagar <[email protected]>
--- drivers/staging/sm750fb/ddk750_chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/ddk750_chip.c +1 -1
@@ -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 ); }/*
Signature · 1 line
2.7.4
Greg KH
maintainerQuoted 13 lines · Payal Kshirsagar
Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.Signed-off-by Payal Kshirsagar <[email protected]>--- drivers/staging/sm750fb/ddk750_chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/sm750fb/ddk750_chip.c +0
-0
drivers/staging/sm750fb/ddk750_chip.c static unsigned int get_mxclk_freq(void) · line 51
Quoted 8 lines
drivers/staging/sm750fb/ddk750_chip.c +1
-1@@ -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 ); }/*
This patch does not apply to my tree :(