* [PATCH v1] clk, reset: microchip: mpfs: fix incorrect preprocessor conditions
@ 2024-05-08 21:33 Conor Dooley
2024-05-09 1:39 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Conor Dooley @ 2024-05-08 21:33 UTC (permalink / raw)
To: linux-clk
Cc: conor, Conor Dooley, kernel test robot, Daire McNamara,
Stephen Boyd, linux-kernel
From: Conor Dooley <conor.dooley@microchip.com>
While moving all the reset code in the PolarFire SoC clock driver to the
reset subsystem, I removed an `#if IS_ENABLED(RESET_CONTROLLER)` from
the driver and moved it to the header, however this was not the correct
thing to do. In the driver such a condition over-eagerly provided a
complete implementation for mpfs_reset_{read,write}() when the reset
subsystem was enabled without the PolarFire SoC reset driver, but in the
header it meant that when the subsystem was enabled and the driver was
not, no implementation for mpfs_reset_controller_register() was
provided. Fix the condition so that the stub implementation of
mpfs_reset_controller_register() is used when the reset driver is
disabled.
Fixes: 098c290a490d ("clock, reset: microchip: move all mpfs reset code to the reset subsystem")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202405082259.44DzHvaN-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202405082200.tBrEs5CZ-lkp@intel.com/
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
CC: Conor Dooley <conor.dooley@microchip.com>
CC: Daire McNamara <daire.mcnamara@microchip.com>
CC: Stephen Boyd <sboyd@kernel.org>
CC: linux-clk@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---
include/soc/microchip/mpfs.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/soc/microchip/mpfs.h b/include/soc/microchip/mpfs.h
index d7e612b5e22e..0bd67e10b704 100644
--- a/include/soc/microchip/mpfs.h
+++ b/include/soc/microchip/mpfs.h
@@ -43,11 +43,11 @@ struct mtd_info *mpfs_sys_controller_get_flash(struct mpfs_sys_controller *mpfs_
#endif /* if IS_ENABLED(CONFIG_POLARFIRE_SOC_SYS_CTRL) */
#if IS_ENABLED(CONFIG_MCHP_CLK_MPFS)
-#if IS_ENABLED(CONFIG_RESET_CONTROLLER)
+#if IS_ENABLED(CONFIG_RESET_POLARFIRE_SOC)
int mpfs_reset_controller_register(struct device *clk_dev, void __iomem *base);
#else
static inline int mpfs_reset_controller_register(struct device *clk_dev, void __iomem *base) { return 0; }
-#endif /* if IS_ENABLED(CONFIG_RESET_CONTROLLER) */
+#endif /* if IS_ENABLED(CONFIG_RESET_POLARFIRE_SOC) */
#endif /* if IS_ENABLED(CONFIG_MCHP_CLK_MPFS) */
#endif /* __SOC_MPFS_H__ */
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] clk, reset: microchip: mpfs: fix incorrect preprocessor conditions
2024-05-08 21:33 [PATCH v1] clk, reset: microchip: mpfs: fix incorrect preprocessor conditions Conor Dooley
@ 2024-05-09 1:39 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2024-05-09 1:39 UTC (permalink / raw)
To: Conor Dooley, linux-clk
Cc: conor, Conor Dooley, kernel test robot, Daire McNamara,
linux-kernel
Quoting Conor Dooley (2024-05-08 14:33:24)
> From: Conor Dooley <conor.dooley@microchip.com>
>
> While moving all the reset code in the PolarFire SoC clock driver to the
> reset subsystem, I removed an `#if IS_ENABLED(RESET_CONTROLLER)` from
> the driver and moved it to the header, however this was not the correct
> thing to do. In the driver such a condition over-eagerly provided a
> complete implementation for mpfs_reset_{read,write}() when the reset
> subsystem was enabled without the PolarFire SoC reset driver, but in the
> header it meant that when the subsystem was enabled and the driver was
> not, no implementation for mpfs_reset_controller_register() was
> provided. Fix the condition so that the stub implementation of
> mpfs_reset_controller_register() is used when the reset driver is
> disabled.
>
> Fixes: 098c290a490d ("clock, reset: microchip: move all mpfs reset code to the reset subsystem")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202405082259.44DzHvaN-lkp@intel.com/
> Closes: https://lore.kernel.org/oe-kbuild-all/202405082200.tBrEs5CZ-lkp@intel.com/
> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-09 1:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-08 21:33 [PATCH v1] clk, reset: microchip: mpfs: fix incorrect preprocessor conditions Conor Dooley
2024-05-09 1:39 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox