[PATCH][next] drm/amdgpu: remove redundant assignment to variable ret

2020-05-12 Thread Colin King
From: Colin Ian King The variable ret is being initializeed with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King ---

[PATCH][next] drm/i915: fix incorrect return of an error status

2020-05-18 Thread Colin King
From: Colin Ian King Currently when a call to intel_atomic_get_dbuf_state fails the error value being returns is a potentially uninitialized value in variable ret. Fix this by returning the error value of new_dbuf_state. Addresses-Coverity: ("Uninitialized scalar value") Fixes: 3cf43cdc63fb

[PATCH][next] drm: amd: fix spelling mistake "shoudn't" -> "shouldn't"

2020-03-17 Thread Colin King
From: Colin Ian King There are spelling mistakes in pr_err messages and a comment. Fix these. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c| 2 +- drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 2 +- 3

[PATCH] drm/exynos: remove redundant initialization to variable 'start'

2020-05-07 Thread Colin King
From: Colin Ian King The variable 'start' is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King ---

[PATCH] drm/rockchip: cdn-dp: fix sign extension on an int multiply for a u64 result

2020-09-15 Thread Colin King
From: Colin Ian King The variable bit_per_pix is a u8 and is promoted in the multiplication to an int type and then sign extended to a u64. If the result of the int multiplication is greater than 0x7fff then the upper 32 bits will be set to 1 as a result of the sign extension. Avoid this by

[PATCH] drm/nouveau/bios/init: make two const arrays static, makes object smaller

2020-10-16 Thread Colin King
From: Colin Ian King Don't populate const arrays on the stack but instead make them static. Makes the object code smaller by 7 bytes. Before: textdata bss dec hex filename 1040418284 0 112325 1b6c5 drm/nouveau/nvkm/subdev/bios/init.o After: textdata

[PATCH] drm/mgag200: fix spelling mistake "expeced" -> "expected"

2020-08-26 Thread Colin King
From: Colin Ian King There is a spelling mistake in a drm_warn message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/mgag200/mgag200_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c

[PATCH][next] drm/amd/display: fix potential integer overflow when shifting 32 bit variable bl_pwm

2020-08-18 Thread Colin King
From: Colin Ian King The 32 bit unsigned integer bl_pwm is being shifted using 32 bit arithmetic and then being assigned to a 64 bit unsigned integer. There is a potential for a 32 bit overflow so cast bl_pwm to enforce a 64 bit shift operation to avoid this. Addresses-Coverity:

[PATCH][next] drm/amdgpu/swsmu: fix potential uint32_t multiplication overflow

2020-08-27 Thread Colin King
From: Colin Ian King The calculation of tmp64 is performed using a 32 bit multiply and then is stored in the uint64_t variable tmp64. This indicates that a 64 bit result may be expected, so cast crystal_clock_freq to a uint64_t to ensure a 64 bit multiplication is being performed to avoid any

[PATCH][next] drm/i915: fix size_t greater or equal to zero comparison

2020-10-02 Thread Colin King
From: Colin Ian King Currently the check that the unsigned size_t variable i is >= 0 is always true because the unsigned variable will never be negative, causing the loop to run forever. Fix this by changing the pre-decrement check to a zero check on i followed by a decrement of i.

[PATCH][next] drm/auth: remove redundant assignment to variable ret

2020-05-24 Thread Colin King
From: Colin Ian King The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/gpu/drm/drm_auth.c | 2

[PATCH][next] drm/amdkfd: fix a dereference of pdd before it is null checked

