drm/i915/guc: fix GEM_BUG_ON check
Subsystems (3)
PATCH v3 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 level a s32.
Detected by CoverityScan, CID#1468363 ("Macro compares unsigned to 0")
---
V3: Make level s32 and add the missing Fixes: tag, thanks to Dan Carpenter and Jani Nikula for correcting my mistakes
--- drivers/gpu/drm/i915/intel_guc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_guc.c +1 -1
@@ -205,7 +205,7 @@ void intel_guc_fini(struct intel_guc *guc)static u32 get_log_control_flags (void ) { -u32 level = i915_modparams.guc_log_level; +s32 level = i915_modparams.guc_log_level;u32 flags =0 ;GEM_BUG_ON (level <0 );
Signature · 1 line
2.17.0
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/guc: fix GEM_BUG_ON check (rev2)
== Series Details ==
== Series Details ==
Series: drm/i915/guc: fix GEM_BUG_ON check (rev2)
URL : https://patchwork.freedesktop.org/series/44578/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4305 -> Patchwork_9271 =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9271 need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_9271, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/44578/revisions/2/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9271:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_gttfill@basic:
fi-pnv-d510: PASS -> SKIP== Known issues ==
Here are the changes found in Patchwork_9271 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_flip@basic-flip-vs-wf_vblank:
fi-glk-j4005: PASS -> FAIL (fdo#100368)
igt@kms_flip@basic-plain-flip:
fi-glk-j4005: PASS -> DMESG-WARN (fdo#106000) +1
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)
==== Possible fixes ====
igt@debugfs_test@read_all_entries:
fi-snb-2520m: INCOMPLETE (fdo#103713) -> PASS
igt@kms_frontbuffer_tracking@basic:
fi-hsw-peppy: DMESG-WARN (fdo#106607) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103481 https://bugs.freedesktop.org/show_bug.cgi?id=103481
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000
fdo#106097 https://bugs.freedesktop.org/show_bug.cgi?id=106097
fdo#106607 https://bugs.freedesktop.org/show_bug.cgi?id=106607
== Participating hosts (42 -> 38) ==
Missing (4): fi-ctg-p8600 fi-ilk-m540 fi-bsw-cyan fi-skl-6700hq
== Build changes ==
* Linux: CI_DRM_4305 -> Patchwork_9271
CI_DRM_4305: d5ec1c93d19ce1fa4e23176828f4fb9a592f2609 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4515: a0f2d23b7d3d4226a0a7637a9240bfa86f08c1d3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9271: 41a63d5285996d98330dc484c08a6e93d6ae8ebc @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
41a63d528599 drm/i915/guc: fix GEM_BUG_ON check
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9271/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 (rev2)
In reply to Colin King== Series Details ==
== Series Details ==
Series: drm/i915/guc: fix GEM_BUG_ON check (rev2)
URL : https://patchwork.freedesktop.org/series/44578/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4305_full -> Patchwork_9271_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_9271_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_9271_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_9271_full:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_schedule@deep-bsd2:
shard-kbl: SKIP -> PASS +2
igt@gem_mocs_settings@mocs-rc6-vebox:
shard-kbl: PASS -> SKIP
igt@kms_cursor_legacy@cursora-vs-flipa-legacy:
shard-snb: SKIP -> PASS +3
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-pgflip-blt:
shard-snb: PASS -> SKIP +2== Known issues ==
Here are the changes found in Patchwork_9271_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_selftest@live_gtt:
shard-kbl: PASS -> INCOMPLETE (fdo#103665)
shard-glk: PASS -> INCOMPLETE (k.org#198133, fdo#103359)
igt@gem_exec_big:
shard-hsw: PASS -> INCOMPLETE (fdo#103540)
igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
shard-hsw: PASS -> FAIL (fdo#102670)
igt@kms_flip@2x-flip-vs-absolute-wf_vblank:
shard-hsw: PASS -> FAIL (fdo#103928)
igt@kms_flip@modeset-vs-vblank-race:
shard-glk: PASS -> FAIL (fdo#103060)
igt@kms_flip_tiling@flip-to-y-tiled:
shard-glk: PASS -> FAIL (fdo#104724)
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence:
shard-hsw: PASS -> FAIL (fdo#103481)
==== Possible fixes ====
igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
shard-glk: FAIL (fdo#106509, fdo#105454) -> PASS
igt@kms_flip@2x-dpms-vs-vblank-race-interruptible:
shard-hsw: FAIL (fdo#103060) -> PASS
igt@kms_flip@2x-flip-vs-expired-vblank:
shard-hsw: FAIL (fdo#102887) -> PASS
igt@kms_flip@2x-flip-vs-fences:
shard-glk: INCOMPLETE (k.org#198133, fdo#103359) -> PASS
igt@kms_flip@plain-flip-ts-check-interruptible:
shard-hsw: FAIL (fdo#100368) -> PASS
igt@kms_setmode@basic:
shard-apl: FAIL (fdo#99912) -> PASS fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102670 https://bugs.freedesktop.org/show_bug.cgi?id=102670
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103481 https://bugs.freedesktop.org/show_bug.cgi?id=103481
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103928 https://bugs.freedesktop.org/show_bug.cgi?id=103928
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454
fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
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_4305 -> Patchwork_9271
CI_DRM_4305: d5ec1c93d19ce1fa4e23176828f4fb9a592f2609 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4515: a0f2d23b7d3d4226a0a7637a9240bfa86f08c1d3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9271: 41a63d5285996d98330dc484c08a6e93d6ae8ebc @ 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_9271/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 24 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 level a s32.
Detected by CoverityScan, CID#1468363 ("Macro compares unsigned to 0")
Fixes cb5d64e9f13e ("drm/i915/guc: Allow user to control default GuC logging")Signed-off-by Colin Ian King <[email protected]>---
V3: Make level s32 and add the missing Fixes: tag, thanks to Dan Carpenter and Jani Nikula for correcting my mistakes--- 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 207
Quoted 4 lines
drivers/gpu/drm/i915/intel_guc.c +1
-1@@ -205,7 +205,7 @@ void intel_guc_fini(struct intel_guc *guc)static u32 get_log_control_flags (void ) { -u32 level = i915_modparams.guc_log_level; +s32 level = i915_modparams.guc_log_level;
s/s32 level/int level
to match modparam type as already suggested by others
drivers/gpu/drm/i915/intel_guc.c void intel_guc_fini(struct intel_guc *guc) · line 211
Quoted 2 lines
drivers/gpu/drm/i915/intel_guc.c +0
-0u32 flags =0 ;GEM_BUG_ON (level <0 );
please note that this BUG_ON will go away with pending [1] so maybe we can just merge series [2] instead ?
Thanks,
Michal
[1] https://patchwork.freedesktop.org/patch/227365/
[2] https://patchwork.freedesktop.org/series/44201/
_______________________________________________
dri-devel mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel