Skip to contentSkip to conversation

drm/amdkfd: Improve KFD IOCTL printing

PATCH In review Zhao, Yong 2 participants 2 messages Sep 30, 2019 – Oct 1, 2019 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

Zhao, Yong

author
#0 lore raw

PATCH 1/1 drm/amdkfd: Improve KFD IOCTL printing

The code use hex define, so should the printing.

Change-Id Ia7cc7690553bb043915b3d8c0157216c64421a60
---
 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +3 -2
index c28ba0c1d7ac..d9e36dbf13d5 100644
@@ -1840,7 +1840,7 @@ static long kfd_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
 	} else
 		goto err_i1;
 
-	dev_dbg(kfd_device, "ioctl cmd 0x%x (#%d), arg 0x%lx\n", cmd, nr, arg);
+	dev_dbg(kfd_device, "ioctl cmd 0x%x (#0x%x), arg 0x%lx\n", cmd, nr, arg);
 
 	process = kfd_get_process(current);
 	if (IS_ERR(process)) {
@@ -1895,7 +1895,8 @@ static long kfd_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
 		kfree(kdata);
 
 	if (retcode)
-		dev_dbg(kfd_device, "ret = %d\n", retcode);
+		dev_dbg(kfd_device, "ioctl cmd (#0x%x), arg 0x%lx, ret = %d\n",
+				nr, arg, retcode);
 
 	return retcode;
 }
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

Reviewed-by Felix Kuehling
#2 lore raw
Quoted 4 lines · Yong

The code use hex define, so should the printing.

Change-Id Ia7cc7690553bb043915b3d8c0157216c64421a60
Quoted 18 lines
---
  drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +1 -1
index c28ba0c1d7ac..d9e36dbf13d5 100644
@@ -1840,7 +1840,7 @@ static long kfd_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
  	} else
  		goto err_i1;
 
-	dev_dbg(kfd_device, "ioctl cmd 0x%x (#%d), arg 0x%lx\n", cmd, nr, arg);
+	dev_dbg(kfd_device, "ioctl cmd 0x%x (#0x%x), arg 0x%lx\n", cmd, nr, arg);
 
  	process = kfd_get_process(current);
  	if (IS_ERR(process)) {

drivers/gpu/drm/amd/amdkfd/kfd_chardev.c static long kfd_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) · line 1902

Quoted 9 lines
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +2 -1
@@ -1895,7 +1895,8 @@ static long kfd_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
  		kfree(kdata);
 
  	if (retcode)
-		dev_dbg(kfd_device, "ret = %d\n", retcode);
+		dev_dbg(kfd_device, "ioctl cmd (#0x%x), arg 0x%lx, ret = %d\n",
+				nr, arg, retcode);
 
  	return retcode;
  }

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx