Skip to contentSkip to conversation

amdkfd: let profile_lock_device return an int other than uint32

PATCH In review Zhu Lingshan 2 participants 2 messages Aug 14

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 amdkfd: let profile_lock_device return an int other than uint32

profile_lock_device() may return negive error code, so the type of the return value should be int, not uint32

---
 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +1 -1
index 309510e23315..6fd18488d5cf 100644
@@ -3329,7 +3329,7 @@ static int kfd_ioctl_create_process(struct file *filep, struct kfd_process *p, v
 	return 0;
 }
 
-static inline uint32_t profile_lock_device(struct kfd_process *p,
+static inline int profile_lock_device(struct kfd_process *p,
 					   uint32_t gpu_id, uint32_t op)
 {
 	struct kfd_process_device *pdd;
Signature · 1 line
2.53.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Zhu Lingshan

profile_lock_device() may return negive error code, so the type of the return value should be int, not uint32

Quoted 17 lines
---
  drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +1 -1
index 309510e23315..6fd18488d5cf 100644
@@ -3329,7 +3329,7 @@ static int kfd_ioctl_create_process(struct file *filep, struct kfd_process *p, v
  	return 0;
  }
 
-static inline uint32_t profile_lock_device(struct kfd_process *p,
+static inline int profile_lock_device(struct kfd_process *p,
  					   uint32_t gpu_id, uint32_t op)
  {
  	struct kfd_process_device *pdd;