From: Colin Ian King
A prior check and return when pointer fb is null makes
subsequent null checks on fb redundant. Remove the redundant
null checks.
Addresses-Coverity: ("Logically dead code")
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/i915/i915_debugfs.c | 4 ++--
1 file changed, 2 i
From: Colin Ian King
Pointer crtc_state is being assigned twice, one of these is redundant
and can be removed.
Addresses-Coverity: ("Evaluation order violation")
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/i915/display/intel_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Colin Ian King
Variable baco_state is initialized to a value that is never read and it is
re-assigned later. The initialization is redundant and can be removed.
Addresses-Coverity: ("Unused Value")
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 +-
1 file
From: Colin Ian King
There is a spelling mistake in a DRM_DEBUG_DRIVER debug message.
Fix it.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
b/d
From: Colin Ian King
Don't populate the arrays on the stack but instead make them
static const. Makes the object code smaller by 1329 bytes.
Before:
textdata bss dec hex filename
55811488 6471331bdd drivers/staging/fbtft/fb_hx8340bn.o
54441264
From: Colin Ian King
Don't populate the array wtst_xlat on the stack but instead make it
static const. Makes the object code smaller by 89 bytes.
Before:
textdata bss dec hex filename
14347 840 0 151873b53 fbdev/matrox/matroxfb_misc.o
After:
textdata
From: Colin Ian King
There is a spelling mistake in a literal string, fix it.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/selftests/test-drm_framebuffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/selftests/test-drm_framebuffer.c
b/drivers/gpu/d
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
From: Colin Ian King
The check on ret is duplicated in two places, it is redundant code.
Remove it.
Addresses-Coverity: ("Logically dead code")
Fixes: b94afb61cdae ("drm/amd/powerplay: honor hw limit on fetching metrics
data for navi10")
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/p
From: Colin Ian King
There is a spelling mistake in a pr_err error message. Fix it. Also
add a space after a comma to clean up a checkpatch warning.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/d
From: Colin Ian King
Currently the pointer init_data is dereferenced on the assignment
of fw_info before init_data is sanity checked to see if it is null.
Fix te potential null pointer dereference on init_data by only
performing dereference after it is null checked.
Addresses-Coverity: ("Derefer
From: Colin Ian King
Variable val is initialized to a value in a for-loop that is
never read and hence it is redundant. Remove it.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/panel/panel-tpo-td043mtea1.c | 2 +-
1 file changed, 1 insertion(+), 1 delet
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 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 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
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 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
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
Currently, if adev->pp_enabled is false then the pp_stats_info data
is not read and hence a garbage number of states from the stack
is used to dump out the number of states. Given data.nums could be
any random value, this could easily lead to read outside the
data.states arra
From: Colin Ian King
trivial fix to spelling mistake in DRM_ERROR error message
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_
From: Colin Ian King
The current message contains a spelling mistake and is not easily
parsable. Re-phrase it to be more understandable.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/mediatek/mtk_dsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/medi
From: Colin Ian King
Trivial fix to spelling mistake in DRM_DEBUG_ATOMIC debug message
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/drm_atomic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index f32506
From: Colin Ian King
trivial fix to typo in WARN_ONCE message
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/handlers.c
index 0ad1a508e2af.
From: Colin Ian King
_SMU7_CLOCK_POWER_GATING_H_ is being used as a header guard, followed by
a #define of a different macro. Define _SMU7_CLOCK_POWER_GATING_H_ instead
to fix this.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.h | 2 +-
1 file ch
From: Colin Ian King
If dsi_connector fails to allocate, the exit path via label 'fail'
checks if connector is null, which it always is, so the cleanup
that destroys connector is never going to be called. Hence the
failure path can be more optimally performed by removing this
and just returning
From: Colin Ian King
bo_va is being kfree'd twice, once in the call to amdgpu_vm_bo_rmv
and then a short while later. Fix this double free by removing
the 2nd kfree.
Detected by CoverityScan, CID#1399524 ("Double Free")
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.
From: Colin Ian King
trivial fix to spelling mistake in pr_err message
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/selftests/test-drm_mm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/selftests/test-drm_mm.c
b/drivers/gpu/drm/selftests/test-drm_mm.
From: Colin Ian King
Trivial fixes to spelling mistakes "precalser" to "prescaler"
in dev_err messages
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/exynos/exynos_drm_fimc.c | 2 +-
drivers/gpu/drm/exynos/exynos_drm_gsc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --gi
From: Colin Ian King
drm_get_format_name allocates memory that is not currently free'd
when printing the state. Fix this by kfree'ing the memory after
use.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/drm_atomic.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dr
From: Colin Ian King
Trivial fix to spelling mistake, rename kfd_ioctl_dbg_unrgesiter
to kfd_ioctl_dbg_unregister
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_
From: Colin Ian King
Trivial fix to spelling mistake "configutation" to "configuration"
in dev_err message
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/i2c/tda998x_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c
b/drivers/gpu/dr
From: Colin Ian King
table_info is being dereferenced before a null check, which implies
a potential null pointer deference error. Fix this by moving the null
check of table_info to the start of smu7_get_evv_voltages to avoid
potential null pointer deferencing.
Found with static analysis by Cov
From: Colin Ian King
The function cnl_ddi_dp_set_dpll_hw_state does not need to be in global
scope, so make it static.
Cleans up sparse warning:
"symbol 'cnl_ddi_dp_set_dpll_hw_state' was not declared. Should it
be static?"
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/i915/intel_dpll_mg
From: Colin Ian King
Trivial fix to spelling mistake in DRM_DEBUG_KMS message
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/i915/i915_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index ee2325b180
From: Colin Ian King
Array thresolds should be named thresholds, rename it. Also make it static
static const char * const
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm
From: Colin Ian King
A recent compat change removed the copying of i32.mode from info.mode.
Add it back in to fix this removal as we currently are leaking information
from the stack.
Detected by CoverityScan, CID#1449374 ("Unitialized scalar variable")
Fixes: 2337f2272ee1 ("compat_drm: switch A
From: Colin Ian King
The arrays pctl0_data and pctl1_data do not need to be in global scope,
so them both static.
Cleans up sparse warnings:
symbol 'pctl0_data' was not declared. Should it be static?
symbol 'pctl1_data' was not declared. Should it be static?
Signed-off-by: Colin Ian King
---
From: Colin Ian King
The pointer plane is always null on the error path at label 'fail'
hence the check if it is non-null is redundant. We can therefore
remove the check and the destruction of plane as well as the fail
error path and instead just return an -ENOMEM ERR_PTR.
Detected by CoveritySc
From: Colin Ian King
The outer loop is redundant and can be removed as it is doing nothing
useful. Also remove some commented out code that is not being used.
Detected by CoverityScan, CID#1402073
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 27 +++
From: Colin Ian King
edid is allocated on the call to psb_intel_sdvo_get_edid but not
kfree'd at all, causing a memory leak. Fix this by kfree'ing
the edid. (This may be null, but kfree can handle null frees).
Detected by CoverityScan, CID#1090730 ("Resource Leak")
Fixes: 5736995b473b ("gma50
From: Colin Ian King
info is being checked to see if it is a null pointer, however, vpgu is
dereferencing info before this check, leading to a potential null
pointer dereference. If info is null, then the error message being
printed by macro gvt_vgpu_err and this requires vpgu to exist. We can
u
From: Colin Ian King
Trivial fix to spelling mistake in DRM_ERROR message
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/sti/sti_compositor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/sti/sti_compositor.c
b/drivers/gpu/drm/sti/sti_compositor.c
inde
From: Colin Ian King
Trivial fix to spelling mistake in DRM_ERROR message and split
over two lines to clean up a "line over 80 characters" checkpatch
warning.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/vc4/vc4_validate.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --gi
From: Colin Ian King
Trivial fix to spelling mistake in seq_printf message.
Fixes: a8b9370fc79c1 ("drm/i915/guc: Dump the GuC stage descriptor pool in
debugfs")
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/i915/i915_debugfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --
From: Colin Ian King
The current for loop decrements i when it is zero and this causes
a wrap-around back to ~0 because i is unsigned. In the unlikely event
that mask is 0, the loop will run forever. Fix this so we can't loop
forever.
Detected by CoverityScan, CID#1435469 ("Unsigned compared aga
From: Colin Ian King
There are two occasions where pointer B is being check for a NULL
when it should be pointer C instead. Fix these.
Detected by CoverityScan, CID#1436348,1436349 ("Logically Dead Code")
Fixes: 47624cc3301b60 ("drm/i915: Import the kfence selftests for
i915_sw_fence")
Signed-
From: Colin Ian King
structure pl111_display_funcs can be made static as it does not need to be
in global scope. Fixes sparse warning:
"warning: symbol 'pl111_display_funcs' was not declared. Should it
be static?"
Fixes: bed41005e6174d ("drm/pl111: Initial drm/kms driver for pl111")
Signed-off
From: Colin Ian King
structure mode_config_funcs can be made static as it does not need to be
in global scope. Fixes sparse warning:
warning: symbol 'mode_config_funcs' was not declared. Should it be static?
Fixes: bed41005e6174d ("drm/pl111: Initial drm/kms driver for pl111")
Signed-off-by: C
From: Colin Ian King
exit_loop is not being initialized, so it contains garbage. Ensure it is
initialized to false.
Detected by CoverityScan, CID#1436409 ("Uninitialzed scalar variable")
Fixes: ea6a69defd3311 ("[media] rainshadow-cec: avoid -Wmaybe-uninitialized
warning")
Signed-off-by: Colin
From: Colin Ian King
exit_loop is not being initialized, so it contains garbage. Ensure it is
initialized to false.
Detected by CoverityScan, CID#1436409 ("Uninitialized scalar variable")
Fixes: ea6a69defd3311 ("[media] rainshadow-cec: avoid -Wmaybe-uninitialized
warning")
Signed-off-by: Colin
From: Colin Ian King
The memory allocation for C is not being null checked and hence we
could end up with a null pointer dereference. Fix this with a null
pointer check. (I really should have noticed this when I was fixing an
earlier issue.)
Detected by CoverityScan, CID#1436406 ("Dereference nu
From: Colin Ian King
Trivial fix to spelling mistake in DRM_ERROR error message.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
b/drivers/gpu/drm/vmwgfx/vmwgf
From: Colin Ian King
Give function nouveau_pmops_runtime a void argument to make it an ANSI
function declaration. Fixes sparse warning:
warning: non-ANSI function declaration of function 'nouveau_pmops_runtime'
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +-
1
From: Colin Ian King
Fix trivial spelling mistake cant't -> can't and add KERN_WARNING to
printk messages.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.c | 4 ++--
drivers/gpu/drm/amd/powerplay/smumgr/iceland_smc.c | 4 ++--
drivers/gpu/drm/amd/powerpl
From: Colin Ian King
Fix trivial spelling mistake cant't -> can't and add KERN_WARNING to
printk messages. Remove redundant spaces before \n too (thanks to
Joe Perches for spotting those).
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smc.c | 4 ++--
drivers
From: Colin Ian King
There is a null pointer sanity check on sender after sender is earlier
dereferenced on the intialization of drm_device dev. Move this
dereference to after sender is sanity checked to avoid the null
pointer dereference. Issue found with static analysis using CoverityScan.
Si
From: Colin Ian King
The check for an out of bound index into array interrupt_status_offsets
is off-by-one. Fix this and also don't compared to a hard coded array
size but use adev->mode_info.num_hpd instead.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 2 +-
1 fil
From: Colin Ian King
The check for an out of bound index into array interrupt_status_offsets
is off-by-one. Fix this and also don't compared to a hard coded array
size but use ARRAY_SIZE instead.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 2 +-
1 file changed, 1
From: Colin Ian King
nvkm_udevice_time does not initialize ret and this is used
in the macro nvif_unpack(). Intializing it to zero allows the
compiler to optimize out the ret == -ENOSYS check in the macro.
Issue found by static analysis with cppcheck:
[drivers/gpu/drm/nouveau/nvkm/engine/device/
From: Colin Ian King
There is a spelling mistake in a DRM_ERROR error message. Fix it.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
b/drivers/gpu/drm/amd/am
From: Colin Ian King
There is an error condition where err is not being set and an uninitialized
garbage value in err is being returned. Fix this by assigning err to an
appropriate error return value before taking the error exit path.
Addresses-Coverity: ("Uninitialized scalar value")
Fixes: ed
From: Colin Ian King
Currently there are two places where the return status in ret is being
checked for an error however the assignment of ret has been omitted
making the checks redundant. Fix this by adding in the missing assignments
of ret.
Addresses-Coverity: ("Logically dead code")
Fixes: c
From: Colin Ian King
The variable result is being initialized with a value that is never read
and it is being updated later with a new value. The initialization is
redundant and can be removed.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 2 +-
1
From: Colin Ian King
The pixclock is being set locally because it is being passed as a
pass-by-value argument rather than pass-by-reference, so the computed
pixclock is never being set in var->pixclock. Fix this by passing
by reference.
[This dates back to 2002, I found the offending commit from
From: Colin Ian King
There is a spelling mistake in a DRM_ERROR error message. Fix it.
Signed-off-by: Colin Ian King
---
Can folk please use checkpatch, it should catch these errors.
---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
From: Colin Ian King
There is a spelling mistake in a dev_dbg messages. Fix it.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c
index 821f7
From: Colin Ian King
The assignment to infopacket->sb[7] looks incorrect, the comment states it
is the minimum refresh rate yet it is being assigned a value from the
maximum refresh rate max_refresh_in_uhz. Fix this by using min_refresh_in_uhz
instead.
Addresses-Coverity: ("Copy-paste error")
Fi
From: Colin Ian King
The variable ret is being initialized with a value that is never read
and it is being updated later with a new value. The initialization is
redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/display/dc/c
From: Colin Ian King
The variable option 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
Currently the error returns paths are unlocking lock kiq->ring_lock
however it seems this should be dev->gfx.kiq.ring_lock as this
is the lock that is being locked and unlocked around the ring
operations. This looks like a bug, fix it by unlocking the
correct lock.
[ Note:
From: Colin Ian King
There is a spelling mistaking in a pr_notice message. Fix it.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/i915/gt/selftest_rps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/selftest_rps.c
b/drivers/gpu/drm/i915/gt/self
From: Colin Ian King
The variable 'start' is being initialized with a value that is never read
and it is being updated later with a new value. The initialization is
redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/exynos/exyn
From: Colin Ian King
The variable ret is being initializeed with a value that is never read
and it is being updated later with a new value. The initialization
is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/amdgpu/amdg
From: Colin Ian King
Don't populate const arrays on the stack but instead make them
static. Makes the object code smaller by 7 bytes.
Before:
textdata bss dec hex filename
1040418284 0 112325 1b6c5 drm/nouveau/nvkm/subdev/bios/init.o
After:
textdata b
From: Colin Ian King
A recent change added two uint16_t elements to PPTable_t and reduced the
uint32_t array down to 8 elements. This results in the dev_info printing
of pptable->SkuReserved[8] accessing a value that is out-of-range on
array SkuReserved. The array has been shrunk by 1 element, s
From: Colin Ian King
There is a spelling mistake in a deb_dbg message. Fix it.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
b/drivers/gpu/drm/amd/
From: Colin Ian King
Currently the switch statement for format->cpp[0] value 4 assigns
color_index which is never read again and then falls through to the
default case and returns. This looks like a missing break statement
bug. Fix this by adding a break statement.
Addresses-Coverity: ("Unused v
From: Colin Ian King
Don't populate the array frs_limits on the stack but instead make it
static. Makes the object code smaller by 123 bytes
Before:
textdata bss dec hex filename
234565712 64 292327230 drivers/gpu/drm/bridge/tc358768.o
After:
textdata
From: Colin Ian King
There are a couple of spelling mistakes in kernel parameter help text,
namely "helpfull" and "paramters". Fix them.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/i915/i915_params.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm
From: Colin Ian King
Currently there is no null check for a failed memory allocation
on the dsb object and without this a null pointer dereference
error can occur. Fix this by adding a null check.
Note: added a drm_err message in keeping with the error message style
in the function.
Addresses-C
From: Colin Ian King
There is a spelling mistake in a pr_err message. Fix it.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/i915/gt/selftest_lrc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/selftest_lrc.c
b/drivers/gpu/drm/i915/gt/selftest_
From: Colin Ian King
Function get_insert_time can return error values that are cast
to a u64. The checks of insert_time1 and insert_time2 check for
the errors but because they are u64 variables the check for less
than zero can never be true. Fix this by casting the value to s64
to allow of the ne
From: Colin Ian King
Object drm_mode is allocated by the call to drm_mode_find_dmt
(via the call to drm_mode_duplicate and drm_mode_create). The
object is never free'd and hence causes a small memory leak.
Fix this by kfree'ing drm_mode once it is no longer required.
Addresses-Coverity: ("Resour
From: Colin Ian King
Shifting the integer value 1 is evaluated using 32-bit arithmetic
and then used in an expression that expects a long value leads to
a potential integer overflow. Fix this by using the BIT macro to
perform the shift to avoid the overflow.
Addresses-Coverity: ("Unintentional i
From: Colin Ian King
The variable ret is being initialized with a value that is never read
and it is being updated later with a new value. The initialization is
redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/amdgpu/amdg
From: Colin Ian King
There is an off-by-one bounds check on the index into arrays
table->mc_reg_address and table->mc_reg_table_entry[k].mc_data[j] that
can lead to reads and writes outside of arrays. Fix the bound checking
off-by-one error.
Addresses-Coverity: ("Out-of-bounds read/write")
Fixes
From: Colin Ian King
Currently the goto statement is skipping over a lot of setup code
because it is outside of an if-block and should be inside it. Fix
this by adding missing if statement braces.
Addresses-Coverity: ("Structurally dead code")
Fixes: fd151ca5396d ("drm amdgpu: SI UVD v3_1")
Sign
From: Colin Ian King
In the cases where adev->jpeg.num_jpeg_inst is zero or the condition
adev->jpeg.harvest_config & (1 << i) is always non-zero the variable
ret is never set to an error condition and the function returns
an uninitialized value in ret. Since the only exit condition at
the end i
From: Colin Ian King
Variables width and height are being assigned values that are never
read. The assignments are redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/virtio/virtgpu_display.c | 2 --
1 file changed, 2 deletions(-
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_ERROR error message. Fix it.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
b/drivers/gpu/drm/vmwgfx
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/amdgpu/amdgpu_vcn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
b/drivers/gpu/drm/amd/amdg
From: Colin Ian King
The variable ret is being initialized with a value that is never read
and it is being updated later with a new value. The initialization
is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/vmwgfx/vmwgfx_su
From: Colin Ian King
The variable err 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/i915/gem/selfte
From: Colin Ian King
The variable dp_ref_clk_khz 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/
From: Colin Ian King
The variable x 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/i915/gt/intel_eng
From: Colin Ian King
Currently the call to list_add_tail will access an the uninitalised
device_list.prev. Fix this by ensuring device_list is initialized before
adding items to it.
Addresses-Coverity: ("Uninitialized pointer read")
Fixes: b3dbd6d3ec49 ("drm/amdgpu: resolve mGPU RAS query instab
From: Colin Ian King
There is a spelling mistake in a DRM_DEBUG_KMS debug message. Fix it.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
b/drivers/gp
From: Colin Ian King
The variable test_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/i915/di
From: Colin Ian King
Currently pointer hive is being dereferenced before it is being null
checked and hence can lead to null pointer dereference issues. Fix this
by only dereferencing pointer hive after it has been null checked.
Addresses-Coverity: ("Dereference before null check")
Fixes: 25d427
201 - 300 of 449 matches
Mail list logo