2020-05-28 Thread Colin King
From: Colin Ian King Currently pointer pdd is being dereferenced when assigning pointer dpm and then pdd is being null checked. Fix this by checking if pdd is null before the dereference of pdd occurs. Addresses-Coverity: ("Dereference before null check") Fixes: 522b89c63370 ("drm/amdkfd:

[PATCH] staging: fbtft: fb_st7789v: make HSD20_IPS numeric and not a string

2020-05-21 Thread Colin King
From: Colin Ian King Currently HSD20_IPS is defined as "true" and will always result in a non-zero result even if it is defined as "false" because it is an array and that will never be zero. Fix this by defining it as an integer 1 rather than a literal string. Addessses-Coverity: ("Array

[PATCH] drm/gma500: clean up indentation issues

2020-09-20 Thread Colin King
From: Colin Ian King There are a couple of statements that are indented too deeply, remove the extraneous tabs and also an empty line. Signed-off-by: Colin Ian King --- drivers/gpu/drm/gma500/cdv_intel_dp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH][next] drm/panel: fix null pointer dereference on pointer mode

2020-09-18 Thread Colin King
From: Colin Ian King Currently a null pointer check on pointer mode is passing mode to function drm_mode_vrefresh and this causes a null pointer dereference on mode. Fix this by not calling drm_mode_vrefresh since the call is only required for error reporting. Addresses-Coverity: ("Dereference

[PATCH][next] drm/amd/pm: fix out-of-bound read on pptable->SkuReserved

2020-10-28 Thread Colin King
From: Colin Ian King A recent change added two uint16_t elements to PPTable_t and reduced the uint32_t array down to 8 elements. This results in the dev_info printing of pptable->SkuReserved[8] accessing a value that is out-of-range on array SkuReserved. The array has been shrunk by 1 element,

[PATCH] drm/i915/vlv_dsi_pll: fix spelling mistake "Cant" -> "Can't"

2020-08-10 Thread Colin King
From: Colin Ian King There is a spelling mistake in a drm_err message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/i915/display/vlv_dsi_pll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/vlv_dsi_pll.c

[PATCH] drm/vmwgfx: fix spelling mistake "Cant" -> "Can't"

2020-08-10 Thread Colin King
From: Colin Ian King There is a spelling mistake in a DRM_ERROR message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c

[PATCH][next] drm/amd/display: fix spelling mistake "Usupported" -> "Unsupported"

2020-08-04 Thread Colin King
From: Colin Ian King There are spelling mistakes in two DRM_ERROR error messages. Fix them. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] drm/omap: fix spelling mistake "propert" -> "property"

2020-08-05 Thread Colin King
From: Colin Ian King There is a spelling mistake in a pr_err message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/omapdrm/dss/venc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c index

[PATCH] staging: ion: fix spelling mistake in function name "detatch" -> "detach"

2020-08-05 Thread Colin King
From: Colin Ian King There is a spelling mistake in the function name ion_dma_buf_detatch. Fix it by removing the extraneous t. Signed-off-by: Colin Ian King --- drivers/staging/android/ion/ion.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH] drm/gma500: fix spelling mistake "pannel" -> "panel"

2020-08-05 Thread Colin King
From: Colin Ian King There a handful of spelling mistakes. fix them. Signed-off-by: Colin Ian King --- drivers/gpu/drm/gma500/mdfld_dsi_output.c | 4 ++-- drivers/gpu/drm/gma500/psb_intel_sdvo.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH] omapfb: fix spelling mistake "propert" -> "property"

2020-08-05 Thread Colin King
From: Colin Ian King There is a spelling mistake in a pr_err message. Fix it. Signed-off-by: Colin Ian King --- drivers/video/fbdev/omap2/omapfb/dss/venc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/venc.c

[PATCH] drm/vmwgfx: fix spelling mistake "Cound" -> "Could"

2020-08-05 Thread Colin King
From: Colin Ian King There is a spelling mistake in a DRM_ERROR message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c

[PATCH][next] drm/amdgpu: fix spelling mistake "paramter" -> "parameter"

2020-08-05 Thread Colin King
From: Colin Ian King There is a spelling mistake in a dev_warn message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH] drm/amdgpu: fix spelling mistake "Falied" -> "Failed"

2020-08-05 Thread Colin King
From: Colin Ian King There is a spelling mistake in a DRM_ERROR message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

[PATCH] drm/amd/display: remove redundant initialization of variable result

2020-07-01 Thread Colin King
From: Colin Ian King The variable result is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King ---

[PATCH] drm/virtgpu: remove redundant assignments to width and height

2020-07-01 Thread Colin King
From: Colin Ian King Variables width and height are being assigned values that are never read. The assignments are redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/gpu/drm/virtio/virtgpu_display.c | 2 -- 1 file changed, 2

[PATCH][next] drm/amdgpu: fix spelling mistake "Falied" -> "Failed"

2020-07-10 Thread Colin King
From: Colin Ian King There is a spelling mistake in a DRM_ERROR error message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

[PATCH][next] drm/i915/selftest: fix an error return path where err is not being set

2020-07-13 Thread Colin King
From: Colin Ian King There is an error condition where err is not being set and an uninitialized garbage value in err is being returned. Fix this by assigning err to an appropriate error return value before taking the error exit path. Addresses-Coverity: ("Uninitialized scalar value") Fixes:

[PATCH][next] drm/rockchip: lvds: ensure ret is assigned before checking for an error

2020-07-14 Thread Colin King
From: Colin Ian King Currently there are two places where the return status in ret is being checked for an error however the assignment of ret has been omitted making the checks redundant. Fix this by adding in the missing assignments of ret. Addresses-Coverity: ("Logically dead code") Fixes:

[PATCH][next] drm/i915/selftests: fix spelling mistake "submited" -> "submitted"

2020-06-17 Thread Colin King
From: Colin Ian King There is a spelling mistake in a pr_err message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/i915/gt/selftest_lrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/selftest_lrc.c

[PATCH][next] drm/i915: fix a couple of spelling mistakes in kernel parameter help text

2020-06-16 Thread Colin King
From: Colin Ian King There are a couple of spelling mistakes in kernel parameter help text, namely "helpfull" and "paramters". Fix them. Signed-off-by: Colin Ian King --- drivers/gpu/drm/i915/i915_params.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] drm/amdgpu: remove redundant initialization of variable ret

2020-06-18 Thread Colin King
From: Colin Ian King The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King ---

[PATCH] drm/arm: fix unintentional integer overflow on left shift

