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
---
From: Colin Ian King
Currently when a call to intel_atomic_get_dbuf_state fails the
error value being returns is a potentially uninitialized value
in variable ret. Fix this by returning the error value of
new_dbuf_state.
Addresses-Coverity: ("Uninitialized scalar value")
Fixes: 3cf43cdc63fb
From: Colin Ian King
There are spelling mistakes in pr_err messages and a comment. Fix these.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +-
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c| 2 +-
drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 2 +-
3
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
---
From: Colin Ian King
The variable bit_per_pix is a u8 and is promoted in the multiplication
to an int type and then sign extended to a u64. If the result of the
int multiplication is greater than 0x7fff then the upper 32 bits will
be set to 1 as a result of the sign extension. Avoid this by
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
From: Colin Ian King
There is a spelling mistake in a drm_warn message. Fix it.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/mgag200/mgag200_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c
From: Colin Ian King
The 32 bit unsigned integer bl_pwm is being shifted using 32 bit arithmetic
and then being assigned to a 64 bit unsigned integer. There is a potential
for a 32 bit overflow so cast bl_pwm to enforce a 64 bit shift operation
to avoid this.
Addresses-Coverity:
From: Colin Ian King
The calculation of tmp64 is performed using a 32 bit multiply and then
is stored in the uint64_t variable tmp64. This indicates that a 64 bit
result may be expected, so cast crystal_clock_freq to a uint64_t
to ensure a 64 bit multiplication is being performed to avoid any
From: Colin Ian King
Currently the check that the unsigned size_t variable i is >= 0
is always true because the unsigned variable will never be negative,
causing the loop to run forever. Fix this by changing the
pre-decrement check to a zero check on i followed by a decrement of i.
From: Colin Ian King
The variable ret is being initialized with a value that is
never read and it is being updated later with a new value. The
initialization is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/drm_auth.c | 2
From: Colin Ian King
Currently pointer pdd is being dereferenced when assigning pointer
dpm and then pdd is being null checked. Fix this by checking if
pdd is null before the dereference of pdd occurs.
Addresses-Coverity: ("Dereference before null check")
Fixes: 522b89c63370 ("drm/amdkfd:
From: Colin Ian King
Currently HSD20_IPS is defined as "true" and will always result in a
non-zero result even if it is defined as "false" because it is an array
and that will never be zero. Fix this by defining it as an integer 1
rather than a literal string.
Addessses-Coverity: ("Array
From: Colin Ian King
There are a couple of statements that are indented too deeply,
remove the extraneous tabs and also an empty line.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/gma500/cdv_intel_dp.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git
From: Colin Ian King
Currently a null pointer check on pointer mode is passing mode to
function drm_mode_vrefresh and this causes a null pointer dereference
on mode. Fix this by not calling drm_mode_vrefresh since the call
is only required for error reporting.
Addresses-Coverity: ("Dereference
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,
From: Colin Ian King
There is a spelling mistake in a drm_err message. Fix it.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/i915/display/vlv_dsi_pll.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/vlv_dsi_pll.c
From: Colin Ian King
There is a spelling mistake in a DRM_ERROR message. Fix it.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
From: Colin Ian King
There are spelling mistakes in two DRM_ERROR error messages. Fix them.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
From: Colin Ian King
There is a spelling mistake in a pr_err message. Fix it.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/omapdrm/dss/venc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c
b/drivers/gpu/drm/omapdrm/dss/venc.c
index
From: Colin Ian King
There is a spelling mistake in the function name ion_dma_buf_detatch.
Fix it by removing the extraneous t.
Signed-off-by: Colin Ian King
---
drivers/staging/android/ion/ion.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
From: Colin Ian King
There a handful of spelling mistakes. fix them.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/gma500/mdfld_dsi_output.c | 4 ++--
drivers/gpu/drm/gma500/psb_intel_sdvo.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git
From: Colin Ian King
There is a spelling mistake in a pr_err message. Fix it.
Signed-off-by: Colin Ian King
---
drivers/video/fbdev/omap2/omapfb/dss/venc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/venc.c
From: Colin Ian King
There is a spelling mistake in a DRM_ERROR message. Fix it.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
From: Colin Ian King
There is a spelling mistake in a dev_warn message. Fix it.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
From: Colin Ian King
There is a spelling mistake in a DRM_ERROR message. Fix it.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
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
---
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
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
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:
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:
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
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
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
---
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
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:
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
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")
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")
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
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.
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
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 is a spelling mistake in a dml_print message. Fix it.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
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
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
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 +-
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: 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:
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
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
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:
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
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
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
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
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
From: Colin Ian King
There are two spelling mistakes of the word sync in drm_info
and drm_dbg messages. Fix these.
Signed-off-by: Colin Ian King
---
drivers/gpu/drm/kmb/kmb_crtc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/kmb/kmb_crtc.c
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
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
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
From: Colin Ian King
Currently the ! operator is incorrectly being used to flip bits on
mask values. Fix this by using the bit-wise ~ operator instead.
Addresses-Coverity: ("Logical vs. bitwise operator")
Fixes: 3c9a7b7d6e75 ("drm/amdgpu: update mmhub mgcg for mmhub_v2_3")
Signed-off-by: Colin
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:
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
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
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
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
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
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
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
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
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:
From: Colin Ian King
Don't populate the const array frs_limits on the stack but instead it
static. Makes the object code smaller by 128 bytes:
Before:
textdata bss dec hex filename
248357440 64 323397e53 drivers/gpu/drm/bridge/tc358768.o
After:
text
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
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:
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
---
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
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
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
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
---
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
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
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
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
---
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
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
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
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 |
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
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")
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.
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
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
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
---
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
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
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.
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
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
301 - 400 of 448 matches
Mail list logo