re: drm: panel: Add driver for Himax HX8279 DDIC panels

2025-04-22 Thread Colin King (gmail)
Hi, static analysis on today's linux-next has found two issues with the following commit: commit 38d42c261389985e8dd4739dbd97e2dc855e8dd0 Author: AngeloGioacchino Del Regno Date: Mon Apr 14 10:29:18 2025 +0200 drm: panel: Add driver for Himax HX8279 DDIC panels In the following code,

Re: [PATCH][next] ice: make const read-only array dflt_rules static

2025-03-17 Thread Colin King (gmail)
Ignore, managed to mangle two commits into one. On 17/03/2025 14:46, Colin Ian King wrote: Don't populate the const read-only array dflt_rules on the stack at run time, instead make it static. Signed-off-by: Colin Ian King --- drivers/gpu/drm/i915/intel_memory_region.c| 2 +- driv

re: drm/bridge: it6505: fix HDCP CTS compare V matching

2025-01-07 Thread Colin King (gmail)
Hi, static analysis on Linux-next has found a potential issue with the following commit: commit 0989c02c7a5c887c70deafen80c64d0291624e1a7 Author: Hermes Wu Date: Mon Dec 30 18:51:26 2024 +0800 drm/bridge: it6505: fix HDCP CTS compare V matching The issue is as follows: Source: drive

Re: [PATCH][next] drm/amd/amdgpu: Fix spelling mistake "versoin" -> "version"

2024-11-13 Thread Colin King (gmail)
On 13/11/2024 10:13, Dan Carpenter wrote: On Wed, Nov 13, 2024 at 09:53:49AM +, Colin Ian King wrote: There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

shift and mask issue in drivers/gpu/drm/sprd/megacores_pll.c

2024-10-07 Thread Colin King (gmail)
Hi, I noticed a shift/mask issue in dphy_set_pll_reg() in drivers/gpu/drm/sprd/megacores_pll.c, the expression (pll->kint << 4) & 0xf is always zero: ... reg_val[4] = pll->kint >> 12; reg_val[5] = pll->kint >> 4; reg_val[6] = pll->out_sel | ((pll->kint << 4) &

Re: [PATCH][next] drm/tegra: hdmi: make read-only const array possible_nvram_sizes static

2024-08-29 Thread Colin King (gmail)
On 29/08/2024 16:50, Thierry Reding wrote: On Thu, Aug 22, 2024 at 09:50:47PM GMT, Colin Ian King wrote: Don't populate the const read-only array possible_nvram_sizes on the I've changed this (and the occurrence in the subject) to reflect the actual array name ("freqs") that's being changed he

drm/nouveau: fan:

2023-07-28 Thread Colin King (gmail)
Hi, static analysis with cppcheck has detected an issue in function nvkm_fan_update() in drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c as follows: /* schedule next fan update, if not at target speed already */ if (target != duty) { u16 bump_period = fan->bios

Re: [PATCH][next] accel/qaic: remove redundant assignment to pointer pexec

2023-07-26 Thread Colin King (gmail)
On 26/07/2023 14:38, Pranjal Ramajor Asha Kanojiya wrote: On 7/26/2023 8:30 AM, Jeffrey Hugo wrote: On 7/25/2023 5:40 AM, Colin Ian King wrote: Pointer pexec is being assigned a value however it is never read. The assignment is redundant and can be removed. Signed-off-by: Colin Ian King ---

[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/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][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/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] 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][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/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] 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] 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/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] 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] 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][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] 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] 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][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] 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] 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][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][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/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/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] 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] 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][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] 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/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][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] 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: 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] 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/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] 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] 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/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/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/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 terminat

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

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

[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 --- drivers/gp

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

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

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

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

  1   2   3   4   5   >