From: sashiko-bot@kernel.org
To: "Daniel Baluta" <daniel.baluta@nxp.com>
Cc: imx@lists.linux.dev, Frank.Li@kernel.org
Subject: Re: [PATCH v4 3/3] soc: qcom: ubwc: Use IS_REACHABLE() instead of IS_ENABLED()
Date: Wed, 12 Aug 2026 15:32:03 +0000 [thread overview]
Message-ID: <20260812153203.967531F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260812151934.709198-4-daniel.baluta@nxp.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
New issues:
- [High] Using IS_REACHABLE() masks a Kconfig dependency mismatch, causing guaranteed runtime probe failures for built-in drivers when the dependency is built as a module.
Pre-existing issues:
- [Medium] Missing resource cleanup in a5xx_gpu_init() when qcom_ubwc_config_get_data() fails.
--
--- Patch [3]: [PATCH v4 3/3] soc: qcom: ubwc: Use IS_REACHABLE() instead of IS_ENABLED() ---
commit 27da698f8aa42c85fe3250533a0ac637d13515f3
Author: Daniel Baluta <daniel.baluta@nxp.com>
soc: qcom: ubwc: Use IS_REACHABLE() instead of IS_ENABLED()
This commit changes the conditional check for QCOM_UBWC_CONFIG from
IS_ENABLED to IS_REACHABLE. This aims to resolve a link error when
built-in callers try to use the function while the dependency is built
as a module.
> 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)
[Severity: High]
Does using IS_REACHABLE() here mask a Kconfig dependency mismatch?
If a user configures DRM_MSM=y and QCOM_SMEM=m, IS_REACHABLE() evaluates
to false and provides the inline stub to the built-in driver. Since the
callers abort on error rather than treating the configuration as optional,
won't this cause guaranteed runtime probe failures for built-in drivers
instead of catching the unmet dependency at build time?
> 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)
[Severity: Medium]
This is a pre-existing issue, but does falling back to this stub cause
a resource leak during device probe?
Looking at a5xx_gpu_init(), if the stub is used and returns an error pointer,
the function returns early without cleaning up resources allocated by
adreno_gpu_init():
drivers/gpu/drm/msm/adreno/a5xx_gpu.c:a5xx_gpu_init() {
...
adreno_gpu_init(dev, pdev, adreno_gpu, &funcs, 1);
...
adreno_gpu->ubwc_config = qcom_ubwc_config_get_data();
if (IS_ERR(adreno_gpu->ubwc_config))
return ERR_CAST(adreno_gpu->ubwc_config);
...
}
Will this leak memory and GPU resources like ringbuffers and the a5xx_gpu
structure itself if it fails to call a5xx_destroy() on the error path?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260812151934.709198-1-daniel.baluta@nxp.com?part=3
prev parent reply other threads:[~2026-08-12 15:32 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
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 [this message]
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=20260812153203.967531F000E9@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.