Re: [RFC][PATCH 1/1] drm/amdkfd: Remove redundant pdd validation

2015-07-09 Thread Oded Gabbay
On Mon, Jun 29, 2015 at 7:33 AM, Maninder Singh  wrote:
>
> pdd is already dereferenced before this check.
> So it is redundtant to validate pdd here.
>
> Signed-off-by: Maninder Singh 
> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_process.c |3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c 
> b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> index 8a1f999..4dbc4e5 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> @@ -431,8 +431,7 @@ void kfd_unbind_process_from_device(struct kfd_dev *dev, 
> unsigned int pasid)
>  * We don't call amd_iommu_unbind_pasid() here
>  * because the IOMMU called us.
>  */
> -   if (pdd)
> -   pdd->bound = false;
> +   pdd->bound = false;
>
> mutex_unlock(>mutex);
>  }
> --
> 1.7.9.5
>
Hi Maninder,

You are correct pdd was already dereferenced so this check is
redundant. However, I think a better patch would be to move the check
to where pdd is first acquired (a few lines above it), because I don't
see there any check.

Could you please do that and resend the patch ? Use latest v4.2-rc1
label from Linus please.

Thansk,

   Oded
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH 1/1] drm/amdkfd: Remove redundant pdd validation

2015-07-09 Thread Oded Gabbay
On Mon, Jun 29, 2015 at 7:33 AM, Maninder Singh maninder...@samsung.com wrote:

 pdd is already dereferenced before this check.
 So it is redundtant to validate pdd here.

 Signed-off-by: Maninder Singh maninder...@samsung.com
 ---
  drivers/gpu/drm/amd/amdkfd/kfd_process.c |3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

 diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c 
 b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
 index 8a1f999..4dbc4e5 100644
 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
 +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
 @@ -431,8 +431,7 @@ void kfd_unbind_process_from_device(struct kfd_dev *dev, 
 unsigned int pasid)
  * We don't call amd_iommu_unbind_pasid() here
  * because the IOMMU called us.
  */
 -   if (pdd)
 -   pdd-bound = false;
 +   pdd-bound = false;

 mutex_unlock(p-mutex);
  }
 --
 1.7.9.5

Hi Maninder,

You are correct pdd was already dereferenced so this check is
redundant. However, I think a better patch would be to move the check
to where pdd is first acquired (a few lines above it), because I don't
see there any check.

Could you please do that and resend the patch ? Use latest v4.2-rc1
label from Linus please.

Thansk,

   Oded
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFC][PATCH 1/1] drm/amdkfd: Remove redundant pdd validation

2015-06-28 Thread Maninder Singh
pdd is already dereferenced before this check.
So it is redundtant to validate pdd here.

Signed-off-by: Maninder Singh 
---
 drivers/gpu/drm/amd/amdkfd/kfd_process.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c 
b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index 8a1f999..4dbc4e5 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -431,8 +431,7 @@ void kfd_unbind_process_from_device(struct kfd_dev *dev, 
unsigned int pasid)
 * We don't call amd_iommu_unbind_pasid() here
 * because the IOMMU called us.
 */
-   if (pdd)
-   pdd->bound = false;
+   pdd->bound = false;
 
mutex_unlock(>mutex);
 }
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFC][PATCH 1/1] drm/amdkfd: Remove redundant pdd validation

2015-06-28 Thread Maninder Singh
pdd is already dereferenced before this check.
So it is redundtant to validate pdd here.

Signed-off-by: Maninder Singh maninder...@samsung.com
---
 drivers/gpu/drm/amd/amdkfd/kfd_process.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c 
b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index 8a1f999..4dbc4e5 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -431,8 +431,7 @@ void kfd_unbind_process_from_device(struct kfd_dev *dev, 
unsigned int pasid)
 * We don't call amd_iommu_unbind_pasid() here
 * because the IOMMU called us.
 */
-   if (pdd)
-   pdd-bound = false;
+   pdd-bound = false;
 
mutex_unlock(p-mutex);
 }
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/