Skip to contentSkip to conversation

drm/radeon: fix signed v unsigned print formats

PATCH Applied Ben Dooks 2 participants 2 messages Jan 2 – Jan 6

Subsystems (2)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 drm/radeon: fix signed v unsigned print formats

Fix several places where %ld or %d has been used in place of %lu or %u.

---
 drivers/gpu/drm/radeon/radeon_gem.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/radeon/radeon_gem.c +3 -3
index f86773f3db20..891ef929cfa8 100644
@@ -110,7 +110,7 @@ int radeon_gem_object_create(struct radeon_device *rdev, unsigned long size,
 	 */
 	max_size = rdev->mc.gtt_size - rdev->gart_pin_size;
 	if (size > max_size) {
-		DRM_DEBUG("Allocation size %ldMb bigger than %ldMb limit\n",
+		DRM_DEBUG("Allocation size %luMb bigger than %luMb limit\n",
 			  size >> 20, max_size >> 20);
 		return -ENOMEM;
 	}
@@ -560,7 +560,7 @@ int radeon_gem_set_tiling_ioctl(struct drm_device *dev, void *data,
 	struct radeon_bo *robj;
 	int r = 0;
 
-	DRM_DEBUG("%d \n", args->handle);
+	DRM_DEBUG("%u \n", args->handle);
 	gobj = drm_gem_object_lookup(filp, args->handle);
 	if (gobj == NULL)
 		return -ENOENT;
@@ -886,7 +886,7 @@ static int radeon_debugfs_gem_info_show(struct seq_file *m, void *unused)
 			placement = " CPU";
 			break;
 		}
-		seq_printf(m, "bo[0x%08x] %8ldkB %8ldMB %s pid %8ld\n",
+		seq_printf(m, "bo[0x%08x] %8lukB %8luMB %s pid %8lu\n",
 			   i, radeon_bo_size(rbo) >> 10, radeon_bo_size(rbo) >> 20,
 			   placement, (unsigned long)rbo->pid);
 		i++;
Signature · 1 line
2.37.2.352.g3c44437643
Applied
#1 lore raw

Applied. thanks!

Alex

Quoted 43 lines · Ben Dooks

Fix several places where %ld or %d has been used in place of %lu or %u.

---
 drivers/gpu/drm/radeon/radeon_gem.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/radeon/radeon_gem.c +3 -4
index f86773f3db20..891ef929cfa8 100644
@@ -110,7 +110,7 @@ int radeon_gem_object_create(struct radeon_device *rdev, unsigned long size,
         */
        max_size = rdev->mc.gtt_size - rdev->gart_pin_size;
        if (size > max_size) {
-               DRM_DEBUG("Allocation size %ldMb bigger than %ldMb limit\n",
+               DRM_DEBUG("Allocation size %luMb bigger than %luMb limit\n",
                          size >> 20, max_size >> 20);
                return -ENOMEM;
        }
@@ -560,7 +560,7 @@ int radeon_gem_set_tiling_ioctl(struct drm_device *dev, void *data,
        struct radeon_bo *robj;
        int r = 0;
 
-       DRM_DEBUG("%d \n", args->handle);
+       DRM_DEBUG("%u \n", args->handle);
        gobj = drm_gem_object_lookup(filp, args->handle);
        if (gobj == NULL)
                return -ENOENT;
@@ -886,7 +886,7 @@ static int radeon_debugfs_gem_info_show(struct seq_file *m, void *unused)
                        placement = " CPU";
                        break;
                }
-               seq_printf(m, "bo[0x%08x] %8ldkB %8ldMB %s pid %8ld\n",
+               seq_printf(m, "bo[0x%08x] %8lukB %8luMB %s pid %8lu\n",
                           i, radeon_bo_size(rbo) >> 10, radeon_bo_size(rbo) >> 20,
                           placement, (unsigned long)rbo->pid);
                i++;
--

2.37.2.352.g3c44437643