From: sashiko-bot@kernel.org
To: "Daniel Baluta" <daniel.baluta@nxp.com>
Cc: Frank.Li@kernel.org, imx@lists.linux.dev
Subject: Re: [PATCH v4 1/3] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n
Date: Wed, 12 Aug 2026 15:50:00 +0000 [thread overview]
Message-ID: <20260812155001.6A2D51F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260812151934.709198-2-daniel.baluta@nxp.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The patch adds `depends on QCOM_SMEM` to `QCOM_UBWC_CONFIG` but misses that `VIDEO_QCOM_IRIS` unconditionally selects it, causing an unmet dependency warning and leaving the original linker error unfixed.
- [High] The conditional select in `DRM_MSM` creates a configuration where a built-in driver calls a function from a module, resulting in a linker error.
--
--- Patch [1]: [PATCH v4 1/3] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n ---
commit a54f8c4ddffc0b9c1fbde97cc8f98242588a42bf
Author: Daniel Baluta <daniel.baluta@nxp.com>
soc: qcom: ubwc: Fix link error when QCOM_SMEM=n
DRM_MSM unconditionally selects QCOM_UBWC_CONFIG, which calls SMEM APIs,
causing a link error on non-Qcom platforms (e.g. SOC_IMX5). Make
QCOM_UBWC_CONFIG depend on QCOM_SMEM to make the requirement explicit, and
guard the select in DRM_MSM with ARCH_QCOM && QCOM_SMEM.
> diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig
> index 09469d56513b0..1670dbc9464c6 100644
> --- a/drivers/gpu/drm/msm/Kconfig
> +++ b/drivers/gpu/drm/msm/Kconfig
> @@ -22,7 +22,7 @@ config DRM_MSM
> select TMPFS
> select QCOM_SCM
> select QCOM_PAS
> - select QCOM_UBWC_CONFIG
> + select QCOM_UBWC_CONFIG if ARCH_QCOM && QCOM_SMEM
[Severity: High]
Can this conditional select create a new configuration where a built-in driver
fails to link against a module?
If we compile with CONFIG_DRM_MSM=y, CONFIG_ARCH_QCOM=y, and
CONFIG_QCOM_SMEM=m, the select evaluates to 'm', forcing
CONFIG_QCOM_UBWC_CONFIG=m.
Because IS_ENABLED(CONFIG_QCOM_UBWC_CONFIG) evaluates to true for both 'y'
and 'm', built-in code like msm_mdss_init() in drivers/gpu/drm/msm/msm_mdss.c
will attempt to call the external qcom_ubwc_config_get_data() function:
include/linux/soc/qcom/ubwc.h:
#if IS_ENABLED(CONFIG_QCOM_UBWC_CONFIG)
const struct qcom_ubwc_cfg_data *qcom_ubwc_config_get_data(void);
...
At link time, vmlinux will fail to resolve this function because it resides
in the ubwc_config module.
> select WANT_DEV_COREDUMP
> select SND_SOC_HDMI_CODEC if SND_SOC
> select SYNC_FILE
[ ... ]
> diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
> index fd4d4ecd2df0f..e0629e9328c87 100644
> --- a/drivers/soc/qcom/Kconfig
> +++ b/drivers/soc/qcom/Kconfig
> @@ -321,6 +321,7 @@ config QCOM_QMI_HELPERS
>
> config QCOM_UBWC_CONFIG
> tristate
> + depends on QCOM_SMEM
[Severity: High]
Does this leave the linker error unfixed when CONFIG_VIDEO_QCOM_IRIS=y?
Looking at drivers/media/platform/qcom/iris/Kconfig, it unconditionally
selects QCOM_UBWC_CONFIG:
config VIDEO_QCOM_IRIS
...
select QCOM_UBWC_CONFIG
If we compile with CONFIG_COMPILE_TEST=y, CONFIG_VIDEO_QCOM_IRIS=y, and
CONFIG_QCOM_SMEM=n, the unconditional select will force QCOM_UBWC_CONFIG to y
despite the new dependency.
This produces an unmet dependency warning and attempts to link ubwc_config.c,
which fails with the exact undefined reference to 'qcom_smem_*' APIs that
this patch intended to fix.
> help
> Most Qualcomm SoCs feature a number of Universal Bandwidth Compression
> (UBWC) engines across various IP blocks, which need to be initialized
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260812151934.709198-1-daniel.baluta@nxp.com?part=1
next prev parent reply other threads:[~2026-08-12 15:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 15:19 [PATCH v4 0/3] soc: qcom: ubwc: Fix link error Daniel Baluta
2026-08-12 15:19 ` [PATCH v4 1/3] soc: qcom: ubwc: Fix link error when QCOM_SMEM=n Daniel Baluta
2026-08-12 15:50 ` sashiko-bot [this message]
2026-08-12 15:19 ` [PATCH v4 2/3] media: iris: Fix unmet dependency " Daniel Baluta
2026-08-12 15:19 ` [PATCH v4 3/3] soc: qcom: ubwc: Use IS_REACHABLE() instead of IS_ENABLED() Daniel Baluta
2026-08-12 15:32 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260812155001.6A2D51F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=daniel.baluta@nxp.com \
--cc=imx@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.