Skip to contentSkip to conversation

drm/amdgpu: Clean up duplicate ip_block object

PATCH In review Sunil Khatri 3 participants 4 messages Oct 3, 2024 – Oct 8, 2024

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

PATCH 1/1 drm/amdgpu: Clean up duplicate ip_block object

remove the duplicate ip_block object in the
isp_hw_init function.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c +0 -6
index 416e8b3fad79..adc0b80ca5db 100644
@@ -54,12 +54,6 @@ static int isp_hw_init(struct amdgpu_ip_block *ip_block)
 	struct amdgpu_device *adev = ip_block->adev;
 	struct amdgpu_isp *isp = &adev->isp;
 
-	const struct amdgpu_ip_block *ip_block =
-		amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_ISP);
-
-	if (!ip_block)
-		return -EINVAL;
-
 	if (isp->funcs->hw_init != NULL)
 		return isp->funcs->hw_init(isp);
 
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 29 lines · Sunil Khatri

remove the duplicate ip_block object in the
isp_hw_init function.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c +0 -7
index 416e8b3fad79..adc0b80ca5db 100644
@@ -54,12 +54,6 @@ static int isp_hw_init(struct amdgpu_ip_block *ip_block)
        struct amdgpu_device *adev = ip_block->adev;
        struct amdgpu_isp *isp = &adev->isp;
 
-       const struct amdgpu_ip_block *ip_block =
-               amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_ISP);
-
-       if (!ip_block)
-               return -EINVAL;
-
        if (isp->funcs->hw_init != NULL)
                return isp->funcs->hw_init(isp);
 
--

2.34.1

maintainer
#2 lore raw
In reply to Sunil Khatri

Am 03.10.24 um 15:49 schrieb Sunil Khatri:

Quoted 4 lines

remove the duplicate ip_block object in the
isp_hw_init function.

You probably already pushed this, but Reviewed-by: Christian König <[email protected]> anyway.

Regards,
Christian.

Quoted 21 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 ------
  1 file changed, 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c +0 -6
index 416e8b3fad79..adc0b80ca5db 100644
@@ -54,12 +54,6 @@ static int isp_hw_init(struct amdgpu_ip_block *ip_block)
  	struct amdgpu_device *adev = ip_block->adev;
  	struct amdgpu_isp *isp = &adev->isp;
 
-	const struct amdgpu_ip_block *ip_block =
-		amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_ISP);
-
-	if (!ip_block)
-		return -EINVAL;
-
  	if (isp->funcs->hw_init != NULL)
  		return isp->funcs->hw_init(isp);
 
#3 lore raw

Yes Already Pushed.

Thanks for the review.

Quoted 32 lines · Christian König

Am 03.10.24 um 15:49 schrieb Sunil Khatri:

Quoted 4 lines

remove the duplicate ip_block object in the
isp_hw_init function.

You probably already pushed this, but Reviewed-by: Christian König <[email protected]> anyway.

Regards,
Christian.

Quoted 20 lines

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 ------

  1 file changed, 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c +0 -0
index 416e8b3fad79..adc0b80ca5db 100644
@@ -54,12 +54,6 @@ static int isp_hw_init(struct amdgpu_ip_block 
 *ip_block)
       struct amdgpu_device *adev = ip_block->adev;
       struct amdgpu_isp *isp = &adev->isp;

  -    const struct amdgpu_ip_block *ip_block =
-        amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_ISP);

drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c +0 -4
-
-    if (!ip_block)
-        return -EINVAL;
-

      if (isp->funcs->hw_init != NULL)
          return isp->funcs->hw_init(isp);