[PATCH] drm/gma500: Remove null check before kfree

2017-08-30 Thread Himanshu Jha
kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/gpu/drm/gma500/cdv_intel_dp.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/gma500/cdv_intel_dp.c b/drive

[PATCH] drm/i915/opregion: Remove null check before kfree

2017-08-30 Thread Himanshu Jha
kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/gpu/drm/i915/intel_opregion.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drive

[PATCH] drm/amd/powerplay: remove unnecessary call to memset

2017-09-12 Thread Himanshu Jha
, e2); Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- .../drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 20 1 file changed, 20 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c b/drivers/gpu/drm/amd/powerplay

[PATCH] drm/sun4i: Use PTR_ERR_OR_ZERO

2017-08-29 Thread Himanshu Jha
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/gpu/drm/sun4i/sun4i_dotclock.c | 5 + drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c | 5 + drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 5 + 3

[PATCH] drm: omapdrm: hdmi: Use PTR_ERR_OR_ZERO

2017-08-29 Thread Himanshu Jha
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 5 + drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 5 + drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 5 + drivers/g

[PATCH] drm/amd/powerplay/hwmgr: Remove null check before kfree

2017-08-29 Thread Himanshu Jha
kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 6 +- .../gpu/drm/amd/powerplay/hwmgr/processpptables.c | 96 -- drivers/gpu/d

[PATCH] drm/amdkfd: remove memset before memcpy

2017-08-29 Thread Himanshu Jha
calling memcpy immediately after memset with the same region of memory makes memset redundant. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/

[PATCH] drm/amd: Remove null check before kfree

2017-08-29 Thread Himanshu Jha
Kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 6 ++ drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 6 ++ 2 files changed, 4 insertions

[PATCH] fbdev: auo_k190x: Use zeroing memory allocator than allocator/memset

2018-01-03 Thread Himanshu Jha
Use vzalloc for allocating zeroed memory and remove unnecessary memset function. Done using Coccinelle. Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci 0-day tested with no failures. Suggested-by: Luis R. Rodriguez <mcg...@kernel.org> Signed-off-by: Himanshu Jha <himan

[PATCH] drm/vmwgfx: Use kasprintf

2018-03-07 Thread Himanshu Jha
Use kasprintf instead of combination of kmalloc and sprintf. Also, remove the local variables used for storing the string length as they are not required now. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 13 +++-- 1 file chan