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,
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
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
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(-)
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) &
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
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
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
---
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")
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
---
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
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
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
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
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
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/
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
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
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
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
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 |
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
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
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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
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(-)
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
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
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
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/
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
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
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
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
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
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
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
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
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
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
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:
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
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
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.
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
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
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/
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
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
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
---
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
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
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
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/
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
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"
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/
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
-
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
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
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
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
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
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
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
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
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
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
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
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 (
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
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
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
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
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
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
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
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
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
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
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 |
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
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
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
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
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
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 - 100 of 454 matches
Mail list logo