[PATCH v2] dma-buf: use vma_pages().

2016-05-23 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages(). Also, include Signed-off-by: Muhammad Falak R Wani --- drivers/dma-buf/dma-buf.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index

[PATCH] dma-buf: use vma_pages().

2016-05-21 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani --- drivers/dma-buf/dma-buf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 4a2c07e..b0317ec

[PATCH] drm/gma500: use vma_pages().

2016-05-21 Thread Muhammad Falak R Wani
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/gma500/framebuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c

[PATCH] drm/vmwgfx: use kmemdup

2016-05-19 Thread Muhammad Falak R Wani
Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/vmwgfx/vmwgfx_mob.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions

[PATCH] amdgpu/uvd: use kmemdup

2016-05-19 Thread Muhammad Falak R Wani
On Thu, May 19, 2016 at 01:18:10PM +0200, Christian König wrote: > Am 19.05.2016 um 13:11 schrieb Muhammad Falak R Wani: > >Use kmemdup when some other buffer is immediately copied into allocated > >region. It replaces call to allocation followed by memcpy, by a single >

[PATCH] drm/amd/powerplay/hwmgr: use kmemdup

2016-05-19 Thread Muhammad Falak R Wani
Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 6 +++--- 1 file changed, 3 insertions

[PATCH] drm/amd/powerplay/hwmgr: use kmemdup

2016-05-19 Thread Muhammad Falak R Wani
Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 6 +++--- 1 file changed, 3 insertions

[PATCH] drm/amd/powerplay/hwmgr: use kmemdup

2016-05-19 Thread Muhammad Falak R Wani
Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 6 +++--- 1 file changed, 3 insertions

[PATCH] amdgpu/uvd: use kmemdup

2016-05-19 Thread Muhammad Falak R Wani
Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions

[PATCH 5/5] drm/amd/amdgpu : Remove unused variable

2016-05-17 Thread Muhammad Falak R Wani
Remove unused variable 'ret', and directly return 0. Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/tonga_ih.c b/drivers/gpu/drm/amd/amdgpu/tonga_ih.c ind

[PATCH 4/5] drm/amd/amdgpu : Remove unused variable

2016-05-17 Thread Muhammad Falak R Wani
Remove unused variable 'ret', and directly return 0. Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/iceland_ih.c b/drivers/gpu/drm/amd/amdgpu/iceland_

[PATCH 3/5] drm/amd/amdgpu : Remove unused variable

2016-05-17 Thread Muhammad Falak R Wani
Remove unused variable 'ret', and directly return 0. Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/amd/amdgpu/cz_ih.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/cz_ih.c b/drivers/gpu/drm/amd/amdgpu/cz_ih.c index 23bd91

[PATCH 2/5] drm/amd/amdgpu/cz_dpm: Remove unused variable

2016-05-17 Thread Muhammad Falak R Wani
Remove unused variable 'ret' from functions where it was not used anyway, and directly return 0. Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/c

[PATCH 1/5] drm/amd/amdgpu : Remove unused variable

2016-05-17 Thread Muhammad Falak R Wani
Remove unused variable 'ret', and directly return 0. Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/amd/amdgpu/cik_ih.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/cik_ih.c b/drivers/gpu/drm/amd/amdgpu/cik_ih.c ind

[PATCH v2] drm/amd/powerplay: use ARRAY_SIZE() to calculate array size.

2016-05-17 Thread Muhammad Falak R Wani
On Mon, May 16, 2016 at 04:53:50PM +0100, Eric Engestrom wrote: > On Fri, May 13, 2016 at 11:06:40PM +0530, Muhammad Falak R Wani wrote: > > It is preferred to use ARRAY_SIZE() for size calculation, instead > > using sizeof(array)/sizeof(*array). It makes the code more readable.

[PATCH v2] drm/amd/powerplay: use ARRAY_SIZE() to calculate array size.

2016-05-13 Thread Muhammad Falak R Wani
It is preferred to use ARRAY_SIZE() for size calculation, instead using sizeof(array)/sizeof(*array). It makes the code more readable. Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH] drm/amd/powerplay: use ARRAY_SIZE() for size of array

2016-05-13 Thread Muhammad Falak R Wani
On Thu, May 12, 2016 at 12:53:48PM +0300, Jani Nikula wrote: > On Wed, 11 May 2016, Muhammad Falak R Wani wrote: > > Use ARRAY_SIZE() for the size calculation of the array. Also move the > > condition evaulation function out of the for loop. > > Although, any respectable c-co

[PATCH] drm/nouveau/bios: remove unused variable.

2016-05-12 Thread Muhammad Falak R Wani
Remove unused vairable, return 0 explicitly. Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/nouveau/nouveau_bios.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 4dca65a

[PATCH] drm/amd/powerplay: use ARRAY_SIZE() for size of array

2016-05-11 Thread Muhammad Falak R Wani
needs some hand holding. Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c index

[PATCH] drm/nouveau/fence: use RCU_INIT_POINTER() when NULLing.

2016-05-01 Thread Muhammad Falak R Wani
It is safe to use RCU_INIT_POINTER() to NULL, instead of rcu_assign_pointer(). This results in slightly smaller/faster code. The follwoing semantic patch was used: @@ @@ - rcu_assign_pointer + RCU_INIT_POINTER (..., NULL) Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/nouveau

[PATCH] drm/amdgpu: Replace rcu_assign_pointer() with RCU_INIT_POINTER()

2016-05-01 Thread Muhammad Falak R Wani
patch was used: @@ @@ - rcu_assign_pointer + RCU_INIT_POINTER (..., NULL) Signed-off-by: Muhammad Falak R Wani --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd