Re: [PATCH RFC/DO NOT MERGE 02/12] drm/msm: Properly handle msm_ioremap() without name

From
Konrad Dybcio <hidden>
Date
2026-08-31 16:28:11
Also in
dri-devel, linux-arm-msm, linux-phy, lkml
Reply to
Krzysztof Kozlowski, 2026-08-28
On 8/28/26 4:05 PM, Krzysztof Kozlowski wrote:
quoted hunk ↗ jump to hunk
msm_ioremap() accepts being called without name of the region to map and
in such case maps by index 0.  However error paths still use the name in
error message.

Signed-off-by: Krzysztof Kozlowski <redacted>
---
 drivers/gpu/drm/msm/msm_io_utils.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/msm_io_utils.c b/drivers/gpu/drm/msm/msm_io_utils.c
index a6efe1eac271..93b94e330cb8 100644
--- a/drivers/gpu/drm/msm/msm_io_utils.c
+++ b/drivers/gpu/drm/msm/msm_io_utils.c
@@ -77,7 +77,8 @@ static void __iomem *_msm_ioremap(struct platform_device *pdev, const char *name
 
 	if (!res) {
 		if (!quiet)
-			DRM_DEV_ERROR(&pdev->dev, "failed to get memory resource: %s\n", name);
+			DRM_DEV_ERROR(&pdev->dev, "failed to get memory resource: %s\n",
+				      (name ? name : "#0"));
nit: name ?: "#0"

Konrad
Thread (35 messages) 35 messages, 4 authors, last reply 2026-09-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help