drm/i915: fix uninitialized variable 'mask'
Subsystems (3)
PATCH 1/1 drm/i915: fix uninitialized variable 'mask'
From: Colin Ian King <[email protected]>
Currently mask is not initialized and so data is being bit-wise or'd into a garbage value. Fix this by inintializing mask to zero.
Addresses-Coverity: ("Uninitialized scalar variable")
--- drivers/gpu/drm/i915/gt/intel_sseu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/gt/intel_sseu.c +1 -1
@@ -41,7 +41,7 @@ void intel_sseu_copy_subslices(const struct sseu_dev_info *sseu, int slice,u32 intel_sseu_get_subslices (const struct sseu_dev_info *sseu,u8 slice) {int i, offset = slice * sseu->ss_stride; -u32 mask; +u32 mask =0 ;GEM_BUG_ON (slice >= sseu->max_slices);
Signature · 1 line
2.20.1
Jani Nikula
maintainerQuoted 7 lines · Colin King
From: Colin Ian King <[email protected]>
Currently mask is not initialized and so data is being bit-wise or'd into a garbage value. Fix this by inintializing mask to zero.
Addresses-Coverity: ("Uninitialized scalar variable")
Fixes 1ac159e23c2c ("drm/i915: Expand subslice mask")
This was already reverted for other reasons. Need to be fixed on the next round. For future reference, please Cc: author and reviewers of the referenced commit.
BR,
Jani.
Quoted 17 lines
Signed-off-by Colin Ian King <[email protected]>--- drivers/gpu/drm/i915/gt/intel_sseu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/gt/intel_sseu.c +1
-1@@ -41,7 +41,7 @@ void intel_sseu_copy_subslices(const struct sseu_dev_info *sseu, int slice,u32 intel_sseu_get_subslices (const struct sseu_dev_info *sseu,u8 slice) {int i, offset = slice * sseu->ss_stride; -u32 mask; +u32 mask =0 ;GEM_BUG_ON (slice >= sseu->max_slices);
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915: fix uninitialized variable 'mask'
In reply to Colin King== Series Details ==
== Series Details ==
Series: drm/i915: fix uninitialized variable 'mask'
URL : https://patchwork.freedesktop.org/series/61335/
State : failure
== Summary ==
Applying: drm/i915: fix uninitialized variable 'mask'
Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/gt/intel_sseu.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/gt/intel_sseu.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/gt/intel_sseu.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch Patch failed at 0001 drm/i915: fix uninitialized variable 'mask' When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx