Skip to content

Commit 1f7a04a

Browse files
Li Qiangbebarino
authored andcommitted
clk/sophgo: Using BUG() instead of unreachable() in mmux_get_parent_id()
In general it's a good idea to avoid using bare unreachable() because it introduces undefined behavior in compiled code. but it caused a compilation warning, Using BUG() instead of unreachable() to resolve compilation warnings. Fixes the following warnings: drivers/clk/sophgo/clk-cv18xx-ip.o: warning: objtool: mmux_round_rate() falls through to next function bypass_div_round_rate() Fixes: 80fd61e ("clk: sophgo: Add clock support for CV1800 SoC") Signed-off-by: Li Qiang <[email protected]> Link: https://lore.kernel.org/r/c8e66d51f880127549e2a3e623be6787f62b310d.1720506143.git.liqiang01@kylinos.cn Signed-off-by: Stephen Boyd <[email protected]>
1 parent 54cb3bb commit 1f7a04a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clk/sophgo/clk-cv18xx-ip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ static u8 mmux_get_parent_id(struct cv1800_clk_mmux *mmux)
613613
return i;
614614
}
615615

616-
unreachable();
616+
BUG();
617617
}
618618

619619
static int mmux_enable(struct clk_hw *hw)

0 commit comments

Comments
 (0)