2020-06-18 Thread Colin King
From: Colin Ian King Shifting the integer value 1 is evaluated using 32-bit arithmetic and then used in an expression that expects a long value leads to a potential integer overflow. Fix this by using the BIT macro to perform the shift to avoid the overflow. Addresses-Coverity: ("Unintentional

[PATCH] drm/fbdev: fix a memory leak on the dmt_mode object

2020-06-17 Thread Colin King
From: Colin Ian King Object drm_mode is allocated by the call to drm_mode_find_dmt (via the call to drm_mode_duplicate and drm_mode_create). The object is never free'd and hence causes a small memory leak. Fix this by kfree'ing drm_mode once it is no longer required. Addresses-Coverity:

[PATCH][next] drm/mm/selftests: fix unsigned comparison with less than zero

2020-06-17 Thread Colin King
From: Colin Ian King Function get_insert_time can return error values that are cast to a u64. The checks of insert_time1 and insert_time2 check for the errors but because they are u64 variables the check for less than zero can never be true. Fix this by casting the value to s64 to allow of the

[PATCH] drm/radeon: fix array out-of-bounds read and write issues

2020-06-24 Thread Colin King
From: Colin Ian King There is an off-by-one bounds check on the index into arrays table->mc_reg_address and table->mc_reg_table_entry[k].mc_data[j] that can lead to reads and writes outside of arrays. Fix the bound checking off-by-one error. Addresses-Coverity: ("Out-of-bounds read/write")

[PATCH][next] drm: amdgpu: fix premature goto because of missing braces

2020-06-24 Thread Colin King
From: Colin Ian King Currently the goto statement is skipping over a lot of setup code because it is outside of an if-block and should be inside it. Fix this by adding missing if statement braces. Addresses-Coverity: ("Structurally dead code") Fixes: fd151ca5396d ("drm amdgpu: SI UVD v3_1")

[PATCH][next] drm/amdgpu: ensure 0 is returned for success in jpeg_v2_5_wait_for_idle

2020-06-24 Thread Colin King
From: Colin Ian King In the cases where adev->jpeg.num_jpeg_inst is zero or the condition adev->jpeg.harvest_config & (1 << i) is always non-zero the variable ret is never set to an error condition and the function returns an uninitialized value in ret. Since the only exit condition at the end

[PATCH] drm/i915/display: fix missing null check on allocated dsb object

2020-06-16 Thread Colin King
From: Colin Ian King Currently there is no null check for a failed memory allocation on the dsb object and without this a null pointer dereference error can occur. Fix this by adding a null check. Note: added a drm_err message in keeping with the error message style in the function.

[PATCH] drm/ast: fix missing break in switch statement for format->cpp[0] case 4

2020-06-10 Thread Colin King
From: Colin Ian King Currently the switch statement for format->cpp[0] value 4 assigns color_index which is never read again and then falls through to the default case and returns. This looks like a missing break statement bug. Fix this by adding a break statement. Addresses-Coverity: ("Unused

[PATCH] drm/bridge: make array frs_limits static, makes object smaller

2020-06-11 Thread Colin King
From: Colin Ian King Don't populate the array frs_limits on the stack but instead make it static. Makes the object code smaller by 123 bytes Before: textdata bss dec hex filename 234565712 64 292327230 drivers/gpu/drm/bridge/tc358768.o After: textdata

[PATCH][next] drm/amd/display: fix spelling mistake: "propogation" -> "propagation"

2020-06-04 Thread Colin King
From: Colin Ian King There is a spelling mistake in a dml_print message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH][next] drm: xln: fix spelling mistake "failes" -> "failed"

2020-07-24 Thread Colin King
From: Colin Ian King There is a spelling mistake in a dev_dbg messages. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c index

[PATCH][next] drm/amdgpu: fix spelling mistake "Falied" -> "Failed"

2020-07-24 Thread Colin King
From: Colin Ian King There is a spelling mistake in a DRM_ERROR error message. Fix it. Signed-off-by: Colin Ian King --- Can folk please use checkpatch, it should catch these errors. --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] drm/amd/display: remove redundant initialization of variable result

2020-07-23 Thread Colin King
From: Colin Ian King The variable result is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 2 +-

[PATCH] video: fbdev: fix setting of pixclock because a pass-by-value error

2020-07-23 Thread Colin King
From: Colin Ian King The pixclock is being set locally because it is being passed as a pass-by-value argument rather than pass-by-reference, so the computed pixclock is never being set in var->pixclock. Fix this by passing by reference. [This dates back to 2002, I found the offending commit

[PATCH][next] drm/amdgpu: Add missing BOOTUP_DEFAULT to profile_name[]

2021-01-11 Thread Colin King
From: Colin Ian King A recent change added a new BOOTUP_DEFAULT power profile mode to the PP_SMC_POWER_PROFILE enum but omitted updating the corresponding profile_name array. Fix this by adding in the missing BOOTUP_DEFAULT to profile_name[]. Addresses-Coverity: ("Out-of-bounds read") Fixes:

[PATCH][next] drm/amdgpu: Fix sizeof() mismatch in bps_bo kmalloc_array creation

2020-11-25 Thread Colin King
From: Colin Ian King An incorrect sizeof() is being used, sizeof((*data)->bps_bo) is not correct, it should be sizeof(*(*data)->bps_bo). It just so happens to work because the sizes are the same. Fix it. Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)") Fixes: 5278a159cf35

[PATCH][next] drm/mediatek: avoid dereferencing a null hdmi_phy on an error message

2020-12-07 Thread Colin King
From: Colin Ian King Currently there is a null pointer check for hdmi_phy that implies it may be null, however a dev_err messages dereferences this potential null pointer. Avoid a null pointer dereference by only emitting the dev_err message if hdmi_phy is non-null. It is a moot point if the

[PATCH][next] drm/mcde: fix masking and bitwise-or on variable val

