[PATCH][next] drm/i915/xelpd: Fix unsigned compared to less than zero error

2021-07-20 Thread Colin King
From: Colin Ian King The subtraction of fw->size - offset is operating on two unsigned integers and the result is unsigned and hence the less than zero comparison will always to be false. Fix this by casting fw->size from a size_t to a ssize_t to ensure the result can be signed to allow a less th

[PATCH] video: fbdev: arcfb: remove redundant initialization of variable err

2021-07-21 Thread Colin King
From: Colin Ian King The variable err is being initialized with 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/video/fbdev/arcfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH][next] drm: Fix space indentations, replace with tabs

2021-07-21 Thread Colin King
From: Colin Ian King A couple of statements are indented with spaces, clean this up by replacing spaces with tabs. Signed-off-by: Colin Ian King --- drivers/gpu/drm/drm_ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm

[PATCH] drm/amdgpu/pm: use linux/processor.h instead of asm/processor.h

2021-04-16 Thread Colin King
From: Colin Ian King Checkpatch reported that linux/processor.h should be included instead of the asm variant. Fix this to clean up the warning. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/

[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 gpu

[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 --- drivers/gpu/drm/amd/amdkfd/kfd_mig

[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 b/drivers/gpu/drm/amd/amdkfd/kfd_svm.

[PATCH] drm/amd/display: Remove redundant initialization of variable eng_id

2021-08-06 Thread Colin King
From: Colin Ian King The variable eng_id is being initialized with a value that is never read, it is being re-assigned on the next statment. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/display/dc/cor

[PATCH][next] drm/amd/pm: Fix spelling mistake "firwmare" -> "firmware"

2021-08-17 Thread Colin King
From: Colin Ian King There is a spelling mistake in a dev_err error message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c b/drivers/gp

[PATCH][next] drm/mgag200: Fix uninitialized variable delta

2021-08-17 Thread Colin King
From: Colin Ian King The variable delta is not initialized and this will cause unexpected behaviour with the comparison of tmpdelta < delta. Fix this by setting it to 0x. This matches the behaviour as in the similar function mgag200_pixpll_compute_g200se_04. Addresses-Coverity: ("Uniniti

[PATCH] drm/bridge/tc358767: make the array ext_div static const, makes object smaller

2021-08-19 Thread Colin King
From: Colin Ian King Don't populate the array ext_div on the stack but instead it static const. Makes the object code smaller by 118 bytes: Before: textdatabss dechex filename 39449 17500128 57077 def5 ./drivers/gpu/drm/bridge/tc358767.o After: textdata

[PATCH][next] drm/amd/display: fix spelling mistake "alidation" -> "validation"

2021-08-25 Thread Colin King
From: Colin Ian King There is a spelling mistake in a DC_LOG_WARNING message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.

[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 ("drm/amd/d

[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") Fixe

[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/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. Fi

[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 a/drivers/gpu/drm/ms

[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 b/drivers/gpu/drm/i9

[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 ty

[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 a/dri

[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&ls for mmhub_v2_3") Signed-off-by: Coli

[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: ("U

[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 b/drivers/gpu/drm/i915/display/i

[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 bo

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

2021-02-04 Thread Colin King
From: Colin Ian King Don't populate the const array m_div_val on the stack but instead make it static. Makes the object code smaller by 29 bytes: Before: textdata bss dechex filename 347364552 0 39288 9978 drivers/gpu/drm/mgag200/mgag200_mode.o After: textdata

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

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

[PATCH][V2] drm/mgag200: make a const array static, makes object smaller

2021-02-04 Thread Colin King
From: Colin Ian King Don't populate the const array m_div_val on the stack but instead make it static. Makes the object code smaller by 29 bytes: Before: textdata bss dechex filename 347364552 0 39288 9978 drivers/gpu/drm/mgag200/mgag200_mode.o After: textdata

[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 b/drivers/gpu/drm/i915/display/i

[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 | 2

[PATCH][next] drm/i915/hdcp: Fix null pointer dereference of connector->encoder

2021-02-23 Thread Colin King
From: Colin Ian King The recent commit 6c63e6e14da7 ("drm/i915/hdcp: No HDCP when encoder is't initialized") added a null pointer check on connector->encoder hence implying that it could potentially be null. This means that the initialization of dig_port via the call intel_attached_dig_port may

[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. Addresses

[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 -

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

2021-03-03 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. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/display/

[PATCH] qxl: Fix uninitialised struct field head.surface_id

2021-03-04 Thread Colin King
From: Colin Ian King The surface_id struct field in head is not being initialized and static analysis warns that this is being passed through to dev->monitors_config->heads[i] on an assignment. Clear up this warning by initializing it to zero. Addresses-Coverity: ("Uninitialized scalar variable"

[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 b/drivers/gpu/drm/amd/am

[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 --- drivers/gpu/drm/amd/display/

[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 b/driver

[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 b/driver

[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: textdat

[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: 1

[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 for

[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 --- drivers/gpu/drm/amd

[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: d795fd3220

[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 ("drm/am

[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 er

[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 and

[PATCH] drm/amd/powerplay: remove redundant assignment to usTMax

2021-07-14 Thread Colin King
From: Colin Ian King Struct element usTMax is being assigned a hard coded value that is never read and it is being re-assigned a new value immediately afterwards. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/gpu/

[PATCH] drm/amdgpu/display: make a const array common_rates static, makes object smaller

2021-07-15 Thread Colin King
From: Colin Ian King Don't populate the const array common_rates on the stack but instead it static. Makes the object code smaller by 80 bytes: Before: textdata bss dec hex filename 268019 98322 256 366597 59805 ../display/amdgpu_dm/amdgpu_dm.o After: textdat

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

2021-07-15 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 251557440 64 326597f93 ./drivers/gpu/drm/bridge/tc358768.o After: textd

[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 b/drivers/g

[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 e6bcbfe530ec..d32c

[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 KMB_MAX_PLAN

[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 an

[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/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 b/d

[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] 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] drm: i810: Fix spelling mistake "constext" -> "context"

2021-08-27 Thread Colin King
From: Colin Ian King There is a spelling mistake in a printk message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/i810/i810_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c index 9fb4dd6334

[PATCH] drm/amdgpu/swsmu: fix spelling mistake "minimun" -> "minimum"

2021-08-27 Thread Colin King
From: Colin Ian King There are three identical spelling mistakes in dev_err messages. Fix these. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 2 +- drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 2 +- drivers/gpu/drm/amd/pm/swsmu/smu13/yellow

[PATCH][next] drm/amd/display: Fix unused initialization of pointer sink

2021-08-29 Thread Colin King
From: Colin Ian King Pointer sink is being inintialized with a value that is never read, it is later being re-assigned a new value. Remove the redundant initialization. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2

[PATCH][next] drm/amdgpu: clean up inconsistent indenting

2021-09-02 Thread Colin King
From: Colin Ian King There are a couple of statements that are indented one character too deeply, clean these up. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdg

[PATCH][next] drm/amdgpu: sdma: clean up identation

2021-09-02 Thread Colin King
From: Colin Ian King There is a statement that is indented incorrectly. Clean it up. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c b/drivers/gpu/drm/am

[PATCH][next] drm/i915: clean up inconsistent indenting

2021-09-02 Thread Colin King
From: Colin Ian King There is a statement that is indented one character too deeply, clean this up. Signed-off-by: Colin Ian King --- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/intel_execlists

[PATCH] drm/radeon/ci_dpm: Remove redundant initialization of variables hi_sidd, lo_sidd

2021-09-07 Thread Colin King
From: Colin Ian King The variables hi_sidd and lo_sidd are being initialized with a values that are never read, they are being updated later on. The assignments are redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/gpu/drm/radeon/ci_dp

[PATCH] video: fbdev: atyfb: Remove assigned but never used variable statements

2021-09-10 Thread Colin King
From: Colin Ian King There are a couple of statements where local variables are being assigned values that are never read because the function returns immediately after the assignment. Clean up the code by removing them. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- dr

[PATCH][next] drm/i915: make array states static const

2021-09-15 Thread Colin King
From: Colin Ian King Don't populate the read-only array states on the stack but instead it static. Also makes the object code smaller. Signed-off-by: Colin Ian King --- drivers/gpu/drm/i915/display/intel_display_power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver

[PATCH] drm/radeon: make array encoded_lanes static

2021-09-15 Thread Colin King
From: Colin Ian King Don't populate the read-only array encoded_lanes on the stack but instead it static. Also makes the object code smaller by 97 bytes: Before: textdatabss dechex filename 388998064 0 46963 b773 ./drivers/gpu/drm/radeon/r600_dpm.o After: te

[PATCH] drm/vmwgfx: Fix spelling mistake "vmw_surface_cach" -> "vmw_surface_cache"

2021-09-16 Thread Colin King
From: Colin Ian King There is a spelling mistake in the cache argument in the comment block, fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/vmwgfx/vmw_surface_cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vmwgfx/vmw_surface_cache.h b/dr

[PATCH][next] drm/i915: Fix dereference of pointer backup before it is null checked

2021-10-12 Thread Colin King
From: Colin Ian King The assignment of pointer backup_bo dereferences pointer backup before backup is null checked, this could lead to a null pointer dereference issue. Fix this by only assigning backup_bo after backup has been null checked. Addresses-Coverity: ("Dereference before null check")

[PATCH][next] drm/rockchip: Remove redundant assignment of pointer connector

2021-09-22 Thread Colin King
From: Colin Ian King The pointer connector is being assigned a value that is never read, it is being updated immediately afterwards. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/gpu/drm/rockchip/rockchip_rgb.c |

[PATCH] video: fbdev: via: Fix spelling mistake "bellow" -> "below"

2021-09-24 Thread Colin King
From: Colin Ian King There is a spelling mistake in a debug message. Fix it. Signed-off-by: Colin Ian King --- drivers/video/fbdev/via/lcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/via/lcd.c b/drivers/video/fbdev/via/lcd.c index 088b962076b5..bee

[PATCH] drm/i915/gvt: Fix spelling mistake "Unsupport" -> "Unsupported"

2021-09-24 Thread Colin King
From: Colin Ian King There is a spelling mistake in a gvt_vgpu_err error message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/i915/gvt/handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/ha

[PATCH] drm/i915/gt: return NULL rather than a plain 0 integer

2021-09-25 Thread Colin King
From: Colin Ian King Function gen7_ctx_vma returns a pointer to struct i915_vma, so returning a plain 0 integer isn't good practice. Fix this by returning a NULL instead. Signed-off-by: Colin Ian King --- drivers/gpu/drm/i915/gt/intel_ring_submission.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] video: fbdev: pxa168fb: Initialize pointers with NULL and not plain integer 0

2021-09-25 Thread Colin King
From: Colin Ian King Pointers info and fbi are being initialized with plain integer zeros. Fix this by initializing them with NULLs. Signed-off-by: Colin Ian King --- drivers/video/fbdev/pxa168fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/pxa1

[PATCH] drm/msm/dp: Remove redundant initialization of variable bpp

2021-09-29 Thread Colin King
From: Colin Ian King The variable bpp is being initialized with a value that is never read, it is being updated later on in both paths of an if statement. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/gpu/drm/msm/

[PATCH] drm/msm/mdp4: Fix potential integer overflow on 32 bit multiply

2021-09-29 Thread Colin King
From: Colin Ian King In the case where clock is 2147485 or greater the 32 bit multiplication by 1000 will cause an integer overflow. Fix this by making the constant 1000 a long to ensure a long multiply occurs to avoid the overflow before assigning the result to the long result in variable reques

[PATCH][V2] drm/msm: Fix potential integer overflow on 32 bit multiply

2021-09-29 Thread Colin King
From: Colin Ian King In the case where clock is 2147485 or greater the 32 bit multiplication by 1000 will cause an integer overflow. Fix this by making the constant 1000 an unsigned long to ensure a long multiply occurs to avoid the overflow before assigning the result to the long result in varia

[PATCH] drm/msm: Fix null pointer dereference on pointer edp

2021-09-29 Thread Colin King
From: Colin Ian King The initialization of pointer dev dereferences pointer edp before edp is null checked, so there is a potential null pointer deference issue. Fix this by only dereferencing edp after edp has been null checked. Addresses-Coverity: ("Dereference before null check") Fixes: ab5b0

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

2021-09-30 Thread Colin King
From: Colin Ian King The left shift of unsigned int 32 bit integer constant 1 is evaluated using 32 bit arithmetic and then assigned to a signed 64 bit integer. In the case where i is 32 or more this can lead to an overflow. Fix this by shifting the value 1ULL instead. Addresses-Coverity: ("Unin

[PATCH][next] drm/virtio: fix another potential integer overflow on shift of a int

2021-09-30 Thread Colin King
From: Colin Ian King The left shift of unsigned int 32 bit integer constant 1 is evaluated using 32 bit arithmetic and then assigned to a signed 64 bit integer. In the case where value is 32 or more this can lead to an overflow (value can be in range 0..MAX_CAPSET_ID (63). Fix this by shifting th

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

2021-10-07 Thread Colin King
From: Colin Ian King The variable result is being initialized with a value that is never read, it is being updated immediately afterwards in both branches of an if statement. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King ---

[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 b/drivers/gpu/drm/amd/amdkfd/Kconfi

[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: c2

[PATCH] drm/hisilicon: add back missing } on ade_dc_ops

2016-08-17 Thread Colin King
From: Colin Ian King Fix build error by adding back the closing } on ade_dc_ops which got accidentally removed from an earlier commit. Fixes: d25bcfb8c2e18b9b36 ("Don't set drm_device->platformdev") Signed-off-by: Colin Ian King --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 2 +- 1 fil

[PATCH][next] drm/amdgpu: fix spelling mistake "retrived" -> "retrieved"

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

[PATCH][next] drm/amdgpu: fix return of an uninitialized value in variable ret

2019-05-10 Thread Colin King
From: Colin Ian King In the case where is_enable is false and lo_base_addr is non-zero the variable ret has not been initialized and is being checked for non-zero and potentially garbage is being returned. Fix this by not returning ret but instead returning -EINVAL on the zero lo_base_addr case.

[PATCH] drm/amd/display: remove redundant assignment to variable actual_clock

2019-05-11 Thread Colin King
From: Colin Ian King The variable actual_clock is being initialized however this is never read and later it is being reassigned to a new value. The initialization is redundant and hence can be removed. Addresses-Coverity: ("Unused Value") Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/d

[PATCH] drm/nouveau/bios/init: fix spelling mistake "CONDITON" -> "CONDITION"

2019-05-14 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/nouveau/nvkm/subdev/bios/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c b/drivers/gpu/dr

[PATCH][next] drm/i915/gtt: set err to -ENOMEM on memory allocation failure

2019-05-24 Thread Colin King
From: Colin Ian King Currently when the allocation of ppgtt->work fails the error return path via err_free returns an uninitialized value in err. Fix this by setting err to the appropriate error return of -ENOMEM. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: d3622099c76f ("drm/i9

[PATCH][next] drm/i915: fix uninitialized variable 'mask'

2019-05-29 Thread Colin King
From: Colin Ian King Currently mask is not initialized and so data is being bit-wise or'd into a garbage value. Fix this by inintializing mask to zero. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 1ac159e23c2c ("drm/i915: Expand subslice mask") Signed-off-by: Colin Ian King ---

[PATCH] drm/amdgpu: fix spelling mistake "gateing" -> "gating"

2019-04-16 Thread Colin King
From: Colin Ian King There is a spelling mistake in a DRM_INFO message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v2

[PATCH] drm/amd/amdgpu: fix spelling mistake "recieve" -> "receive"

2019-04-18 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/amd/amdgpu/mxgpu_vi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c b/drivers/gpu/drm/amd/amdgpu/mxgpu_vi

[PATCH] drm/i915: fix spelling mistake "resseting" -> "resetting"

2019-04-18 Thread Colin King
From: Colin Ian King There is a spelling mistake in a gvt_dbg_core debug message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/i915/gvt/vgpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gvt/vgpu.c b/drivers/gpu/drm/i915/gvt/vgpu.c inde

[PATCH] drm/nouveau/fb/ramgk104: fix spelling mistake "sucessfully" -> "successfully"

2019-04-18 Thread Colin King
From: Colin Ian King There is a spelling mistake in a nvkm_debug message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c b/drivers

[PATCH][next] drm/amd/display: fix incorrect null check on pointer

2019-04-26 Thread Colin King
From: Colin Ian King Currently an allocation is being made but the allocation failure check is being performed on another pointer. Fix this by checking the correct pointer. Also use the normal kernel idiom for null pointer checks. Addresses-Coverity: ("Resource leak") Fixes: 43e3ac8389ef ("drm/a

[PATCH][drm-next] drm/amd/amdgpu: fix spelling mistake "matech" -> "match"

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

  1   2   3   4   5   >