Re: [PATCH 1/3] clk: Move clk_{save,restore}_context() to COMMON_CLK section
From: Stephen Boyd
Date: Thu Jan 15 2026 - 21:51:55 EST
Quoting Geert Uytterhoeven (2025-12-01 02:42:26)
> The clk_save_context() and clk_restore_context() helpers are only
> implemented by the Common Clock Framework. They are not available when
> using legacy clock frameworks. Dummy implementations are provided, but
> only if no clock support is available at all.
>
> Hence when CONFIG_HAVE_CLK=y, but CONFIG_COMMON_CLK is not enabled:
>
> m68k-linux-gnu-ld: drivers/net/phy/air_en8811h.o: in function `en8811h_resume':
> air_en8811h.c:(.text+0x83e): undefined reference to `clk_restore_context'
> m68k-linux-gnu-ld: drivers/net/phy/air_en8811h.o: in function `en8811h_suspend':
> air_en8811h.c:(.text+0x856): undefined reference to `clk_save_context'
>
> Fix this by moving forward declarations and dummy implementions from the
> HAVE_CLK to the COMMON_CLK section.
>
> Fixes: 8b95d1ce3300c411 ("clk: Add functions to save/restore clock context en-masse")
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Closes: https://lore.kernel.org/oe-kbuild-all/202511301553.eaEz1nEW-lkp@xxxxxxxxx/
> Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> ---
Applied to clk-next