drm/i915/guc: fix GEM_BUG_ON check
Subsystems (3)
PATCH v2 1/1 drm/i915/guc: fix GEM_BUG_ON check
From: Colin Ian King <[email protected]>
The check for level being less than zero always false because flags is currently unsigned and can never be negative. Fix this by making flags a s32.
Detected by CoverityScan, CID#1468363 ("Macro compares unsigned to 0")
---
V2: Make flags s32 rather than remove the GEM_BUG_ON check, thanks to Ville Syrjälä for spotting the mistake in my first attempt.
--- drivers/gpu/drm/i915/intel_guc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_guc.c +1 -1
@@ -206,7 +206,7 @@ void intel_guc_fini(struct intel_guc *guc)static u32 get_log_control_flags (void ) {u32 level = i915_modparams.guc_log_level; -u32 flags =0 ; +s32 flags =0 ;GEM_BUG_ON (level <0 );
Signature · 6 lines
2.17.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/guc: fix GEM_BUG_ON check
== Series Details ==
== Series Details ==
Series: drm/i915/guc: fix GEM_BUG_ON check
URL : https://patchwork.freedesktop.org/series/44578/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4303 -> Patchwork_9261 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/44578/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_9261 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence:
fi-glk-j4005: PASS -> FAIL (fdo#103481)
igt@kms_pipe_crc_basic@read-crc-pipe-c:
fi-glk-j4005: PASS -> DMESG-WARN (fdo#106097, fdo#106000)
==== Possible fixes ====
igt@gem_cs_tlb@basic-default:
fi-glk-j4005: DMESG-WARN (fdo#105719) -> PASS
igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
fi-glk-j4005: FAIL (fdo#106765) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-snb-2520m: INCOMPLETE (fdo#103713) -> PASS fdo#103481 https://bugs.freedesktop.org/show_bug.cgi?id=103481
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#105719 https://bugs.freedesktop.org/show_bug.cgi?id=105719
fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000
fdo#106097 https://bugs.freedesktop.org/show_bug.cgi?id=106097
fdo#106765 https://bugs.freedesktop.org/show_bug.cgi?id=106765
== Participating hosts (41 -> 37) ==
Missing (4): fi-ctg-p8600 fi-ilk-m540 fi-bsw-cyan fi-skl-6700hq
== Build changes ==
* Linux: CI_DRM_4303 -> Patchwork_9261
CI_DRM_4303: 1b9c22ad0584716664994e1e03ccafc057e83463 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4515: a0f2d23b7d3d4226a0a7637a9240bfa86f08c1d3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9261: 7b63dbff231355704cfd2eebe26967ddfc926917 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
7b63dbff2313 drm/i915/guc: fix GEM_BUG_ON check
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9261/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/guc: fix GEM_BUG_ON check
In reply to Colin King== Series Details ==
== Series Details ==
Series: drm/i915/guc: fix GEM_BUG_ON check
URL : https://patchwork.freedesktop.org/series/44578/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4303_full -> Patchwork_9261_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9261_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_9261_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9261_full:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_schedule@deep-bsd2:
shard-kbl: PASS -> SKIP +2
igt@gem_mocs_settings@mocs-rc6-vebox:
shard-kbl: SKIP -> PASS
igt@gem_tiled_blits@normal:
shard-glk: PASS -> SKIP== Known issues ==
Here are the changes found in Patchwork_9261_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_atomic_transition@1x-modeset-transitions-nonblocking:
shard-glk: PASS -> FAIL (fdo#105703)
igt@kms_cursor_legacy@cursor-vs-flip-toggle:
shard-hsw: PASS -> FAIL (fdo#103355)
igt@kms_flip_tiling@flip-x-tiled:
shard-glk: PASS -> FAIL (fdo#104724, fdo#103822) +1
igt@kms_setmode@basic:
shard-apl: PASS -> FAIL (fdo#99912)
igt@perf@blocking:
shard-hsw: PASS -> FAIL (fdo#102252)
==== Possible fixes ====
igt@drv_selftest@live_gtt:
shard-kbl: INCOMPLETE (fdo#103665) -> PASS
shard-glk: INCOMPLETE (k.org#198133, fdo#103359) -> PASS fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4303 -> Patchwork_9261
CI_DRM_4303: 1b9c22ad0584716664994e1e03ccafc057e83463 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4515: a0f2d23b7d3d4226a0a7637a9240bfa86f08c1d3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9261: 7b63dbff231355704cfd2eebe26967ddfc926917 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9261/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 22 lines · Colin King
From: Colin Ian King <[email protected]>
The check for level being less than zero always false because flags is currently unsigned and can never be negative. Fix this by making flags a s32.
Detected by CoverityScan, CID#1468363 ("Macro compares unsigned to 0")
Signed-off-by Colin Ian King <[email protected]>---
V2: Make flags s32 rather than remove theGEM_BUG_ONcheck, thanks to Ville Syrjälä for spotting the mistake in my first attempt.--- drivers/gpu/drm/i915/intel_guc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_guc.c +0
-0
drivers/gpu/drm/i915/intel_guc.c void intel_guc_fini(struct intel_guc *guc) · line 211
Quoted 7 lines
drivers/gpu/drm/i915/intel_guc.c +1
-1@@ -206,7 +206,7 @@ void intel_guc_fini(struct intel_guc *guc)static u32 get_log_control_flags (void ) {u32 level = i915_modparams.guc_log_level; -u32 flags =0 ; +s32 flags =0 ;GEM_BUG_ON (level <0 );
Only insane people use "s32" when it's not part of the hardware spec and you changed the wrong variable...
regards,
dan carpenter
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 29 lines · Dan Carpenter
Quoted 28 lines · Colin King
From: Colin Ian King <[email protected]>
The check for level being less than zero always false because flags is currently unsigned and can never be negative. Fix this by making flags a s32.
Detected by CoverityScan, CID#1468363 ("Macro compares unsigned to 0")
Signed-off-by Colin Ian King <[email protected]>---
V2: Make flags s32 rather than remove theGEM_BUG_ONcheck, thanks to Ville Syrjälä for spotting the mistake in my first attempt.--- drivers/gpu/drm/i915/intel_guc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_guc.c +1
-1@@ -206,7 +206,7 @@ void intel_guc_fini(struct intel_guc *guc)static u32 get_log_control_flags (void ) {u32 level = i915_modparams.guc_log_level; -u32 flags =0 ; +s32 flags =0 ;
Quoted 4 lines
drivers/gpu/drm/i915/intel_guc.c void intel_guc_fini(struct intel_guc *guc) · line 211
Quoted 1 line
drivers/gpu/drm/i915/intel_guc.c +0
-0GEM_BUG_ON (level <0 );Only insane people use "s32" when it's not part of the hardware spec and you changed the wrong variable...
Yeah, int level.
Also,
BR,
Jani.
Quoted 4 lines
regards,
dan carpenter
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel