[PATCH v4 3/3] soc: qcom: ubwc: Use IS_REACHABLE() instead of IS_ENABLED()
From: Daniel Baluta
Date: Wed Aug 12 2026 - 11:17:35 EST
When DRM_MSM=y and QCOM_SMEM=m, the conditional select evaluates to 'm'
so QCOM_UBWC_CONFIG=m. IS_ENABLED() is true for both =y and =m, so the
real qcom_ubwc_config_get_data() declaration is exposed to built-in
callers, which cannot resolve it at vmlinux link time.
IS_REACHABLE() is false when the caller is built-in and the dependency is
only a module, causing the inline stub to be used instead.
Fixes: 1b445022d1d0 ("soc: qcom: ubwc: Get HBB from SMEM")
Signed-off-by: Daniel Baluta <daniel.baluta@xxxxxxx>
---
include/linux/soc/qcom/ubwc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/soc/qcom/ubwc.h b/include/linux/soc/qcom/ubwc.h
index a7372d9c25fbc..1a61238f6d4d5 100644
--- a/include/linux/soc/qcom/ubwc.h
+++ b/include/linux/soc/qcom/ubwc.h
@@ -36,7 +36,7 @@ struct qcom_ubwc_cfg_data {
#define UBWC_5_0 0x50000000
#define UBWC_6_0 0x60000000
-#if IS_ENABLED(CONFIG_QCOM_UBWC_CONFIG)
+#if IS_REACHABLE(CONFIG_QCOM_UBWC_CONFIG)
const struct qcom_ubwc_cfg_data *qcom_ubwc_config_get_data(void);
#else
static inline const struct qcom_ubwc_cfg_data *qcom_ubwc_config_get_data(void)
--
2.45.2