clk: clocking-wizard: Remove redundant initialization of pointer div_addr
authorColin Ian King <colin.i.king@gmail.com>
Fri, 23 Feb 2024 13:43:47 +0000 (13:43 +0000)
committerStephen Boyd <sboyd@kernel.org>
Wed, 28 Feb 2024 22:51:51 +0000 (14:51 -0800)
The pointer div_addr is being assigned a value that is never used, it is
being re-assigned a different value near the end of the function where
it is being read in the next statement. The initialization is redundant
and can be removed.

Cleans up clang scan build warning:
drivers/clk/xilinx/clk-xlnx-clock-wizard.c:501:16: warning: Value stored
to 'div_addr' during its initialization is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20240223134347.3908301-1-colin.i.king@gmail.com
Reviewed-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/xilinx/clk-xlnx-clock-wizard.c

index 6a6e5d9292e87a544e064d1746a73df06d437d39..19eb3fb7ae319efbcd3cc782938adbafb31237e4 100644 (file)
@@ -498,7 +498,7 @@ static int clk_wzrd_dynamic_all_nolock(struct clk_hw *hw, unsigned long rate,
 {
        struct clk_wzrd_divider *divider = to_clk_wzrd_divider(hw);
        unsigned long vco_freq, rate_div, clockout0_div;
-       void __iomem *div_addr = divider->base;
+       void __iomem *div_addr;
        u32 reg, pre, f;
        int err;