Skip to contentSkip to conversation

drm/msm/adreno: fix sparse warnings in a6xx code

PATCH Superseded Dmitry Baryshkov 3 participants 3 messages Apr 7, 2023 – Apr 10, 2023

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/msm/adreno: fix sparse warnings in a6xx code

Sparse reports plenty of warnings against the a6xx code because of a6xx_gmu::mmio and a6xx_gmu::rscc members. For some reason they were defined as __iomem pointers rather than pointers to __iomem memory. Correct the __iomem attribute.

Fixes 02ef80c54e7c ("drm/msm/a6xx: update pdc/rscc GMU registers for A640/A650")
---
 drivers/gpu/drm/msm/adreno/a6xx_gmu.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/msm/adreno/a6xx_gmu.h +2 -2
index 0bc3eb443fec..84d345af126f 100644
@@ -51,8 +51,8 @@ struct a6xx_gmu {
 
 	struct msm_gem_address_space *aspace;
 
-	void * __iomem mmio;
-	void * __iomem rscc;
+	void __iomem * mmio;
+	void __iomem * rscc;
 
 	int hfi_irq;
 	int gmu_irq;
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Dmitry Baryshkov

Sparse reports plenty of warnings against the a6xx code because of a6xx_gmu::mmio and a6xx_gmu::rscc members. For some reason they were defined as __iomem pointers rather than pointers to __iomem memory. Correct the __iomem attribute.

Fixes 02ef80c54e7c ("drm/msm/a6xx: update pdc/rscc GMU registers for A640/A650")

---

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat
Reviewed-by on v1 1/1
#2 lore raw
In reply to Dmitry Baryshkov

Quoting Dmitry Baryshkov (2023-04-06 18:07:41)

drivers/gpu/drm/msm/adreno/a6xx_gmu.h struct a6xx_gmu { · line 55

Quoted 12 lines
drivers/gpu/drm/msm/adreno/a6xx_gmu.h +2 -2
index 0bc3eb443fec..84d345af126f 100644
@@ -51,8 +51,8 @@ struct a6xx_gmu {
 
        struct msm_gem_address_space *aspace;
 
-       void * __iomem mmio;
-       void * __iomem rscc;
+       void __iomem * mmio;
+       void __iomem * rscc;

Should stick that * to the member name.

	void __iomem *rscc;

with that