drm/i915: Don't use uninitialized 'ret'
Subsystems (3)
PATCH 1/1 drm/i915: Don't use uninitialized 'ret'
From: Ville Syrjälä <[email protected]>
Accidentally removed the 'ret=0' initialization, and thus we're potentially looking at some stack garbage here.
The whole 'ret = do_stuff; if (!ret) do_other_stuff;' pattern confuses my brain so let's replace it with the standard immediate return thing.
--- drivers/gpu/drm/i915/display/intel_display.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +6 -4
@@ -12843,11 +12843,13 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state, }if (INTEL_GEN (dev_priv) >=9 ) { -if (mode_changed || crtc_state->update_pipe) +if (mode_changed || crtc_state->update_pipe) { ret =skl_update_scaler_crtc (crtc_state); -if (!ret) - ret =intel_atomic_setup_scalers (dev_priv, crtc, - crtc_state); +if (ret) +return ret; + } + + ret =intel_atomic_setup_scalers (dev_priv, crtc, crtc_state);if (ret)return ret; }
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Ville Syrjala (2020-02-07 15:22:28)
Quoted 27 lines
From: Ville Syrjälä <[email protected]>
Accidentally removed the 'ret=0' initialization, and thus we're potentially looking at some stack garbage here.
The whole 'ret =
do_stuff; if (!ret)do_other_stuff;' pattern confuses my brain so let's replace it with the standard immediate return thing.Reported-by Chris Wilson <[email protected]>Fixes 28a30b45f5e9 ("drm/i915: Convert cdclk to global state")Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/display/intel_display.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/display/intel_display.c +1
-1@@ -12843,11 +12843,13 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state, }if (INTEL_GEN (dev_priv) >=9 ) { -if (mode_changed || crtc_state->update_pipe) +if (mode_changed || crtc_state->update_pipe) { ret =skl_update_scaler_crtc (crtc_state);
drivers/gpu/drm/i915/display/intel_display.c static int intel_crtc_atomic_check(struct intel_atomic_state *state, · line 12854
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_display.c +5
-3-if (!ret) - ret =intel_atomic_setup_scalers (dev_priv, crtc, - crtc_state); +if (ret) +return ret; + } + + ret =intel_atomic_setup_scalers (dev_priv, crtc, crtc_state);if (ret)return ret;
Story checks out.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Don't use uninitialized 'ret'
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm/i915: Don't use uninitialized 'ret'
URL : https://patchwork.freedesktop.org/series/73157/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_7887 -> Patchwork_16485
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_16485 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_16485, please notify your bug team 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_16485/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_16485:
### IGT changes ###
#### Possible regressions ####
* igt@prime_busy@basic-wait-before-default:
- fi-skl-6770hq: NOTRUN -> [INCOMPLETE][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16485/fi-skl-6770hq/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_16485 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_close_race@basic-threads:
- fi-byt-n2820: [PASS][2] -> [INCOMPLETE][3] ([i915#45])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/fi-byt-n2820/igt@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16485/fi-byt-n2820/igt@[email protected]
* igt@i915_selftest@live_blt:
- fi-hsw-4770r: [PASS][4] -> [DMESG-FAIL][5] ([i915#563])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/fi-hsw-4770r/igt@i915_selftest@live_blt.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16485/fi-hsw-4770r/igt@i915_selftest@live_blt.html
* igt@i915_selftest@live_gtt:
- fi-hsw-4770: [PASS][6] -> [TIMEOUT][7] ([fdo#112271])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/fi-hsw-4770/igt@i915_selftest@live_gtt.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16485/fi-hsw-4770/igt@i915_selftest@live_gtt.html
#### Possible fixes ####
* igt@i915_selftest@live_execlists:
- fi-icl-y: [DMESG-FAIL][8] ([fdo#108569]) -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/fi-icl-y/igt@i915_selftest@live_execlists.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16485/fi-icl-y/igt@i915_selftest@live_execlists.html
* igt@i915_selftest@live_gem_contexts:
- fi-cfl-8700k: [DMESG-FAIL][10] ([i915#623]) -> [PASS][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16485/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html
* igt@i915_selftest@live_gtt:
- fi-icl-guc: [TIMEOUT][12] ([fdo#112271]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/fi-icl-guc/igt@i915_selftest@live_gtt.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16485/fi-icl-guc/igt@i915_selftest@live_gtt.html
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][14] ([fdo#111096] / [i915#323]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/fi-kbl-7500u/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16485/fi-kbl-7500u/igt@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-skl-6770hq: [INCOMPLETE][16] ([i915#69]) -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7887/fi-skl-6770hq/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16485/fi-skl-6770hq/igt@[email protected]
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
[i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323
[i915#45]: https://gitlab.freedesktop.org/drm/intel/issues/45
[i915#563]: https://gitlab.freedesktop.org/drm/intel/issues/563
[i915#623]: https://gitlab.freedesktop.org/drm/intel/issues/623
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
Participating hosts (48 -> 43)
------------------------------
Additional (4): fi-skl-lmem fi-bdw-5557u fi-skl-6600u fi-gdg-551
Missing (9): fi-hsw-4200u fi-hsw-peppy fi-bsw-cyan fi-ctg-p8600 fi-kbl-7560u fi-byt-clapper fi-bsw-nick fi-bdw-samus fi-kbl-r
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_7887 -> Patchwork_16485
CI-20190529: 20190529
CI_DRM_7887: b147ed9753265260d6380604de01c3d646a323cd @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5425: ad4542ef1adbaa1227bc9ba9e24bb0e0f6dd408d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_16485: d3813a2002b173b9c727ef13fe00994842622046 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
d3813a2002b1 drm/i915: Don't use uninitialized 'ret'
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16485/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Don't use uninitialized 'ret' (rev2)
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm/i915: Don't use uninitialized 'ret' (rev2)
URL : https://patchwork.freedesktop.org/series/73157/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_7889 -> Patchwork_16490
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16490/index.html
Known issues
------------
Here are the changes found in Patchwork_16490 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_pm_rpm@module-reload:
- fi-kbl-guc: [PASS][1] -> [SKIP][2] ([fdo#109271])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7889/fi-kbl-guc/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16490/fi-kbl-guc/igt@[email protected]
* igt@i915_selftest@live_blt:
- fi-hsw-4770r: [PASS][3] -> [DMESG-FAIL][4] ([i915#563])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7889/fi-hsw-4770r/igt@i915_selftest@live_blt.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16490/fi-hsw-4770r/igt@i915_selftest@live_blt.html
* igt@i915_selftest@live_gtt:
- fi-icl-u3: [PASS][5] -> [TIMEOUT][6] ([fdo#112271])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7889/fi-icl-u3/igt@i915_selftest@live_gtt.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16490/fi-icl-u3/igt@i915_selftest@live_gtt.html
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [PASS][7] -> [FAIL][8] ([fdo#111407])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7889/fi-kbl-7500u/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16490/fi-kbl-7500u/igt@[email protected]
#### Possible fixes ####
* igt@i915_pm_rpm@basic-rte:
- fi-hsw-4770: [SKIP][9] ([fdo#109271]) -> [PASS][10] +1 similar issue
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7889/fi-hsw-4770/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16490/fi-hsw-4770/igt@[email protected]
* igt@i915_selftest@live_blt:
- fi-ivb-3770: [DMESG-FAIL][11] ([i915#725]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7889/fi-ivb-3770/igt@i915_selftest@live_blt.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16490/fi-ivb-3770/igt@i915_selftest@live_blt.html
* igt@i915_selftest@live_execlists:
- fi-icl-y: [DMESG-FAIL][13] ([fdo#108569]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7889/fi-icl-y/igt@i915_selftest@live_execlists.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16490/fi-icl-y/igt@i915_selftest@live_execlists.html
* igt@i915_selftest@live_gt_contexts:
- fi-bwr-2160: [INCOMPLETE][15] -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7889/fi-bwr-2160/igt@i915_selftest@live_gt_contexts.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16490/fi-bwr-2160/igt@i915_selftest@live_gt_contexts.html
* igt@i915_selftest@live_gtt:
- fi-skl-lmem: [TIMEOUT][17] ([fdo#111732] / [fdo#112271]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7889/fi-skl-lmem/igt@i915_selftest@live_gtt.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16490/fi-skl-lmem/igt@i915_selftest@live_gtt.html
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-icl-u2: [FAIL][19] ([i915#217]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7889/fi-icl-u2/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16490/fi-icl-u2/igt@[email protected]
#### Warnings ####
* igt@gem_exec_parallel@contexts:
- fi-byt-n2820: [TIMEOUT][21] ([fdo#112271] / [i915#1084]) -> [FAIL][22] ([i915#694])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7889/fi-byt-n2820/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16490/fi-byt-n2820/igt@[email protected]
* igt@gem_exec_parallel@fds:
- fi-byt-n2820: [FAIL][23] ([i915#694]) -> [TIMEOUT][24] ([fdo#112271])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7889/fi-byt-n2820/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16490/fi-byt-n2820/igt@[email protected]
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
[fdo#111732]: https://bugs.freedesktop.org/show_bug.cgi?id=111732
[fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
[i915#1084]: https://gitlab.freedesktop.org/drm/intel/issues/1084
[i915#217]: https://gitlab.freedesktop.org/drm/intel/issues/217
[i915#563]: https://gitlab.freedesktop.org/drm/intel/issues/563
[i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
[i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725
Participating hosts (52 -> 46)
------------------------------
Additional (1): fi-kbl-7560u
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-j1900 fi-skl-6770hq fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_7889 -> Patchwork_16490
CI-20190529: 20190529
CI_DRM_7889: d0dffc86bf0eadc65efcf624045a9df79e0591d1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5426: 973bbbff388b555ac647777460ee8db043380fe5 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_16490: 5eaa41caba431acf84655df6f30274ac80ff0550 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
5eaa41caba43 drm/i915: Don't use uninitialized 'ret'
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16490/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx