Skip to contentSkip to conversation

drm/i915: remove redundant repeated checks on err

PATCH Applied Colin Ian King 4 participants 4 messages Aug 1, 2025 – Aug 2, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: remove redundant repeated checks on err

There are a couple of redundant repeated checks on err being non-zero that are always true because they are inside a previous check on err being non-zero. Remove the duplicated checks.

---
 drivers/gpu/drm/i915/gem/selftests/i915_gem_migrate.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/gem/selftests/i915_gem_migrate.c +2 -4
index d8f4a10d71de..3913b48cece7 100644
@@ -142,8 +142,7 @@ static int lmem_pages_migrate_one(struct i915_gem_ww_ctx *ww,
 		if (err) {
 			if (!silent_migrate)
 				pr_err("Object failed migration to smem\n");
-			if (err)
-				return err;
+			return err;
 		}
 
 		if (i915_gem_object_is_lmem(obj)) {
@@ -161,8 +160,7 @@ static int lmem_pages_migrate_one(struct i915_gem_ww_ctx *ww,
 		if (err) {
 			if (!silent_migrate)
 				pr_err("Object failed migration to lmem\n");
-			if (err)
-				return err;
+			return err;
 		}
 
 		if (i915_gem_object_has_struct_page(obj)) {
Signature · 1 line
2.50.0
Reviewed-by on v1 1/1
#1 lore raw

-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Colin Ian King
Sent: Friday, August 1, 2025 8:17 AM
To: Jani Nikula <[email protected]>; Vivi, Rodrigo <[email protected]>; Tvrtko Ursulin <[email protected]>; David Airlie <[email protected]>; Simona Vetter <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: [PATCH][next] drm/i915: remove redundant repeated checks on err

Quoted 6 lines

There are a couple of redundant repeated checks on err being non-zero that are always true because they are inside a previous check on err being non-zero. Remove the duplicated checks.

-Jonathan Cavitt

Quoted 32 lines
---
 drivers/gpu/drm/i915/gem/selftests/i915_gem_migrate.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/gem/selftests/i915_gem_migrate.c +2 -4
index d8f4a10d71de..3913b48cece7 100644
@@ -142,8 +142,7 @@ static int lmem_pages_migrate_one(struct i915_gem_ww_ctx *ww,
 		if (err) {
 			if (!silent_migrate)
 				pr_err("Object failed migration to smem\n");
-			if (err)
-				return err;
+			return err;
 		}
 
 		if (i915_gem_object_is_lmem(obj)) {
@@ -161,8 +160,7 @@ static int lmem_pages_migrate_one(struct i915_gem_ww_ctx *ww,
 		if (err) {
 			if (!silent_migrate)
 				pr_err("Object failed migration to lmem\n");
-			if (err)
-				return err;
+			return err;
 		}
 
 		if (i915_gem_object_has_struct_page(obj)) {
Signature · 1 line
2.50.0
maintainer Applied
#2 lore raw
Quoted 7 lines · Jonathan

-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Colin Ian King
Sent: Friday, August 1, 2025 8:17 AM
To: Jani Nikula <[email protected]>; Vivi, Rodrigo <[email protected]>; Tvrtko Ursulin <[email protected]>; David Airlie <[email protected]>; Simona Vetter <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: [PATCH][next] drm/i915: remove redundant repeated checks on err

Quoted 1 line
Quoted 7 lines
Quoted 5 lines

There are a couple of redundant repeated checks on err being non-zero that are always true because they are inside a previous check on err being non-zero. Remove the duplicated checks.

pushed to drm-intel-gt-next

Quoted 34 lines

-Jonathan Cavitt

Quoted 32 lines
---
 drivers/gpu/drm/i915/gem/selftests/i915_gem_migrate.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/gem/selftests/i915_gem_migrate.c +2 -4
index d8f4a10d71de..3913b48cece7 100644
@@ -142,8 +142,7 @@ static int lmem_pages_migrate_one(struct i915_gem_ww_ctx *ww,
 		if (err) {
 			if (!silent_migrate)
 				pr_err("Object failed migration to smem\n");
-			if (err)
-				return err;
+			return err;
 		}
 
 		if (i915_gem_object_is_lmem(obj)) {
@@ -161,8 +160,7 @@ static int lmem_pages_migrate_one(struct i915_gem_ww_ctx *ww,
 		if (err) {
 			if (!silent_migrate)
 				pr_err("Object failed migration to lmem\n");
-			if (err)
-				return err;
+			return err;
 		}
 
 		if (i915_gem_object_has_struct_page(obj)) {
Signature · 1 line
2.50.0
#3 lore raw

✗ i915.CI.BAT: failure for drm/i915: remove redundant repeated checks on err

In reply to Colin Ian King
== Series Details ==

== Series Details ==

Series: drm/i915: remove redundant repeated checks on err
URL : https://patchwork.freedesktop.org/series/152430/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_16950 -> Patchwork_152430v1
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_152430v1 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_152430v1, 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_152430v1/index.html

Participating hosts (43 -> 44)
------------------------------

Additional (2): fi-glk-j4005 bat-jsl-1
Missing (1): fi-snb-2520m

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_152430v1:

### IGT changes ###

#### Possible regressions ####

* igt@i915_module_load@load:
- fi-bsw-nick: [PASS][1] -> [ABORT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16950/fi-bsw-nick/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_152430v1/fi-bsw-nick/igt@[email protected]

Known issues
------------

Here are the changes found in Patchwork_152430v1 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_huc_copy@huc-copy:
- bat-jsl-1: NOTRUN -> [SKIP][3] ([i915#2190])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_152430v1/bat-jsl-1/igt@[email protected]
- fi-glk-j4005: NOTRUN -> [SKIP][4] ([i915#2190])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_152430v1/fi-glk-j4005/igt@[email protected]

* igt@gem_lmem_swapping@parallel-random-engines:
- bat-jsl-1: NOTRUN -> [SKIP][5] ([i915#4613]) +3 other tests skip
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_152430v1/bat-jsl-1/igt@[email protected]
- fi-glk-j4005: NOTRUN -> [SKIP][6] ([i915#4613]) +3 other tests skip
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_152430v1/fi-glk-j4005/igt@[email protected]

* igt@i915_module_load@load:
- bat-mtlp-9: [PASS][7] -> [DMESG-WARN][8] ([i915#13494])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16950/bat-mtlp-9/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_152430v1/bat-mtlp-9/igt@[email protected]

* igt@i915_selftest@live:
- bat-jsl-1: NOTRUN -> [DMESG-WARN][9] ([i915#13827]) +1 other test dmesg-warn
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_152430v1/bat-jsl-1/igt@[email protected]

* igt@i915_selftest@live@workarounds:
- bat-arls-5: [PASS][10] -> [DMESG-FAIL][11] ([i915#12061]) +1 other test dmesg-fail
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16950/bat-arls-5/igt@i915_selftest@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_152430v1/bat-arls-5/igt@i915_selftest@[email protected]

* igt@intel_hwmon@hwmon-read:
- bat-jsl-1: NOTRUN -> [SKIP][12] ([i915#7707]) +1 other test skip
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_152430v1/bat-jsl-1/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-jsl-1: NOTRUN -> [SKIP][13] ([i915#4103]) +1 other test skip
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_152430v1/bat-jsl-1/igt@[email protected]

* igt@kms_dsc@dsc-basic:
- bat-jsl-1: NOTRUN -> [SKIP][14] ([i915#3555] / [i915#9886])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_152430v1/bat-jsl-1/igt@[email protected]

* igt@kms_force_connector_basic@force-load-detect:
- bat-jsl-1: NOTRUN -> [SKIP][15]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_152430v1/bat-jsl-1/igt@[email protected]

* igt@kms_psr@psr-primary-page-flip:
- fi-glk-j4005: NOTRUN -> [SKIP][16] +11 other tests skip
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_152430v1/fi-glk-j4005/igt@[email protected]

* igt@kms_setmode@basic-clone-single-crtc:
- bat-jsl-1: NOTRUN -> [SKIP][17] ([i915#3555])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_152430v1/bat-jsl-1/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@reset:
- bat-atsm-1: [ABORT][18] ([i915#14201]) -> [PASS][19]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16950/bat-atsm-1/igt@i915_selftest@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_152430v1/bat-atsm-1/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@workarounds:
- bat-arlh-3: [DMESG-FAIL][20] ([i915#12061]) -> [PASS][21] +1 other test pass
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16950/bat-arlh-3/igt@i915_selftest@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_152430v1/bat-arlh-3/igt@i915_selftest@[email protected]
- bat-mtlp-6: [DMESG-FAIL][22] ([i915#12061]) -> [PASS][23] +1 other test pass
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16950/bat-mtlp-6/igt@i915_selftest@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_152430v1/bat-mtlp-6/igt@i915_selftest@[email protected]
- bat-dg2-11: [DMESG-FAIL][24] ([i915#12061]) -> [PASS][25] +1 other test pass
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16950/bat-dg2-11/igt@i915_selftest@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_152430v1/bat-dg2-11/igt@i915_selftest@[email protected]

#### Warnings ####

* igt@i915_selftest@live:
- bat-atsm-1: [ABORT][26] ([i915#14201]) -> [DMESG-FAIL][27] ([i915#12061] / [i915#13929])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16950/bat-atsm-1/igt@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_152430v1/bat-atsm-1/igt@[email protected]

[i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061
[i915#13494]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13494
[i915#13827]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13827
[i915#13929]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13929
[i915#14201]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14201
[i915#2190]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/2190
[i915#3555]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3555
[i915#4103]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4103
[i915#4613]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4613
[i915#7707]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/7707
[i915#9886]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9886

Build changes
-------------

* Linux: CI_DRM_16950 -> Patchwork_152430v1

CI-20190529: 20190529
CI_DRM_16950: acb5c859a41719652f1807b30240ca4ee82a473a @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_8482: 8482
Patchwork_152430v1: acb5c859a41719652f1807b30240ca4ee82a473a @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_152430v1/index.html