drm/i915/gt: Remove assignment from if condition
Subsystems (2)
PATCH 1/1 drm/i915/gt: Remove assignment from if condition
Initialize variable "entry" during declaration. Remove assignment from if condition.
Fix checkpatch.pl error:
ERROR: do not use assignment in if condition
--- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/gt/intel_execlists_submission.c +2 -2
@@ -1751,7 +1751,7 @@ static bool gen8_csb_parse(const u64 csb) static noinline u64wa_csb_read (const struct intel_engine_cs *engine,u64 *const csb) { -u64 entry; +u64 entry =READ_ONCE (*csb);/* * Reading from the HWSP has one particular advantage: we can detect
@@ -1763,7 +1763,7 @@ wa_csb_read(const struct intel_engine_cs *engine, u64 * const csb)* tgl,dg1:HSDES#22011327657 */ preempt_disable (); -if (wait_for_atomic_us ((entry =READ_ONCE (*csb)) !=-1 ,10 )) { +if (wait_for_atomic_us (entry !=-1 ,10 )) {int idx = csb - engine->execlists.csb_status;int status;
Signature · 1 line
2.34.1
Quoted 25 lines · Gilbert Adikankwu
Initialize variable "entry" during declaration. Remove assignment from if condition.
Fix checkpatch.pl error:
ERROR: do not use assignment in if conditionSigned-off-by Gilbert Adikankwu <[email protected]>--- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/gt/intel_execlists_submission.c +1
-1@@ -1751,7 +1751,7 @@ static bool gen8_csb_parse(const u64 csb) static noinline u64wa_csb_read (const struct intel_engine_cs *engine,u64 *const csb) { -u64 entry; +u64 entry =READ_ONCE (*csb);/* * Reading from the HWSP has one particular advantage: we can detect
drivers/gpu/drm/i915/gt/intel_execlists_submission.c wa_csb_read(const struct intel_engine_cs *engine, u64 * const csb) · line 1766
Quoted 5 lines
drivers/gpu/drm/i915/gt/intel_execlists_submission.c +1
-1@@ -1763,7 +1763,7 @@ wa_csb_read(const struct intel_engine_cs *engine, u64 * const csb)* tgl,dg1:HSDES#22011327657 */ preempt_disable (); -if (wait_for_atomic_us ((entry =READ_ONCE (*csb)) !=-1 ,10 )) { +if (wait_for_atomic_us (entry !=-1 ,10 )) {
Wait_for_atomic_us is a macro which needs to keep reading the csb until it changes so this will not work.
Regards,
Tvrtko
Quoted 3 lines
drivers/gpu/drm/i915/gt/intel_execlists_submission.c +0
-0int idx = csb - engine->execlists.csb_status;int status;
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/gt: Remove assignment from if condition
In reply to Gilbert Adikankwu== Series Details ==
== Series Details ==
Series: drm/i915/gt: Remove assignment from if condition
URL : https://patchwork.freedesktop.org/series/125637/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_13799 -> Patchwork_125637v1
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_125637v1 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_125637v1, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/index.html
Participating hosts (36 -> 38)
------------------------------
Additional (4): fi-kbl-soraka bat-dg2-9 fi-bsw-n3050 fi-pnv-d510
Missing (2): fi-snb-2520m bat-dg1-5
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_125637v1:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live@gt_heartbeat:
- fi-bsw-nick: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13799/fi-bsw-nick/igt@i915_selftest@live@gt_heartbeat.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/fi-bsw-nick/igt@i915_selftest@live@gt_heartbeat.html
Known issues
------------
Here are the changes found in Patchwork_125637v1 that come from known issues:
### CI changes ###
#### Issues hit ####
* boot:
- bat-adlp-11: [PASS][3] -> [FAIL][4] ([i915#8293])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13799/bat-adlp-11/boot.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-adlp-11/boot.html
#### Possible fixes ####
* boot:
- fi-hsw-4770: [FAIL][5] ([i915#8293]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13799/fi-hsw-4770/boot.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/fi-hsw-4770/boot.html
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_suspend@basic-s0@smem:
- bat-dg2-9: NOTRUN -> [INCOMPLETE][7] ([i915#9275])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-dg2-9/igt@gem_exec_suspend@[email protected]
* igt@gem_exec_suspend@basic-s3@lmem0:
- bat-atsm-1: NOTRUN -> [DMESG-WARN][8] ([i915#8841]) +4 other tests dmesg-warn
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-atsm-1/igt@gem_exec_suspend@[email protected]
* igt@gem_huc_copy@huc-copy:
- fi-kbl-soraka: NOTRUN -> [SKIP][9] ([fdo#109271] / [i915#2190])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/fi-kbl-soraka/igt@[email protected]
* igt@gem_lmem_swapping@basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][10] ([fdo#109271] / [i915#4613]) +3 other tests skip
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/fi-kbl-soraka/igt@[email protected]
* igt@gem_lmem_swapping@random-engines:
- fi-bsw-n3050: NOTRUN -> [SKIP][11] ([fdo#109271]) +18 other tests skip
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/fi-bsw-n3050/igt@[email protected]
* igt@gem_mmap@basic:
- bat-dg2-9: NOTRUN -> [SKIP][12] ([i915#4083])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-dg2-9/igt@[email protected]
* igt@gem_mmap_gtt@basic:
- bat-dg2-9: NOTRUN -> [SKIP][13] ([i915#4077]) +2 other tests skip
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-dg2-9/igt@[email protected]
* igt@gem_render_tiled_blits@basic:
- bat-dg2-9: NOTRUN -> [SKIP][14] ([i915#4079]) +1 other test skip
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-dg2-9/igt@[email protected]
* igt@i915_pm_rps@basic-api:
- bat-dg2-9: NOTRUN -> [SKIP][15] ([i915#6621])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-dg2-9/igt@[email protected]
* igt@i915_selftest@live@gt_pm:
- fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][16] ([i915#1886])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html
* igt@i915_suspend@basic-s3-without-i915:
- bat-atsm-1: NOTRUN -> [SKIP][17] ([i915#6645])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-atsm-1/igt@[email protected]
* igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- bat-dg2-9: NOTRUN -> [SKIP][18] ([i915#5190])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-dg2-9/igt@[email protected]
- fi-hsw-4770: NOTRUN -> [SKIP][19] ([fdo#109271] / [i915#5190])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/fi-hsw-4770/igt@[email protected]
* igt@kms_addfb_basic@basic-y-tiled-legacy:
- bat-dg2-9: NOTRUN -> [SKIP][20] ([i915#4215] / [i915#5190])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-dg2-9/igt@[email protected]
* igt@kms_addfb_basic@framebuffer-vs-set-tiling:
- bat-dg2-9: NOTRUN -> [SKIP][21] ([i915#4212]) +6 other tests skip
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-dg2-9/igt@[email protected]
* igt@kms_addfb_basic@tile-pitch-mismatch:
- bat-dg2-9: NOTRUN -> [SKIP][22] ([i915#4212] / [i915#5608])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-dg2-9/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-dg2-9: NOTRUN -> [SKIP][23] ([i915#4103] / [i915#4213] / [i915#5608]) +1 other test skip
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-dg2-9/igt@[email protected]
* igt@kms_dsc@dsc-basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][24] ([fdo#109271]) +9 other tests skip
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/fi-kbl-soraka/igt@[email protected]
* igt@kms_force_connector_basic@force-load-detect:
- bat-dg2-9: NOTRUN -> [SKIP][25] ([fdo#109285])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-dg2-9/igt@[email protected]
* igt@kms_force_connector_basic@prune-stale-modes:
- bat-dg2-9: NOTRUN -> [SKIP][26] ([i915#5274])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-dg2-9/igt@[email protected]
* igt@kms_hdmi_inject@inject-audio:
- fi-bsw-n3050: NOTRUN -> [FAIL][27] ([IGT#3])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/fi-bsw-n3050/igt@[email protected]
* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-nv12@pipe-a-vga-1:
- fi-hsw-4770: NOTRUN -> [SKIP][28] ([fdo#109271]) +12 other tests skip
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/fi-hsw-4770/igt@kms_pipe_crc_basic@[email protected]
* igt@kms_pipe_crc_basic@read-crc-frame-sequence:
- bat-dg2-11: NOTRUN -> [SKIP][29] ([i915#1845] / [i915#9197])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-dg2-11/igt@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc:
- bat-atsm-1: NOTRUN -> [SKIP][30] ([i915#1836])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-atsm-1/igt@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-c-vga-1:
- fi-hsw-4770: NOTRUN -> [DMESG-WARN][31] ([i915#8841]) +6 other tests dmesg-warn
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/fi-hsw-4770/igt@kms_pipe_crc_basic@[email protected]
* igt@kms_psr@primary_page_flip:
- fi-pnv-d510: NOTRUN -> [SKIP][32] ([fdo#109271]) +29 other tests skip
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/fi-pnv-d510/igt@kms_psr@primary_page_flip.html
* igt@kms_psr@sprite_plane_onoff:
- bat-dg2-9: NOTRUN -> [SKIP][33] ([i915#1072]) +3 other tests skip
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-dg2-9/igt@kms_psr@sprite_plane_onoff.html
- fi-hsw-4770: NOTRUN -> [SKIP][34] ([fdo#109271] / [i915#1072]) +3 other tests skip
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/fi-hsw-4770/igt@kms_psr@sprite_plane_onoff.html
* igt@kms_setmode@basic-clone-single-crtc:
- bat-dg2-9: NOTRUN -> [SKIP][35] ([i915#3555] / [i915#4098])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-dg2-9/igt@[email protected]
* igt@prime_vgem@basic-fence-flip:
- bat-dg2-9: NOTRUN -> [SKIP][36] ([i915#3708])
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-dg2-9/igt@[email protected]
* igt@prime_vgem@basic-fence-mmap:
- bat-dg2-9: NOTRUN -> [SKIP][37] ([i915#3708] / [i915#4077]) +1 other test skip
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-dg2-9/igt@[email protected]
* igt@prime_vgem@basic-write:
- bat-dg2-9: NOTRUN -> [SKIP][38] ([i915#3291] / [i915#3708]) +2 other tests skip
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-dg2-9/igt@[email protected]
#### Possible fixes ####
* igt@i915_selftest@live@gem_contexts:
- bat-atsm-1: [INCOMPLETE][39] ([i915#9174]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13799/bat-atsm-1/igt@i915_selftest@live@gem_contexts.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/bat-atsm-1/igt@i915_selftest@live@gem_contexts.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[IGT#3]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/3
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1836]: https://gitlab.freedesktop.org/drm/intel/issues/1836
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190
[i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#5608]: https://gitlab.freedesktop.org/drm/intel/issues/5608
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645
[i915#8293]: https://gitlab.freedesktop.org/drm/intel/issues/8293
[i915#8841]: https://gitlab.freedesktop.org/drm/intel/issues/8841
[i915#9174]: https://gitlab.freedesktop.org/drm/intel/issues/9174
[i915#9197]: https://gitlab.freedesktop.org/drm/intel/issues/9197
[i915#9275]: https://gitlab.freedesktop.org/drm/intel/issues/9275
Build changes
-------------
* Linux: CI_DRM_13799 -> Patchwork_125637v1
CI-20190529: 20190529
CI_DRM_13799: 76ad050e075bcd86919ed755602ded34c0d9e276 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7559: 62ac3d2ddb6005b16df00a36565779848c1390c9 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_125637v1: 76ad050e075bcd86919ed755602ded34c0d9e276 @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
bfc5a01402fb drm/i915/gt: Remove assignment from if condition
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_125637v1/index.html
Hi Gilbert,
Quoted 14 lines
drivers/gpu/drm/i915/gt/intel_execlists_submission.c +1
-1@@ -1751,7 +1751,7 @@ static bool gen8_csb_parse(const u64 csb) static noinline u64wa_csb_read (const struct intel_engine_cs *engine,u64 *const csb) { -u64 entry; +u64 entry =READ_ONCE (*csb);/* * Reading from the HWSP has one particular advantage: we can detect
drivers/gpu/drm/i915/gt/intel_execlists_submission.c wa_csb_read(const struct intel_engine_cs *engine, u64 * const csb) · line 1766
Quoted 5 lines
drivers/gpu/drm/i915/gt/intel_execlists_submission.c +1
-1@@ -1763,7 +1763,7 @@ wa_csb_read(const struct intel_engine_cs *engine, u64 * const csb)* tgl,dg1:HSDES#22011327657 */ preempt_disable (); -if (wait_for_atomic_us ((entry =READ_ONCE (*csb)) !=-1 ,10 )) { +if (wait_for_atomic_us (entry !=-1 ,10 )) {
this doesn't work. Hav you looked inside the wait_for_atomic_us? It's busy looping for 10us waiting for *csb to be different from -1. Because the entry value won't have a chance to change, then we would be waiting 10us for nothing.
Not all the checkpatch errors need to be fixed and we can live with this one.
Andi
Quoted 5 lines
drivers/gpu/drm/i915/gt/intel_execlists_submission.c +0
-0int idx = csb - engine->execlists.csb_status;int status;Signature · 1 line
2.34.1