Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Medium] module: drm_mipi_dsi cannot be unloaded and leaks bus registration - [Low] kbuild: Linker error due to IS_ENABLED(CONFIG_DRM_MIPI_DSI) when built as module --
commit 33f0d16c5b1d57480468538aae543a48ddad02aa Author: Luca Ceresoli <[email protected]> drm/mipi-dsi: turn DRM_MIPI_DSI into a tristate DRM_MIPI_DSI is currently a bool, but there's no reason to not be allowed to build it as a loadable module. > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig > index 65d46dfa72661..9bdd9110e754b 100644 > --- a/drivers/gpu/drm/Kconfig > +++ b/drivers/gpu/drm/Kconfig > @@ -39,7 +39,7 @@ config DRM_MIPI_DBI > select DRM_KMS_HELPER > > config DRM_MIPI_DSI > - bool > + tristate [Severity: Low] Will this cause a linker error when CONFIG_DRM=y and CONFIG_DRM_MIPI_DSI=m? Since IS_ENABLED(CONFIG_DRM_MIPI_DSI) is true for both 'y' and 'm', built-in code will attempt to call exported symbols from the now-loadable drm_mipi_dsi module, leading to undefined references during the build. For example, in drivers/gpu/drm/drm_of.c: drm_of_get_dsi_bus() { ... #if IS_ENABLED(CONFIG_DRM_MIPI_DSI) ... dsi_host = of_find_mipi_dsi_host_by_node(dsi_host_node); ... } [Severity: Medium] Does the drm_mipi_dsi module need a module_exit() cleanup function now that it can be built as a loadable module? Currently, mipi_dsi_bus_init() in drivers/gpu/drm/drm_mipi_dsi.c registers the bus during initialization, but there is no corresponding module_exit() to unregister it: static int __init mipi_dsi_bus_init(void) { return bus_register(&mipi_dsi_bus_type); } postcore_initcall(mipi_dsi_bus_init); If the module is forcefully unloaded, it will leave a dangling mipi_dsi_bus_type registration in the driver core. [Severity: Low] This is a pre-existing issue, but does changing this to a tristate still leave an unmet dependency warning when selected by boolean configs? For example, config DRM_MSM_DSI in drivers/gpu/drm/msm/Kconfig is a bool that selects DRM_MIPI_DSI: config DRM_MSM_DSI bool "Enable DSI support in MSM DRM driver" depends on DRM_MSM depends on DRM_MSM_KMS select DRM_PANEL select DRM_MIPI_DSI If CONFIG_DRM=m and CONFIG_DRM_MSM_DSI=y, this forces CONFIG_DRM_MIPI_DSI to 'y', violating its 'depends on DRM' restriction. > depends on DRM > > config DRM_KMS_HELPER -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=13