2020-11-24 Thread Colin King
From: Colin Ian King The masking of val with ~MCDE_CRX1_CLKSEL_MASK is currently being ignored because there seems to be a missing bitwise-or of val in the following statement. Fix this by replacing the assignment of val with a bitwise-or. Addresses-Coverity: ("Unused valued") Fixes:

[PATCH] drm/amdgpu: Fix spelling mistake "Heterogenous" -> "Heterogeneous"

2020-12-15 Thread Colin King
From: Colin Ian King There is a spelling mistake in a comment in the Kconfig. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdkfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/Kconfig

[PATCH][next] drm/kmb: fix array out-of-bounds writes to kmb->plane_status[]

2020-11-13 Thread Colin King
From: Colin Ian King Writes to elements in the kmb->plane_status array in function kmb_plane_atomic_disable are overrunning the array when plane_id is more than 1 because currently the array is KMB_MAX_PLANES elements in size and this is currently #defined as 1. Fix this by defining

[PATCH][next] drm/kmb: fix potential integer overflow on multiplication

2020-11-13 Thread Colin King
From: Colin Ian King There is a potential integer overflow when multiplying various sized integers that are cast to u32 integers using u32 multiplication and then assigning the result to a u64. Fix this by casting MIPI_TX_BPP to a u64 to force the multiplication to use u64 math and hence avoid

[PATCH][next] drm/atomic: avoid null pointer dereference on pointer crtc

2020-11-16 Thread Colin King
From: Colin Ian King Since moving to the new debug helper functions we now have a debug message that dereferences crtc to print a kernel debug message when crtc is null and so this debug message will now cause a null pointer dereference. Since this is a debug message it probably is just simplest

[PATCH][next] drm/selftests/test-drm_dp_mst_helper: fix memory leak allocated to 'out'

2020-11-18 Thread Colin King
From: Colin Ian King Currently when txmsg fails to allocate then there is a leak on 'out'. Fix this by setting result to false and exiting via the clean up exit path. Note since txmsg is NULL at this point, the kfree of txmsg is a no-op. Addresses-Coverity: ("Resource leak") Fixes: 09234b88ef55

[PATCH][next] drm/amd/pm: fix spelling mistakes in dev_warn messages

2020-11-17 Thread Colin King
From: Colin Ian King There are two spelling mistakes in dev_warn messages. Fix these. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c

[PATCH][next] drm/kmb: fix spelling mistakes in drm_info and drm_dbg messages

2020-11-09 Thread Colin King
From: Colin Ian King There are two spelling mistakes of the word sync in drm_info and drm_dbg messages. Fix these. Signed-off-by: Colin Ian King --- drivers/gpu/drm/kmb/kmb_crtc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/kmb/kmb_crtc.c

[PATCH] drm/amd/powerplay: fix spelling mistake "smu_state_memroy_block" -> "smu_state_memory_block"

2020-11-23 Thread Colin King
From: Colin Ian King The struct name smu_state_memroy_block contains a spelling mistake, rename it to smu_state_memory_block Fixes: 8554e67d6e22 ("drm/amd/powerplay: implement power_dpm_state sys interface for SMU11") Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h

[PATCH][next] drm/ttm: fix spelling mistake "swaput" -> "swapout"

2020-11-12 Thread Colin King
From: Colin Ian King There is a spelling mistake in a warning message, fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/ttm/ttm_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index

[PATCH][next] drm/amdgpu: fix spelling mistake: "Successed" -> "Succeeded"

2020-11-02 Thread Colin King
From: Colin Ian King There is a spelling mistake in a deb_dbg message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c

[PATCH][next] drm/amdgpu: Fix masking binary not operator on two mask operations

2021-01-22 Thread Colin King
From: Colin Ian King Currently the ! operator is incorrectly being used to flip bits on mask values. Fix this by using the bit-wise ~ operator instead. Addresses-Coverity: ("Logical vs. bitwise operator") Fixes: 3c9a7b7d6e75 ("drm/amdgpu: update mmhub mgcg for mmhub_v2_3") Signed-off-by: Colin

