linux_dsm_epyc7002/drivers/clk/sunxi
Nathan Chancellor afdc74ed2d
clk: sunxi: Fix operator precedence in sunxi_divs_clk_setup
r375326 in Clang exposes an issue with operator precedence in
sunxi_div_clk_setup:

drivers/clk/sunxi/clk-sunxi.c:1083:30: warning: operator '?:' has lower
precedence than '|'; '|' will be evaluated first
[-Wbitwise-conditional-parentheses]
                                                 data->div[i].critical ?
                                                 ~~~~~~~~~~~~~~~~~~~~~ ^
drivers/clk/sunxi/clk-sunxi.c:1083:30: note: place parentheses around
the '|' expression to silence this warning
                                                 data->div[i].critical ?
                                                                       ^
                                                                      )
drivers/clk/sunxi/clk-sunxi.c:1083:30: note: place parentheses around
the '?:' expression to evaluate it first
                                                 data->div[i].critical ?
                                                                       ^
                                                 (
1 warning generated.

It appears that the intention was for ?: to be evaluated first so that
CLK_IS_CRITICAL could be added to clkflags if the critical boolean was
set; right now, | is being evaluated first. Add parentheses around the
?: block to have it be evaluated first.

Fixes: 9919d44ff2 ("clk: sunxi: Use CLK_IS_CRITICAL flag for critical clks")
Link: https://github.com/ClangBuiltLinux/linux/issues/745
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2019-10-29 08:42:31 +01:00
..
clk-a10-codec.c
clk-a10-hosc.c
clk-a10-mod1.c
clk-a10-pll2.c
clk-a10-ve.c
clk-a20-gmac.c
clk-factors.c
clk-factors.h
clk-mod0.c
clk-simple-gates.c
clk-sun4i-display.c
clk-sun4i-pll3.c
clk-sun4i-tcon-ch1.c
clk-sun6i-apb0-gates.c
clk-sun6i-apb0.c
clk-sun6i-ar100.c
clk-sun8i-apb0.c
clk-sun8i-bus-gates.c
clk-sun8i-mbus.c
clk-sun9i-core.c
clk-sun9i-cpus.c
clk-sun9i-mmc.c
clk-sunxi.c
clk-usb.c
Kconfig
Makefile