From: sashiko-bot@kernel.org
To: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: imx@lists.linux.dev, dri-devel@lists.freedesktop.org,
Frank.Li@kernel.org
Subject: Re: [PATCH 2/2] drm/imx: include dc-drv.h to avoid sparse warning
Date: Wed, 08 Jul 2026 10:05:19 +0000 [thread overview]
Message-ID: <20260708100520.08B991F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260708095645.385291-2-jirislaby@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The use of pm_sleep_ptr() discards runtime PM callbacks when CONFIG_PM is enabled but CONFIG_PM_SLEEP is disabled, leading to a kernel oops on probe.
--
--- Patch [2]: [PATCH 2/2] drm/imx: include dc-drv.h to avoid sparse warning ---
commit 92fb37945f1af608d237fde0454ddaa90bee5644
Author: Jiri Slaby (SUSE) <jirislaby@kernel.org>
drm/imx: include dc-drv.h to avoid sparse warning
This commit adds an include of dc-drv.h in dc-ic.c to fix a sparse warning.
The warning indicated that dc_ic_driver was not declared.
> diff --git a/drivers/gpu/drm/imx/dc/dc-ic.c b/drivers/gpu/drm/imx/dc/dc-ic.c
> index d8aa46ee6a7a0..0f2fc7aecf31f 100644
> --- a/drivers/gpu/drm/imx/dc/dc-ic.c
> +++ b/drivers/gpu/drm/imx/dc/dc-ic.c
> @@ -14,6 +14,8 @@
> #include <linux/pm_runtime.h>
> #include <linux/regmap.h>
>
> +#include "dc-drv.h"
> +
> #define USERINTERRUPTMASK(n) (0x8 + 4 * (n))
> #define INTERRUPTENABLE(n) (0x10 + 4 * (n))
[ ... ]
drivers/gpu/drm/imx/dc/dc-ic.c:dc_ic_driver {
.probe = dc_ic_probe,
.remove = dc_ic_remove,
.driver = {
.name = "imx8-dc-intc",
.suppress_bind_attrs = true,
.of_match_table = dc_ic_dt_ids,
.pm = pm_sleep_ptr(&dc_ic_pm_ops),
},
};
[Severity: High]
This isn't a bug introduced by this patch, but can using pm_sleep_ptr() here
cause a kernel oops on probe?
If the kernel is configured with CONFIG_PM=y but CONFIG_PM_SLEEP=n,
pm_sleep_ptr() evaluates to NULL, dropping the entire PM operations
structure including the runtime PM callbacks set by RUNTIME_PM_OPS().
During device probe, pm_runtime_resume_and_get() would execute successfully
since the device lacks PM callbacks. As a result, dc_ic_runtime_resume()
is skipped and the AXI clock (clk_axi) is never enabled.
The probe function then calls regmap_write() to mask and clear interrupts.
Does accessing memory-mapped registers over an unclocked AXI bus trigger a
synchronous external bus abort? Should this use pm_ptr() instead?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260708095645.385291-1-jirislaby@kernel.org?part=2
next prev parent reply other threads:[~2026-07-08 10:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 9:56 [PATCH 1/2] drm/imx: Switch to irq_domain_create_linear() Jiri Slaby (SUSE)
2026-07-08 9:56 ` [PATCH 2/2] drm/imx: include dc-drv.h to avoid sparse warning Jiri Slaby (SUSE)
2026-07-08 10:05 ` sashiko-bot [this message]
2026-07-09 6:34 ` Liu Ying
2026-07-09 6:32 ` [PATCH 1/2] drm/imx: Switch to irq_domain_create_linear() Liu Ying
2026-07-15 7:41 ` Liu Ying
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=20260708100520.08B991F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=imx@lists.linux.dev \
--cc=jirislaby@kernel.org \
--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.