[PATCH][next] drm/i915/hdcp: Fix return of value in uninitialized variable ret

2021-01-22 Thread Colin King
From: Colin Ian King Currently when there are other connectors on the port using HDCP the function _intel_hdcp_disable returns a garbage uninitialized value in variable ret. I believe the intention is to return 0, so return this literal value instead of the value in ret. Addresses-Coverity:

[PATCH][next] drm/amd/display: Fix spelling mistake of function name

2021-01-20 Thread Colin King
From: Colin Ian King There are two spelling mistakes of the function name, fix this by using __func__ instead of a hard coded name string. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH][next] drm/i915/dp: fix spelling contraction "couldnt" -> "couldn't"

2021-01-15 Thread Colin King
From: Colin Ian King There is a spelling contraction mistake in a drm_dbg message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/i915/display/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c

[PATCH][next] drm/vkms: Fix missing kmalloc allocation failure check

2021-01-15 Thread Colin King
From: Colin Ian King Currently the kmalloc allocation for config is not being null checked and could potentially lead to a null pointer dereference. Fix this by adding the missing null check. Addresses-Coverity: ("Dereference null return value") Fixes: 2df7af93fdad ("drm/vkms: Add vkms_config

[PATCH][next] drm/amdgpu: Fix memory leak of object caps on error return paths

2021-01-29 Thread Colin King
From: Colin Ian King Currently there are three error return paths that don't kfree object caps. Fix this by performing the allocation of caps after the checks and error return paths to avoid the premature allocation and memory leaking. Addresses-Coverity: ("Resource leak") Fixes: 555fc7fbb2a2

[PATCH][next] drm/i915/display: fix spelling mistake "Couldnt" -> "Couldn't"

2021-02-03 Thread Colin King
From: Colin Ian King There is a spelling mistake in a drm_dbg message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/i915/display/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c

[PATCH][next] drm/nouveau/fifo/tu102: Fix potential array out of bounds access error

2021-02-03 Thread Colin King
From: Colin Ian King Currently the for_each_set_bit loop is iterating index engn from 0..31 and calls to tu102_fifo_recover_engn can potentiall access fifo->engine[engn] where engn is larger than the array engine (which is currently hard coded as 16 elements). Avoid any potential array out of

[PATCH][next] drm/amd/display: Fix two spelling mistakes, clean wide lines

2021-06-07 Thread Colin King
From: Colin Ian King There are two spelling mistakes in dml_print messages, fix these and clear up checkpatch warning on overly wide line length. Signed-off-by: Colin Ian King --- .../drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c | 10 ++ 1 file changed, 6 insertions(+), 4

[PATCH] drm/gma500/oaktrail_lvds: replace continue with break

2021-06-18 Thread Colin King
From: Colin Ian King Currently a loop scans through the connector list checking for connectors that do not match a specific criteria. The use of the continue statement is a little unintuitive and can confuse static analysis checking. Invert the criteria matching logic and use a break to

[PATCH] drm: qxl: ensure surf.data is ininitialized

2021-06-08 Thread Colin King
From: Colin Ian King The object surf is not fully initialized and the uninitialized field surf.data is being copied by the call to qxl_bo_create via the call to qxl_gem_object_create. Set surf.data to zero to ensure garbage data from the stack is not being copied. Addresses-Coverity:

[PATCH] drm: bridge: make a const array static, makes object smaller

2021-05-05 Thread Colin King
From: Colin Ian King Don't populate the const array frs_limits on the stack but instead it static. Makes the object code smaller by 128 bytes: Before: textdata bss dec hex filename 248357440 64 323397e53 drivers/gpu/drm/bridge/tc358768.o After: text

[PATCH][next] drm/vmwgfx: Fix memory leak of object fifo on error return

2021-05-12 Thread Colin King
From: Colin Ian King In the case where fifo->static_buffer fails to be allocated the error return path neglects to kfree the fifo object. Fix this by adding in the missing kfree. Addresses-Coverity: ("Resource leak") Fixes: 2cd80dbd3551 ("drm/vmwgfx: Add basic support for SVGA3") Signed-off-by:

[PATCH][next] drm: simpledrm: Fix use after free issues

2021-05-12 Thread Colin King
From: Colin Ian King There are two occurrances where objects are being free'd via a put call and yet they are being referenced after this. Fix these by adding in the missing continue statement so that the put on the end of the loop is skipped over. Addresses-Coverity: ("Use after free") Fixes:

[PATCH][next] drm/amdgpu/acpi: Fix null check on memory allocation

2021-05-20 Thread Colin King
From: Colin Ian King The current null check is checking the wrong pointer atif. Fix this to check the correct pointer atcs. Addresses-Coverity: ("Uninitialized pointer read") Fixes: c1c4d8efddde ("drm/amdgpu/acpi: unify ATCS handling (v2)") Signed-off-by: Colin Ian King ---

[PATCH][V2][next] drm/vmwgfx: Fix memory allocation check and a leak of object fifo

2021-05-14 Thread Colin King
From: Colin Ian King The allocation of fifo is lacking an allocation failure check, so fix this by adding one. In the case where fifo->static_buffer fails to be allocated the error return path neglects to kfree the fifo object. Fix this by adding in the missing kfree. Kudos to Dan Carpenter

[PATCH][next] nouveau/svm: Fix missing failure check on call to make_device_exclusive_range

2021-05-26 Thread Colin King
From: Colin Ian King The call to make_device_exclusive_range can potentially fail leaving pointer page not initialized that leads to an uninitialized pointer read issue. Fix this by adding a check to see if the call failed and returning the error code. Addresses-Coverity: ("Uninitialized

[PATCH] drm/amdgpu: remove redundant assignment of variable k

2021-06-03 Thread Colin King
From: Colin Ian King The variable k is being assigned a value that is never read, the assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] drm/amd/display: remove variable active_disp

2021-06-03 Thread Colin King
From: Colin Ian King The variable active_disp is being initialized with a value that is never read, it is being re-assigned immediately afterwards. Clean up the code by removing the need for variable active_disp. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King ---

[PATCH] drm/nouveau: Remove redundant error check on variable ret

2021-07-02 Thread Colin King
From: Colin Ian King The call to drm_dp_aux_init never returns an error code and there is no error return being assigned to variable ret. The check for an error in ret is always false since ret is still zero from the start of the function so the init error check and error message is redundant

[PATCH][next] drm/amdkfd: Fix spelling mistake "unregisterd" -> "unregistered"

2021-04-26 Thread Colin King
From: Colin Ian King There is a spelling mistake in a pr_debug message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c

[PATCH][next] drm/amdkfd: fix uint32 variable compared to less than zero

2021-04-22 Thread Colin King
From: Colin Ian King Currently the call to kfd_process_gpuidx_from_gpuid is returning an int value and this is being assigned to a uint32_t variable gpuidx and this is being checked for a negative error return which is always going to be false. Fix this by making gpuidx an int32_t. This makes

[PATCH][next] drm/amdkfd: remove redundant initialization to variable r

2021-04-22 Thread Colin King
From: Colin Ian King The variable r is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King ---

[PATCH][next] drm/nouveau/nvkm: Fix spelling mistake "endianess" -> "endianness"

2021-05-04 Thread Colin King
From: Colin Ian King There is a spelling mistake in a nvdev_error message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c

[PATCH] drm/amdgpu: fix potential integer overflow on shift of a int

2021-02-07 Thread Colin King
From: Colin Ian King The left shift of int 32 bit integer constant 1 is evaluated using 32 bit arithmetic and then assigned to an unsigned 64 bit integer. In the case where *frag is 32 or more this can lead to an oveflow. Avoid this by shifting 1ULL. Addresses-Coverity: ("Unintentional integer

[PATCH][next] drm/i915/display: Fix spelling mistake "Couldnt" -> "Couldn't"

2021-02-09 Thread Colin King
From: Colin Ian King There is a spelling mistake in a drm_dbg message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/i915/display/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c

[PATCH][next] drm/amd/pm: fix spelling mistake in various messages "power_dpm_force_perfomance_level"

2021-02-10 Thread Colin King
From: Colin Ian King There are spelling mistakes in error and warning messages, the text power_dpm_force_perfomance_level is missing a letter r and should be power_dpm_force_performance_level. Fix them. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c |

[PATCH][next] drm/amd/display/dc/calcs/dce_calcs: Fix allocation size for dceip and vbios

2021-03-23 Thread Colin King
From: Colin Ian King Currently the allocations for dceip and vbios are based on the size of the pointer rather than the size of the data structures, causing heap issues. Fix this by using the correct allocation sizes. Addresses-Coverity: ("Wrong size of argument") Fixes: a2a855772210

[PATCH] i915: Fix uninitialized variable err

2021-03-29 Thread Colin King
From: Colin Ian King In the case where !sg_dma_len(sgl) breaks out of the do-while loop on the first iteration, error variable err has not been assigned any value and will contain garbage. Fix this by ensuring err is initialized to zero. Addresses-Coverity: ("Uninitialized scalar variable")

[PATCH][next] drm/i915: Fix an uninitialized variable issue

2021-04-01 Thread Colin King
From: Colin Ian King Currently there is a while loop that contains a handful of continue statements that can skip over the assignment of the variable err. At the end of the loop there is a potiential for err to be unassigned and possibly causing issues when err is checked for a non-zero value.

[PATCH][next] drm/amd/display: remove redundant initialization of variable status

2021-03-31 Thread Colin King
From: Colin Ian King The variable status is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Also clean up an indentation. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King ---

[PATCH][next] drm/msm: Fix spelling mistake "Purgable" -> "Purgeable"

2021-04-06 Thread Colin King
From: Colin Ian King There is a spelling mistake in debugfs gem stats. Fix it. Also re-align output to cater for the extra 1 character. Signed-off-by: Colin Ian King --- drivers/gpu/drm/msm/msm_gem.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH] drm/amd/display: remove redundant initialization of variable result

2021-03-11 Thread Colin King
From: Colin Ian King The variable result is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King ---

[PATCH][next] drm/amdgpu: Fix spelling mistake "disabed" -> "disabled"

2021-03-11 Thread Colin King
From: Colin Ian King There is a spelling mistake in a drm debug message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH][next] drm/amd/pm: Fix spelling mistake "disble" -> "disable"

