* [PATCH 0/4] drm/mediatek: fix sparse warnings
@ 2026-04-29 9:58 Louis-Alexis Eyraud
2026-04-29 9:58 ` [PATCH 1/4] drm/mediatek: mtk_hdmi_ddc_v2: Fix non-static global variable Louis-Alexis Eyraud
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Louis-Alexis Eyraud @ 2026-04-29 9:58 UTC (permalink / raw)
To: Chun-Kuang Hu, Philipp Zabel, David Airlie, Simona Vetter,
Matthias Brugger, AngeloGioacchino Del Regno, CK Hu,
Alexandre Mergnat
Cc: kernel, dri-devel, linux-mediatek, linux-kernel, linux-arm-kernel,
Louis-Alexis Eyraud, kernel test robot
This series fixes in the mediatek-drm driver the sparse warnings
reported by [1] and two others introduced during v6.16 development
cycle.
The series has compile-tested and is based on linux-next (tag:
next-2040428).
[1]: https://lore.kernel.org/all/202604132044.fcYjEcU8-lkp@intel.com/
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
Louis-Alexis Eyraud (4):
drm/mediatek: mtk_hdmi_ddc_v2: Fix non-static global variable
drm/mediatek: mtk_hdmi_v2: Fix non-static global variable
drm/mediatek: mtk_cec: Fix non-static global variable
drm/mediatek: mtk_hdmi_ddc: Fix non-static global variable
drivers/gpu/drm/mediatek/mtk_cec.c | 2 +-
drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c | 2 +-
drivers/gpu/drm/mediatek/mtk_hdmi_ddc_v2.c | 2 +-
drivers/gpu/drm/mediatek/mtk_hdmi_v2.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
---
base-commit: 0f3ef35b0747832b58b97171bad99011d084c6b1
change-id: 20260424-mediatek-drm-fix-sparse-warnings-7404de18204c
Best regards,
--
Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/4] drm/mediatek: mtk_hdmi_ddc_v2: Fix non-static global variable
2026-04-29 9:58 [PATCH 0/4] drm/mediatek: fix sparse warnings Louis-Alexis Eyraud
@ 2026-04-29 9:58 ` Louis-Alexis Eyraud
2026-05-05 1:40 ` Claude review: " Claude Code Review Bot
2026-04-29 9:59 ` [PATCH 2/4] drm/mediatek: mtk_hdmi_v2: " Louis-Alexis Eyraud
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Louis-Alexis Eyraud @ 2026-04-29 9:58 UTC (permalink / raw)
To: Chun-Kuang Hu, Philipp Zabel, David Airlie, Simona Vetter,
Matthias Brugger, AngeloGioacchino Del Regno, CK Hu,
Alexandre Mergnat
Cc: kernel, dri-devel, linux-mediatek, linux-kernel, linux-arm-kernel,
Louis-Alexis Eyraud, kernel test robot
The struct 'mtk_hdmi_ddc_v2_driver' is not used outside of the
mtk_hdmi_ddc_v2.c file, so make it static to silence sparse warning:
```
drivers/gpu/drm/mediatek/mtk_hdmi_ddc_v2.c:392:24: sparse: warning:
symbol 'mtk_hdmi_ddc_v2_driver' was not declared. Should it be
static?
```
Fixes: 8d0f79886273 ("drm/mediatek: Introduce HDMI/DDC v2 for MT8195/MT8188")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202604132044.fcYjEcU8-lkp@intel.com/
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
drivers/gpu/drm/mediatek/mtk_hdmi_ddc_v2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_ddc_v2.c b/drivers/gpu/drm/mediatek/mtk_hdmi_ddc_v2.c
index d937219fdb7e..31e81a6de6d8 100644
--- a/drivers/gpu/drm/mediatek/mtk_hdmi_ddc_v2.c
+++ b/drivers/gpu/drm/mediatek/mtk_hdmi_ddc_v2.c
@@ -389,7 +389,7 @@ static const struct of_device_id mtk_hdmi_ddc_v2_match[] = {
};
MODULE_DEVICE_TABLE(of, mtk_hdmi_ddc_v2_match);
-struct platform_driver mtk_hdmi_ddc_v2_driver = {
+static struct platform_driver mtk_hdmi_ddc_v2_driver = {
.probe = mtk_hdmi_ddc_v2_probe,
.driver = {
.name = "mediatek-hdmi-ddc-v2",
--
2.54.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/4] drm/mediatek: mtk_hdmi_v2: Fix non-static global variable
2026-04-29 9:58 [PATCH 0/4] drm/mediatek: fix sparse warnings Louis-Alexis Eyraud
2026-04-29 9:58 ` [PATCH 1/4] drm/mediatek: mtk_hdmi_ddc_v2: Fix non-static global variable Louis-Alexis Eyraud
@ 2026-04-29 9:59 ` Louis-Alexis Eyraud
2026-05-05 1:40 ` Claude review: " Claude Code Review Bot
2026-04-29 9:59 ` [PATCH 3/4] drm/mediatek: mtk_cec: " Louis-Alexis Eyraud
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Louis-Alexis Eyraud @ 2026-04-29 9:59 UTC (permalink / raw)
To: Chun-Kuang Hu, Philipp Zabel, David Airlie, Simona Vetter,
Matthias Brugger, AngeloGioacchino Del Regno, CK Hu,
Alexandre Mergnat
Cc: kernel, dri-devel, linux-mediatek, linux-kernel, linux-arm-kernel,
Louis-Alexis Eyraud, kernel test robot
The struct 'mtk_hdmi_v2_clk_names' is not used outside of the
mtk_hdmi_v2.c file, so make it static to silence sparse warning:
```
drivers/gpu/drm/mediatek/mtk_hdmi_v2.c:53:12: sparse: warning: symbol
'mtk_hdmi_v2_clk_names' was not declared. Should it be static?
```
Fixes: 8d0f79886273 ("drm/mediatek: Introduce HDMI/DDC v2 for MT8195/MT8188")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202604132044.fcYjEcU8-lkp@intel.com/
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
drivers/gpu/drm/mediatek/mtk_hdmi_v2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_v2.c b/drivers/gpu/drm/mediatek/mtk_hdmi_v2.c
index b5c738380dc2..a8eb6fd0908b 100644
--- a/drivers/gpu/drm/mediatek/mtk_hdmi_v2.c
+++ b/drivers/gpu/drm/mediatek/mtk_hdmi_v2.c
@@ -50,7 +50,7 @@ enum mtk_hdmi_v2_clk_id {
MTK_HDMI_V2_CLK_COUNT,
};
-const char *const mtk_hdmi_v2_clk_names[MTK_HDMI_V2_CLK_COUNT] = {
+static const char *const mtk_hdmi_v2_clk_names[MTK_HDMI_V2_CLK_COUNT] = {
[MTK_HDMI_V2_CLK_HDMI_APB_SEL] = "bus",
[MTK_HDMI_V2_CLK_HDCP_SEL] = "hdcp",
[MTK_HDMI_V2_CLK_HDCP_24M_SEL] = "hdcp24m",
--
2.54.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/4] drm/mediatek: mtk_cec: Fix non-static global variable
2026-04-29 9:58 [PATCH 0/4] drm/mediatek: fix sparse warnings Louis-Alexis Eyraud
2026-04-29 9:58 ` [PATCH 1/4] drm/mediatek: mtk_hdmi_ddc_v2: Fix non-static global variable Louis-Alexis Eyraud
2026-04-29 9:59 ` [PATCH 2/4] drm/mediatek: mtk_hdmi_v2: " Louis-Alexis Eyraud
@ 2026-04-29 9:59 ` Louis-Alexis Eyraud
2026-05-05 1:40 ` Claude review: " Claude Code Review Bot
2026-04-29 9:59 ` [PATCH 4/4] drm/mediatek: mtk_hdmi_ddc: " Louis-Alexis Eyraud
2026-05-05 1:40 ` Claude review: drm/mediatek: fix sparse warnings Claude Code Review Bot
4 siblings, 1 reply; 10+ messages in thread
From: Louis-Alexis Eyraud @ 2026-04-29 9:59 UTC (permalink / raw)
To: Chun-Kuang Hu, Philipp Zabel, David Airlie, Simona Vetter,
Matthias Brugger, AngeloGioacchino Del Regno, CK Hu,
Alexandre Mergnat
Cc: kernel, dri-devel, linux-mediatek, linux-kernel, linux-arm-kernel,
Louis-Alexis Eyraud
The struct 'mtk_cec_driver' is not used outside of the
mtk_cec.c file, so make it static to silence sparse warning:
```
drivers/gpu/drm/mediatek/mtk_cec.c:243:24: sparse: warning: symbol
'mtk_cec_driver' was not declared. Should it be static?
```
Fixes: 1e914a89ab7e ("drm/mediatek: mtk_cec: Switch to register as module_platform_driver")
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
drivers/gpu/drm/mediatek/mtk_cec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_cec.c b/drivers/gpu/drm/mediatek/mtk_cec.c
index c7be530ca041..b8ccd6e55bed 100644
--- a/drivers/gpu/drm/mediatek/mtk_cec.c
+++ b/drivers/gpu/drm/mediatek/mtk_cec.c
@@ -240,7 +240,7 @@ static const struct of_device_id mtk_cec_of_ids[] = {
};
MODULE_DEVICE_TABLE(of, mtk_cec_of_ids);
-struct platform_driver mtk_cec_driver = {
+static struct platform_driver mtk_cec_driver = {
.probe = mtk_cec_probe,
.remove = mtk_cec_remove,
.driver = {
--
2.54.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 4/4] drm/mediatek: mtk_hdmi_ddc: Fix non-static global variable
2026-04-29 9:58 [PATCH 0/4] drm/mediatek: fix sparse warnings Louis-Alexis Eyraud
` (2 preceding siblings ...)
2026-04-29 9:59 ` [PATCH 3/4] drm/mediatek: mtk_cec: " Louis-Alexis Eyraud
@ 2026-04-29 9:59 ` Louis-Alexis Eyraud
2026-05-05 1:40 ` Claude review: " Claude Code Review Bot
2026-05-05 1:40 ` Claude review: drm/mediatek: fix sparse warnings Claude Code Review Bot
4 siblings, 1 reply; 10+ messages in thread
From: Louis-Alexis Eyraud @ 2026-04-29 9:59 UTC (permalink / raw)
To: Chun-Kuang Hu, Philipp Zabel, David Airlie, Simona Vetter,
Matthias Brugger, AngeloGioacchino Del Regno, CK Hu,
Alexandre Mergnat
Cc: kernel, dri-devel, linux-mediatek, linux-kernel, linux-arm-kernel,
Louis-Alexis Eyraud
The struct 'mtk_hdmi_ddc_driver' is not used outside of the
mtk_hdmi_ddc.c file, so make it static to silence sparse warning:
```
drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c:331:24: sparse: warning: symbol
'mtk_hdmi_ddc_driver' was not declared. Should it be static?
```
Fixes: c241118b6216 ("drm/mediatek: mtk_hdmi_ddc: Switch to register as module_platform_driver")
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c b/drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c
index 6358e1af69b4..2acbdb025d89 100644
--- a/drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c
+++ b/drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c
@@ -328,7 +328,7 @@ static const struct of_device_id mtk_hdmi_ddc_match[] = {
};
MODULE_DEVICE_TABLE(of, mtk_hdmi_ddc_match);
-struct platform_driver mtk_hdmi_ddc_driver = {
+static struct platform_driver mtk_hdmi_ddc_driver = {
.probe = mtk_hdmi_ddc_probe,
.remove = mtk_hdmi_ddc_remove,
.driver = {
--
2.54.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Claude review: drm/mediatek: fix sparse warnings
2026-04-29 9:58 [PATCH 0/4] drm/mediatek: fix sparse warnings Louis-Alexis Eyraud
` (3 preceding siblings ...)
2026-04-29 9:59 ` [PATCH 4/4] drm/mediatek: mtk_hdmi_ddc: " Louis-Alexis Eyraud
@ 2026-05-05 1:40 ` Claude Code Review Bot
4 siblings, 0 replies; 10+ messages in thread
From: Claude Code Review Bot @ 2026-05-05 1:40 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: drm/mediatek: fix sparse warnings
Author: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
Patches: 5
Reviewed: 2026-05-05T11:40:56.678882
---
This is a clean, straightforward 4-patch series that adds `static` to four file-local symbols in the MediaTek DRM driver to fix sparse warnings. Each change is a mechanical one-liner. All four symbols are confirmed to be used only within their respective `.c` files, with no external references or header declarations. The series is correct and safe to merge.
Minor nit: The cover letter says "based on linux-next (tag: next-2040428)" — the year looks wrong ("2040428"), likely a typo for "next-20260428". This is cosmetic only.
**Verdict: All four patches look good to me.**
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Claude review: drm/mediatek: mtk_hdmi_ddc_v2: Fix non-static global variable
2026-04-29 9:58 ` [PATCH 1/4] drm/mediatek: mtk_hdmi_ddc_v2: Fix non-static global variable Louis-Alexis Eyraud
@ 2026-05-05 1:40 ` Claude Code Review Bot
0 siblings, 0 replies; 10+ messages in thread
From: Claude Code Review Bot @ 2026-05-05 1:40 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
```c
-struct platform_driver mtk_hdmi_ddc_v2_driver = {
+static struct platform_driver mtk_hdmi_ddc_v2_driver = {
```
Correct. `mtk_hdmi_ddc_v2_driver` is only used at the definition site and via `module_platform_driver()` in the same file. The Fixes tag points to `8d0f79886273` which introduced the symbol — this is appropriate. Reported-by/Closes tags for the kernel test robot report are present.
**Reviewed-by worthy. No issues.**
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Claude review: drm/mediatek: mtk_hdmi_v2: Fix non-static global variable
2026-04-29 9:59 ` [PATCH 2/4] drm/mediatek: mtk_hdmi_v2: " Louis-Alexis Eyraud
@ 2026-05-05 1:40 ` Claude Code Review Bot
0 siblings, 0 replies; 10+ messages in thread
From: Claude Code Review Bot @ 2026-05-05 1:40 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
```c
-const char *const mtk_hdmi_v2_clk_names[MTK_HDMI_V2_CLK_COUNT] = {
+static const char *const mtk_hdmi_v2_clk_names[MTK_HDMI_V2_CLK_COUNT] = {
```
Correct. `mtk_hdmi_v2_clk_names` is only referenced within `mtk_hdmi_v2.c` (at definition and at line 1436 in a struct initializer). Same Fixes tag as patch 1, which is correct since both were introduced in the same commit. Reported-by/Closes present.
**Reviewed-by worthy. No issues.**
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Claude review: drm/mediatek: mtk_cec: Fix non-static global variable
2026-04-29 9:59 ` [PATCH 3/4] drm/mediatek: mtk_cec: " Louis-Alexis Eyraud
@ 2026-05-05 1:40 ` Claude Code Review Bot
0 siblings, 0 replies; 10+ messages in thread
From: Claude Code Review Bot @ 2026-05-05 1:40 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
```c
-struct platform_driver mtk_cec_driver = {
+static struct platform_driver mtk_cec_driver = {
```
Correct. `mtk_cec_driver` is only used at the definition and via `module_platform_driver()` in `mtk_cec.c`. The Fixes tag points to `1e914a89ab7e` which switched it to `module_platform_driver` registration — this is the commit that made the variable no longer need external linkage, so the Fixes tag is appropriate.
Note: unlike patches 1 and 2, this patch does not have `Reported-by: kernel test robot` — the cover letter explains these two (patches 3 and 4) are "two others introduced during v6.16 development cycle" that were found separately. This is fine.
**Reviewed-by worthy. No issues.**
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Claude review: drm/mediatek: mtk_hdmi_ddc: Fix non-static global variable
2026-04-29 9:59 ` [PATCH 4/4] drm/mediatek: mtk_hdmi_ddc: " Louis-Alexis Eyraud
@ 2026-05-05 1:40 ` Claude Code Review Bot
0 siblings, 0 replies; 10+ messages in thread
From: Claude Code Review Bot @ 2026-05-05 1:40 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
```c
-struct platform_driver mtk_hdmi_ddc_driver = {
+static struct platform_driver mtk_hdmi_ddc_driver = {
```
Correct. `mtk_hdmi_ddc_driver` is only used at the definition and via `module_platform_driver()` in `mtk_hdmi_ddc.c`. The Fixes tag points to `c241118b6216` which switched to `module_platform_driver` — same pattern as patch 3, correct rationale.
**Reviewed-by worthy. No issues.**
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-05-05 1:40 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-29 9:58 [PATCH 0/4] drm/mediatek: fix sparse warnings Louis-Alexis Eyraud
2026-04-29 9:58 ` [PATCH 1/4] drm/mediatek: mtk_hdmi_ddc_v2: Fix non-static global variable Louis-Alexis Eyraud
2026-05-05 1:40 ` Claude review: " Claude Code Review Bot
2026-04-29 9:59 ` [PATCH 2/4] drm/mediatek: mtk_hdmi_v2: " Louis-Alexis Eyraud
2026-05-05 1:40 ` Claude review: " Claude Code Review Bot
2026-04-29 9:59 ` [PATCH 3/4] drm/mediatek: mtk_cec: " Louis-Alexis Eyraud
2026-05-05 1:40 ` Claude review: " Claude Code Review Bot
2026-04-29 9:59 ` [PATCH 4/4] drm/mediatek: mtk_hdmi_ddc: " Louis-Alexis Eyraud
2026-05-05 1:40 ` Claude review: " Claude Code Review Bot
2026-05-05 1:40 ` Claude review: drm/mediatek: fix sparse warnings Claude Code Review Bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox