[PATCH 2/2] drivers/clk/clk_zynqmp.c: get rid of compiler warning for !CONFIG_CMD_CLK builds

Peter Korsgaard peter at korsgaard.com
Mon Jan 19 12:36:03 CET 2026


>>>>> "Quentin" == Quentin Schulz <quentin.schulz at cherry.de> writes:

 > Hi Peter,
 > On 1/19/26 10:54 AM, Peter Korsgaard wrote:
 >> When built without CONFIG_CMD_CLK, we get a warning about the unused
 >> clk_names variable:
 >> ../drivers/clk/clk_zynqmp.c:153:27: warning: ‘clk_names’ defined but
 >> not used [-Wunused-const-variable=]
 >> 153 | static const char * const clk_names[clk_max] = {
 >> So also guard it with CONFIG_CMD_CLK to get rid of that.
 >> 

 > Considering it's only used within zynqmp_clk_dump() which is already
 > guarded, maybe we could put the static array and its user next to each
 > other?

That is also an option. I opted for just adding the guards to keep the
diff small.

I can send a v2 doing the move if that is preferred?

 > In any case,

 > Reviewed-by: Quentin Schulz <quentin.schulz at cherry.de>

 > Thanks!
 > Quentin


-- 
Bye, Peter Korsgaard


More information about the U-Boot mailing list