* [PATCH v2 1/1] clk/sophgo: Using BUG() instead of unreachable() in mmux_get_parent_id() [not found] <cover.1720506143.git.liqiang01@kylinos.cn> @ 2024-07-09 6:36 ` Li Qiang 2024-07-09 7:28 ` Chen Wang 2024-07-10 21:16 ` Stephen Boyd 0 siblings, 2 replies; 3+ messages in thread From: Li Qiang @ 2024-07-09 6:36 UTC (permalink / raw) To: unicorn_wang, mturquette, sboyd, inochiama; +Cc: linux-clk, Li Qiang 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: 80fd61ec46124 ("clk: sophgo: Add clock support for CV1800 SoC") Signed-off-by: Li Qiang <liqiang01@kylinos.cn> --- drivers/clk/sophgo/clk-cv18xx-ip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/sophgo/clk-cv18xx-ip.c b/drivers/clk/sophgo/clk-cv18xx-ip.c index 805f561725ae..b186e64d4813 100644 --- a/drivers/clk/sophgo/clk-cv18xx-ip.c +++ b/drivers/clk/sophgo/clk-cv18xx-ip.c @@ -613,7 +613,7 @@ static u8 mmux_get_parent_id(struct cv1800_clk_mmux *mmux) return i; } - unreachable(); + BUG(); } static int mmux_enable(struct clk_hw *hw) -- 2.25.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/1] clk/sophgo: Using BUG() instead of unreachable() in mmux_get_parent_id() 2024-07-09 6:36 ` [PATCH v2 1/1] clk/sophgo: Using BUG() instead of unreachable() in mmux_get_parent_id() Li Qiang @ 2024-07-09 7:28 ` Chen Wang 2024-07-10 21:16 ` Stephen Boyd 1 sibling, 0 replies; 3+ messages in thread From: Chen Wang @ 2024-07-09 7:28 UTC (permalink / raw) To: Li Qiang, mturquette, sboyd, inochiama; +Cc: linux-clk On 2024/7/9 14:36, Li Qiang wrote: > 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() I tried to build this drivers/clk/sophgo/clk-cv18xx-ip.c but don't see the warning. I'm using make W=1 with gcc 13.2.0 What's the meaning of this warning message and how to reproduce this? > > Fixes: 80fd61ec46124 ("clk: sophgo: Add clock support for CV1800 SoC") > Signed-off-by: Li Qiang <liqiang01@kylinos.cn> > --- > drivers/clk/sophgo/clk-cv18xx-ip.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/clk/sophgo/clk-cv18xx-ip.c b/drivers/clk/sophgo/clk-cv18xx-ip.c > index 805f561725ae..b186e64d4813 100644 > --- a/drivers/clk/sophgo/clk-cv18xx-ip.c > +++ b/drivers/clk/sophgo/clk-cv18xx-ip.c > @@ -613,7 +613,7 @@ static u8 mmux_get_parent_id(struct cv1800_clk_mmux *mmux) > return i; > } > > - unreachable(); > + BUG(); > } > > static int mmux_enable(struct clk_hw *hw) ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/1] clk/sophgo: Using BUG() instead of unreachable() in mmux_get_parent_id() 2024-07-09 6:36 ` [PATCH v2 1/1] clk/sophgo: Using BUG() instead of unreachable() in mmux_get_parent_id() Li Qiang 2024-07-09 7:28 ` Chen Wang @ 2024-07-10 21:16 ` Stephen Boyd 1 sibling, 0 replies; 3+ messages in thread From: Stephen Boyd @ 2024-07-10 21:16 UTC (permalink / raw) To: Li Qiang, inochiama, mturquette, unicorn_wang; +Cc: linux-clk, Li Qiang Quoting Li Qiang (2024-07-08 23:36:38) > 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: 80fd61ec46124 ("clk: sophgo: Add clock support for CV1800 SoC") > Signed-off-by: Li Qiang <liqiang01@kylinos.cn> > --- Applied to clk-next ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-10 21:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1720506143.git.liqiang01@kylinos.cn>
2024-07-09 6:36 ` [PATCH v2 1/1] clk/sophgo: Using BUG() instead of unreachable() in mmux_get_parent_id() Li Qiang
2024-07-09 7:28 ` Chen Wang
2024-07-10 21:16 ` Stephen Boyd
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.