Skip to content

Commit

Permalink
drm/amdgpu: Replace DRM_ERROR() with drm_err()
Browse files Browse the repository at this point in the history
DRM_ERROR() is no longer preferred. Replace DRM_ERROR() usage
with drm_err() in isp driver.

Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Pratap Nirujogi authored and Alex Deucher committed Feb 27, 2025
1 parent b5838d1 commit a67e75b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
15 changes: 10 additions & 5 deletions drivers/gpu/drm/amd/amdgpu/isp_v4_1_0.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ static int isp_v4_1_0_hw_init(struct amdgpu_isp *isp)
isp->isp_cell = kcalloc(2, sizeof(struct mfd_cell), GFP_KERNEL);
if (!isp->isp_cell) {
r = -ENOMEM;
DRM_ERROR("%s: isp mfd cell alloc failed\n", __func__);
drm_err(&adev->ddev,
"%s: isp mfd cell alloc failed\n", __func__);
goto failure;
}

Expand All @@ -62,14 +63,16 @@ static int isp_v4_1_0_hw_init(struct amdgpu_isp *isp)
GFP_KERNEL);
if (!isp->isp_res) {
r = -ENOMEM;
DRM_ERROR("%s: isp mfd res alloc failed\n", __func__);
drm_err(&adev->ddev,
"%s: isp mfd res alloc failed\n", __func__);
goto failure;
}

isp->isp_pdata = kzalloc(sizeof(*isp->isp_pdata), GFP_KERNEL);
if (!isp->isp_pdata) {
r = -ENOMEM;
DRM_ERROR("%s: isp platform data alloc failed\n", __func__);
drm_err(&adev->ddev,
"%s: isp platform data alloc failed\n", __func__);
goto failure;
}

Expand Down Expand Up @@ -114,7 +117,8 @@ static int isp_v4_1_0_hw_init(struct amdgpu_isp *isp)
GFP_KERNEL);
if (!isp->isp_i2c_res) {
r = -ENOMEM;
DRM_ERROR("%s: isp mfd res alloc failed\n", __func__);
drm_err(&adev->ddev,
"%s: isp mfd res alloc failed\n", __func__);
goto failure;
}

Expand All @@ -131,7 +135,8 @@ static int isp_v4_1_0_hw_init(struct amdgpu_isp *isp)

r = mfd_add_hotplug_devices(isp->parent, isp->isp_cell, 2);
if (r) {
DRM_ERROR("%s: add mfd hotplug device failed\n", __func__);
drm_err(&adev->ddev,
"%s: add mfd hotplug device failed\n", __func__);
goto failure;
}

Expand Down
15 changes: 10 additions & 5 deletions drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ static int isp_v4_1_1_hw_init(struct amdgpu_isp *isp)
isp->isp_cell = kcalloc(2, sizeof(struct mfd_cell), GFP_KERNEL);
if (!isp->isp_cell) {
r = -ENOMEM;
DRM_ERROR("%s: isp mfd cell alloc failed\n", __func__);
drm_err(&adev->ddev,
"%s: isp mfd cell alloc failed\n", __func__);
goto failure;
}

Expand All @@ -63,14 +64,16 @@ static int isp_v4_1_1_hw_init(struct amdgpu_isp *isp)
GFP_KERNEL);
if (!isp->isp_res) {
r = -ENOMEM;
DRM_ERROR("%s: isp mfd res alloc failed\n", __func__);
drm_err(&adev->ddev,
"%s: isp mfd res alloc failed\n", __func__);
goto failure;
}

isp->isp_pdata = kzalloc(sizeof(*isp->isp_pdata), GFP_KERNEL);
if (!isp->isp_pdata) {
r = -ENOMEM;
DRM_ERROR("%s: isp platform data alloc failed\n", __func__);
drm_err(&adev->ddev,
"%s: isp platform data alloc failed\n", __func__);
goto failure;
}

Expand Down Expand Up @@ -114,7 +117,8 @@ static int isp_v4_1_1_hw_init(struct amdgpu_isp *isp)
isp->isp_i2c_res = kcalloc(1, sizeof(struct resource), GFP_KERNEL);
if (!isp->isp_i2c_res) {
r = -ENOMEM;
DRM_ERROR("%s: isp mfd res alloc failed\n", __func__);
drm_err(&adev->ddev,
"%s: isp mfd res alloc failed\n", __func__);
goto failure;
}

Expand All @@ -131,7 +135,8 @@ static int isp_v4_1_1_hw_init(struct amdgpu_isp *isp)

r = mfd_add_hotplug_devices(isp->parent, isp->isp_cell, 2);
if (r) {
DRM_ERROR("%s: add mfd hotplug device failed\n", __func__);
drm_err(&adev->ddev,
"%s: add mfd hotplug device failed\n", __func__);
goto failure;
}

Expand Down

0 comments on commit a67e75b

Please sign in to comment.