2021-03-12 Thread Colin King
From: Colin Ian King There is a spelling mistake in an assert message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c

[PATCH][next] drm/amd/display: fix the return of the uninitialized value in ret

2021-03-02 Thread Colin King
From: Colin Ian King Currently if stream->signal is neither SIGNAL_TYPE_DISPLAY_PORT_MST or SIGNAL_TYPE_DISPLAY_PORT then variable ret is uninitialized and this is checked for > 0 at the end of the function. Ret should be initialized, I believe setting it to zero is a correct default.

[PATCH] drm/radeon: fix copy of uninitialized variable back to userspace

2021-03-02 Thread Colin King
From: Colin Ian King Currently the ioctl command RADEON_INFO_SI_BACKEND_ENABLED_MASK can copy back uninitialised data in value_tmp that pointer *value points to. This can occur when rdev->family is less than CHIP_BONAIRE and less than CHIP_TAHITI. Fix this by adding in a missing -EINVAL so that

[PATCH][next] drm/amdgpu/display: remove redundant continue statement

2021-03-03 Thread Colin King
From: Colin Ian King The continue statement in a for-loop is redudant and can be removed. Clean up the code to address this. Addresses-Coverity: ("Continue as no effect") Fixes: b6f91fc183f7 ("drm/amdgpu/display: buffer INTERRUPT_LOW_IRQ_CONTEXT interrupt work") Signed-off-by: Colin Ian King

<    1   2   3   4   5   >