]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
clk: n5x: Fix misplaced paren
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Wed, 23 Jul 2025 11:32:31 +0000 (12:32 +0100)
committerTien Fong Chee <tien.fong.chee@intel.com>
Wed, 30 Jul 2025 09:45:29 +0000 (17:45 +0800)
Smatch reported an issue about the precedence of shift being higher than
mask in clk_get_emac_clk_hz. This turned out to be a misplaced paren in
one of the calculations. Fix this by placing the paren in the same place
as in the other similar calculations in the same function.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
drivers/clk/altera/clk-n5x.c

index 09db250ab6dbc2082440bfdd3acffc7ed2e5fe6c..9e4e7a1d90879bf89cb07212b9d3c894bb203fc7 100644 (file)
@@ -386,8 +386,8 @@ static u32 clk_get_emac_clk_hz(struct socfpga_clk_plat *plat, u32 emac_id)
                } else {
                        clock /= 1 + ((CM_REG_READL(plat,
                                       CLKMGR_PERPLL_PLLOUTDIV) &
-                                      CLKMGR_PLLOUTDIV_C3CNT_MASK >>
-                                      CLKMGR_PLLOUTDIV_C3CNT_OFFSET));
+                                      CLKMGR_PLLOUTDIV_C3CNT_MASK) >>
+                                      CLKMGR_PLLOUTDIV_C3CNT_OFFSET);
                }
                break;