Skip to contentSkip to conversation

/drm/amdgpu: correct chunk_ptr to a pointer to chunk.

PATCH In review YuanShang 2 participants 2 messages Oct 31, 2023

Subsystems (2)
lore
Share & tools
lore

YuanShang

author
#0 lore raw

PATCH 1/1 /drm/amdgpu: correct chunk_ptr to a pointer to chunk.

The variable "chunk_ptr" should be a pointer pointing to a struct drm_amdgpu_cs_chunk instead of to a pointer of that.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +1 -1
index 74769afaa33d..551b9466a441 100644
@@ -208,7 +208,7 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p,
 	}
 
 	for (i = 0; i < p->nchunks; i++) {
-		struct drm_amdgpu_cs_chunk __user **chunk_ptr = NULL;
+		struct drm_amdgpu_cs_chunk __user *chunk_ptr = NULL;
 		struct drm_amdgpu_cs_chunk user_chunk;
 		uint32_t __user *cdata;
 
Signature · 1 line
2.25.1
#1 lore raw

Am 31.10.23 um 03:55 schrieb YuanShang:

Quoted 4 lines

The variable "chunk_ptr" should be a pointer pointing to a struct drm_amdgpu_cs_chunk instead of to a pointer of that.

Good catch, Reviewed-by: Christian König <[email protected]>

Quoted 17 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +1 -1
index 74769afaa33d..551b9466a441 100644
@@ -208,7 +208,7 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p,
  	}
 
  	for (i = 0; i < p->nchunks; i++) {
-		struct drm_amdgpu_cs_chunk __user **chunk_ptr = NULL;
+		struct drm_amdgpu_cs_chunk __user *chunk_ptr = NULL;
  		struct drm_amdgpu_cs_chunk user_chunk;
  		uint32_t __user *cdata;