[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <162466241428.3259633.9651068291046255073@swboyd.mtv.corp.google.com>
Date: Fri, 25 Jun 2021 16:06:54 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: git@...inx.com, linux-kernel@...r.kernel.org,
michal.simek@...inx.com, monstr@...str.eu,
quanyang.wang@...driver.com
Cc: Arnd Bergmann <arnd@...db.de>,
Michael Turquette <mturquette@...libre.com>,
Punit Agrawal <punit1.agrawal@...hiba.co.jp>,
linux-arm-kernel@...ts.infradead.org, linux-clk@...r.kernel.org
Subject: Re: [PATCH v3] clk: zynqmp: fix compile testing without ZYNQMP_FIRMWARE
Quoting Michal Simek (2021-06-22 03:15:11)
> When the firmware code is disabled, the incomplete error handling
> in the clk driver causes compile-time warnings:
>
> drivers/clk/zynqmp/pll.c: In function 'zynqmp_pll_recalc_rate':
> drivers/clk/zynqmp/pll.c:147:29: error: 'fbdiv' is used uninitialized [-Werror=uninitialized]
> 147 | rate = parent_rate * fbdiv;
> | ~~~~~~~~~~~~^~~~~~~
> In function 'zynqmp_pll_get_mode',
> inlined from 'zynqmp_pll_recalc_rate' at drivers/clk/zynqmp/pll.c:148:6:
> drivers/clk/zynqmp/pll.c:61:27: error: 'ret_payload' is used uninitialized [-Werror=uninitialized]
> 61 | return ret_payload[1];
> | ~~~~~~~~~~~^~~
> drivers/clk/zynqmp/pll.c: In function 'zynqmp_pll_recalc_rate':
> drivers/clk/zynqmp/pll.c:53:13: note: 'ret_payload' declared here
> 53 | u32 ret_payload[PAYLOAD_ARG_CNT];
> | ^~~~~~~~~~~
> drivers/clk/zynqmp/clk-mux-zynqmp.c: In function 'zynqmp_clk_mux_get_parent':
> drivers/clk/zynqmp/clk-mux-zynqmp.c:57:16: error: 'val' is used uninitialized [-Werror=uninitialized]
> 57 | return val;
> | ^~~
>
> As it was apparently intentional to support this for compile testing
> purposes, change the code to have just enough error handling for the
> compiler to not notice the remaining bugs.
>
> Fixes: 21f237534661 ("clk: zynqmp: Drop dependency on ARCH_ZYNQMP")
> Co-developed-by: Arnd Bergmann <arnd@...db.de>
> Signed-off-by: Michal Simek <michal.simek@...inx.com>
> ---
Applied to clk-next. I see this fixes a bug in this upcoming release but
I'm sure we can pick this back to stable tree in a week or so once the
merge window opens. It's not like this is fixing anything besides
compile testing anyway.
Powered by blists - more mailing lists