Skip to contentSkip to conversation

Replace dev_err with drm_err

RFC PATCH New Sukrut Heroorkar 1 participant 1 message Jul 28, 2025

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

RFC PATCH 1/1 Replace dev_err with drm_err

Hello,

This patch converts dev_err logging to drm_err, as recommended in gpu/todo.rst for drivers supporting multiple DRM instances.

Before proceeding further, I'd like to confirm if this is the right direction for amdgpu.

The below change builds successfully. I am happy to send this as a formal patch if it's acceptable.

Thank you.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +2 -2
index 13f0cdeb59c4..effffba39b5a 100644
@@ -460,7 +460,7 @@ static int amdgpu_virt_read_pf2vf_data(struct amdgpu_device *adev)
 		return -EINVAL;
 
 	if (pf2vf_info->size > 1024) {
-		dev_err(adev->dev, "invalid pf2vf message size: 0x%x\n", pf2vf_info->size);
+		drm_err(adev_to_drm(adev), "invalid pf2vf message size: 0x%x\n", pf2vf_info->size);
 		return -EINVAL;
 	}
 
@@ -471,7 +471,7 @@ static int amdgpu_virt_read_pf2vf_data(struct amdgpu_device *adev)
 			adev->virt.fw_reserve.p_pf2vf, pf2vf_info->size,
 			adev->virt.fw_reserve.checksum_key, checksum);
 		if (checksum != checkval) {
-			dev_err(adev->dev,
+			drm_err(adev_to_drm(adev),
 				"invalid pf2vf message: header checksum=0x%x calculated checksum=0x%x\n",
 				checksum, checkval);
 			return -EINVAL;
Signature · 1 line
2.43.0