All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/radeon: Prefer 'unsigned int' to bare use of 'unsigned'
@ 2023-07-28 14:35 ` 孙冉
  0 siblings, 0 replies; 8+ messages in thread
From: 孙冉 @ 2023-07-28 14:35 UTC (permalink / raw)
  To: airlied, daniel, alexander.deucher; +Cc: dri-devel, amd-gfx, linux-kernel

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

Signed-off-by: Ran Sun <sunran001@208suo.com>
---
 drivers/gpu/drm/radeon/radeon_object.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_object.h b/drivers/gpu/drm/radeon/radeon_object.h
index 39cc87a59a9a..9b55a7103cfd 100644
--- a/drivers/gpu/drm/radeon/radeon_object.h
+++ b/drivers/gpu/drm/radeon/radeon_object.h
@@ -37,7 +37,7 @@
  *
  * Returns corresponding domain of the ttm mem_type
  */
-static inline unsigned radeon_mem_type_to_domain(u32 mem_type)
+static inline unsigned int radeon_mem_type_to_domain(u32 mem_type)
 {
  switch (mem_type) {
  case TTM_PL_VRAM:
@@ -112,12 +112,12 @@ static inline unsigned long radeon_bo_size(struct radeon_bo *bo)
  return bo->tbo.base.size;
 }
 
-static inline unsigned radeon_bo_ngpu_pages(struct radeon_bo *bo)
+static inline unsigned int radeon_bo_ngpu_pages(struct radeon_bo *bo)
 {
  return bo->tbo.base.size / RADEON_GPU_PAGE_SIZE;
 }
 
-static inline unsigned radeon_bo_gpu_page_alignment(struct radeon_bo *bo)
+static inline unsigned int radeon_bo_gpu_page_alignment(struct radeon_bo *bo)
 {
  return (bo->tbo.page_alignment << PAGE_SHIFT) / RADEON_GPU_PAGE_SIZE;
 }
@@ -189,7 +189,7 @@ static inline void *radeon_sa_bo_cpu_addr(struct drm_suballoc *sa_bo)
 
 extern int radeon_sa_bo_manager_init(struct radeon_device *rdev,
          struct radeon_sa_manager *sa_manager,
-         unsigned size, u32 align, u32 domain,
+         unsigned int size, u32 align, u32 domain,
          u32 flags);
 extern void radeon_sa_bo_manager_fini(struct radeon_device *rdev,
           struct radeon_sa_manager *sa_manager);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH] drm/radeon: Prefer 'unsigned int' to bare use of 'unsigned'
@ 2023-07-28 14:18 孙冉
  0 siblings, 0 replies; 8+ messages in thread
From: 孙冉 @ 2023-07-28 14:18 UTC (permalink / raw)
  To: alexander.deucher, airlied, daniel; +Cc: dri-devel, amd-gfx, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1636 bytes --]

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
Signed-off-by: Ran Sun <sunran001@208suo.com>
---
 drivers/gpu/drm/radeon/radeon_object.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_object.h b/drivers/gpu/drm/radeon/radeon_object.h
index 39cc87a59a9a..9b55a7103cfd 100644
--- a/drivers/gpu/drm/radeon/radeon_object.h
+++ b/drivers/gpu/drm/radeon/radeon_object.h
@@ -37,7 +37,7 @@
 *
 * Returns corresponding domain of the ttm mem_type
 */
-static inline unsigned radeon_mem_type_to_domain(u32 mem_type)
+static inline unsigned int radeon_mem_type_to_domain(u32 mem_type)
 {
 switch (mem_type) {
 case TTM_PL_VRAM:
@@ -112,12 +112,12 @@ static inline unsigned long radeon_bo_size(struct radeon_bo *bo)
 return bo->tbo.base.size;
 }
-static inline unsigned radeon_bo_ngpu_pages(struct radeon_bo *bo)
+static inline unsigned int radeon_bo_ngpu_pages(struct radeon_bo *bo)
 {
 return bo->tbo.base.size / RADEON_GPU_PAGE_SIZE;
 }
-static inline unsigned radeon_bo_gpu_page_alignment(struct radeon_bo *bo)
+static inline unsigned int radeon_bo_gpu_page_alignment(struct radeon_bo *bo)
 {
 return (bo->tbo.page_alignment << PAGE_SHIFT) / RADEON_GPU_PAGE_SIZE;
 }
@@ -189,7 +189,7 @@ static inline void *radeon_sa_bo_cpu_addr(struct drm_suballoc *sa_bo)
 extern int radeon_sa_bo_manager_init(struct radeon_device *rdev,
 struct radeon_sa_manager *sa_manager,
- unsigned size, u32 align, u32 domain,
+ unsigned int size, u32 align, u32 domain,
 u32 flags);
 extern void radeon_sa_bo_manager_fini(struct radeon_device *rdev,
 struct radeon_sa_manager *sa_manager);
-- 
2.17.1

[-- Attachment #2: Type: text/html, Size: 2274 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-07-31  7:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-28 14:35 [PATCH] drm/radeon: Prefer 'unsigned int' to bare use of 'unsigned' 孙冉
2023-07-28 14:35 ` 孙冉
2023-07-29 14:12 ` Bagas Sanjaya
2023-07-29 14:12   ` Bagas Sanjaya
2023-07-29 19:33   ` Nathan Chancellor
2023-07-29 19:33     ` Nathan Chancellor
2023-07-29 19:33     ` Nathan Chancellor
  -- strict thread matches above, loose matches on Subject: below --
2023-07-28 14:18 孙冉

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.