Skip to contentSkip to conversation

i915: gvt: no need to check return value of debugfs_create functions

PATCH In review Greg Kroah-Hartman 3 participants 4 messages Jun 13, 2019 – Jun 17, 2019

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

PATCH 1/1 i915: gvt: no need to check return value of debugfs_create functions

When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this.

Because there is no need to check these functions, a number of local functions can be made to return void to simplify things as nothing can fail.

Cc Zhenyu Wang <[email protected]>
Cc Zhi Wang <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 drivers/gpu/drm/i915/gvt/debugfs.c | 47 ++++++------------------------
 drivers/gpu/drm/i915/gvt/gvt.c     |  4 +--
 drivers/gpu/drm/i915/gvt/gvt.h     |  4 +--
 drivers/gpu/drm/i915/gvt/kvmgt.c   |  3 --
 drivers/gpu/drm/i915/gvt/vgpu.c    |  4 +--
 5 files changed, 13 insertions(+), 49 deletions(-)
drivers/gpu/drm/i915/gvt/debugfs.c +9 -38
index 8a9606f91e68..fdd9058ab8f2 100644
@@ -189,36 +189,19 @@ DEFINE_SIMPLE_ATTRIBUTE(vgpu_scan_nonprivbb_fops,
 /**
  * intel_gvt_debugfs_add_vgpu - register debugfs entries for a vGPU
  * @vgpu: a vGPU
- *
- * Returns:
- * Zero on success, negative error code if failed.
  */
-int intel_gvt_debugfs_add_vgpu(struct intel_vgpu *vgpu)
+void intel_gvt_debugfs_add_vgpu(struct intel_vgpu *vgpu)
 {
-	struct dentry *ent;
 	char name[16] = "";
 
 	snprintf(name, 16, "vgpu%d", vgpu->id);
 	vgpu->debugfs = debugfs_create_dir(name, vgpu->gvt->debugfs_root);
-	if (!vgpu->debugfs)
-		return -ENOMEM;
-
-	ent = debugfs_create_bool("active", 0444, vgpu->debugfs,
-				  &vgpu->active);
-	if (!ent)
-		return -ENOMEM;
-
-	ent = debugfs_create_file("mmio_diff", 0444, vgpu->debugfs,
-				  vgpu, &vgpu_mmio_diff_fops);
-	if (!ent)
-		return -ENOMEM;
 
-	ent = debugfs_create_file("scan_nonprivbb", 0644, vgpu->debugfs,
-				 vgpu, &vgpu_scan_nonprivbb_fops);
-	if (!ent)
-		return -ENOMEM;
-
-	return 0;
+	debugfs_create_bool("active", 0444, vgpu->debugfs, &vgpu->active);
+	debugfs_create_file("mmio_diff", 0444, vgpu->debugfs, vgpu,
+			    &vgpu_mmio_diff_fops);
+	debugfs_create_file("scan_nonprivbb", 0644, vgpu->debugfs, vgpu,
+			    &vgpu_scan_nonprivbb_fops);
 }
 
 /**
@@ -234,27 +217,15 @@ void intel_gvt_debugfs_remove_vgpu(struct intel_vgpu *vgpu)
 /**
  * intel_gvt_debugfs_init - register gvt debugfs root entry
  * @gvt: GVT device
- *
- * Returns:
- * zero on success, negative if failed.
  */
-int intel_gvt_debugfs_init(struct intel_gvt *gvt)
+void intel_gvt_debugfs_init(struct intel_gvt *gvt)
 {
 	struct drm_minor *minor = gvt->dev_priv->drm.primary;
-	struct dentry *ent;
 
 	gvt->debugfs_root = debugfs_create_dir("gvt", minor->debugfs_root);
-	if (!gvt->debugfs_root) {
-		gvt_err("Cannot create debugfs dir\n");
-		return -ENOMEM;
-	}
 
-	ent = debugfs_create_ulong("num_tracked_mmio", 0444, gvt->debugfs_root,
-				   &gvt->mmio.num_tracked_mmio);
-	if (!ent)
-		return -ENOMEM;
-
-	return 0;
+	debugfs_create_ulong("num_tracked_mmio", 0444, gvt->debugfs_root,
+			     &gvt->mmio.num_tracked_mmio);
 }
 
 /**
drivers/gpu/drm/i915/gvt/gvt.c +1 -3
index 43f4242062dd..8f37eefa0a02 100644
@@ -375,9 +375,7 @@ int intel_gvt_init_device(struct drm_i915_private *dev_priv)
 	}
 	gvt->idle_vgpu = vgpu;
 
-	ret = intel_gvt_debugfs_init(gvt);
-	if (ret)
-		gvt_err("debugfs registration failed, go on.\n");
+	intel_gvt_debugfs_init(gvt);
 
 	gvt_dbg_core("gvt device initialization is done\n");
 	dev_priv->gvt = gvt;
drivers/gpu/drm/i915/gvt/gvt.h +2 -2
index f5a328b5290a..b73c7e63b2d5 100644
@@ -682,9 +682,9 @@ static inline void intel_gvt_mmio_set_in_ctx(
 	gvt->mmio.mmio_attribute[offset >> 2] |= F_IN_CTX;
 }
 
-int intel_gvt_debugfs_add_vgpu(struct intel_vgpu *vgpu);
+void intel_gvt_debugfs_add_vgpu(struct intel_vgpu *vgpu);
 void intel_gvt_debugfs_remove_vgpu(struct intel_vgpu *vgpu);
-int intel_gvt_debugfs_init(struct intel_gvt *gvt);
+void intel_gvt_debugfs_init(struct intel_gvt *gvt);
 void intel_gvt_debugfs_clean(struct intel_gvt *gvt);
 
 
drivers/gpu/drm/i915/gvt/kvmgt.c +0 -3
index a68addf95c23..3c26fb28a2d1 100644
@@ -1798,9 +1798,6 @@ static int kvmgt_guest_init(struct mdev_device *mdev)
 						"kvmgt_nr_cache_entries",
 						0444, vgpu->debugfs,
 						&vgpu->vdev.nr_cache_entries);
-	if (!info->debugfs_cache_entries)
-		gvt_vgpu_err("Cannot create kvmgt debugfs entry\n");
-
 	return 0;
 }
 
drivers/gpu/drm/i915/gvt/vgpu.c +1 -3
index 44ce3c2b9ac1..d5a6e4e3d0fd 100644
@@ -420,9 +420,7 @@ static struct intel_vgpu *__intel_gvt_create_vgpu(struct intel_gvt *gvt,
 	if (ret)
 		goto out_clean_submission;
 
-	ret = intel_gvt_debugfs_add_vgpu(vgpu);
-	if (ret)
-		goto out_clean_sched_policy;
+	intel_gvt_debugfs_add_vgpu(vgpu);
 
 	ret = intel_gvt_hypervisor_set_opregion(vgpu);
 	if (ret)
Signature · 6 lines
2.22.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✓ Fi.CI.BAT: success for i915: gvt: no need to check return value of debugfs_create functions

== Series Details ==

== Series Details ==

Series: i915: gvt: no need to check return value of debugfs_create functions
URL : https://patchwork.freedesktop.org/series/62042/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6265 -> Patchwork_13271
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: [PASS][1] -> [INCOMPLETE][2] ([fdo#107718])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/fi-blb-e6850/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/fi-blb-e6850/igt@[email protected]

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-skl-6700k2: [PASS][3] -> [INCOMPLETE][4] ([fdo#104108])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/fi-skl-6700k2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/fi-skl-6700k2/igt@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live_hangcheck:
- fi-icl-y: [DMESG-FAIL][5] ([fdo#110917]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/fi-icl-y/igt@i915_selftest@live_hangcheck.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/fi-icl-y/igt@i915_selftest@live_hangcheck.html

* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u2: [FAIL][7] ([fdo#103167]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/fi-icl-u2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/fi-icl-u2/igt@[email protected]

* igt@vgem_basic@unload:
- fi-icl-u3: [DMESG-WARN][9] ([fdo#107724]) -> [PASS][10] +1 similar issue
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/fi-icl-u3/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/fi-icl-u3/igt@[email protected]

[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#110917]: https://bugs.freedesktop.org/show_bug.cgi?id=110917

Participating hosts (53 -> 45)
------------------------------

Additional (1): fi-byt-j1900
Missing (9): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-icl-dsi fi-bdw-samus fi-cml-u

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

* Linux: CI_DRM_6265 -> Patchwork_13271

CI_DRM_6265: 657b9f601946cab518d8911ea92dc0f437a1f4b4 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5055: 495287320225e7f180d384cad7b207b77154438f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13271: b992781ca31c266b01ff654c11881b6c28b99f18 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

b992781ca31c i915: gvt: no need to check return value of debugfs_create functions

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✗ Fi.CI.IGT: failure for i915: gvt: no need to check return value of debugfs_create functions

In reply to Greg Kroah-Hartman
== Series Details ==

== Series Details ==

Series: i915: gvt: no need to check return value of debugfs_create functions
URL : https://patchwork.freedesktop.org/series/62042/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_6265_full -> Patchwork_13271_full
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes introduced in Patchwork_13271_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_13271_full:

### IGT changes ###

#### Possible regressions ####

* igt@gem_ctx_shared@exec-shared-gtt-vebox:
- shard-apl: ([PASS][1], [PASS][2]) -> [FAIL][3]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-apl5/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-apl6/igt@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-apl5/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_eio@in-flight-internal-immediate:
- shard-glk: [PASS][4] -> [DMESG-WARN][5] ([fdo#110913 ])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-glk9/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-glk1/igt@[email protected]

* igt@gem_eio@wait-wedge-1us:
- shard-iclb: [PASS][6] -> [DMESG-WARN][7] ([fdo#110913 ])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-iclb1/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-iclb3/igt@[email protected]

* igt@gem_persistent_relocs@forked-interruptible-thrashing:
- shard-skl: ([PASS][8], [PASS][9]) -> [DMESG-WARN][10] ([fdo#110913 ]) +1 similar issue
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-skl8/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-skl7/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-skl7/igt@[email protected]
- shard-hsw: [PASS][11] -> [DMESG-WARN][12] ([fdo#110789] / [fdo#110913 ])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-hsw5/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-hsw4/igt@[email protected]

* igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy:
- shard-apl: ([PASS][13], [PASS][14]) -> [DMESG-WARN][15] ([fdo#110913 ])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-apl3/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-apl1/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-apl2/igt@[email protected]

* igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
- shard-hsw: ([PASS][16], [PASS][17]) -> [FAIL][18] ([fdo#105767])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-hsw4/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-hsw6/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-hsw5/igt@[email protected]

* igt@kms_draw_crc@draw-method-xrgb2101010-mmap-cpu-xtiled:
- shard-skl: ([PASS][19], [PASS][20]) -> [FAIL][21] ([fdo#103184] / [fdo#103232])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-skl5/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-skl9/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-skl1/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-glk: ([PASS][22], [PASS][23]) -> [FAIL][24] ([fdo#105363])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-glk6/igt@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-glk4/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-glk9/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-apl: ([PASS][25], [PASS][26]) -> [DMESG-WARN][27] ([fdo#108566]) +2 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-apl5/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-apl8/igt@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-apl3/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt:
- shard-iclb: [PASS][28] -> [FAIL][29] ([fdo#103167]) +8 similar issues
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt.html
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt.html

* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
- shard-kbl: [PASS][30] -> [DMESG-WARN][31] ([fdo#108566])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-kbl4/igt@[email protected]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-kbl4/igt@[email protected]

* igt@kms_psr@psr2_cursor_blt:
- shard-iclb: [PASS][32] -> [SKIP][33] ([fdo#109441]) +1 similar issue
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-iclb2/igt@kms_psr@psr2_cursor_blt.html
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-iclb4/igt@kms_psr@psr2_cursor_blt.html

* igt@perf@blocking:
- shard-skl: ([PASS][34], [PASS][35]) -> [FAIL][36] ([fdo#110728])
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-skl7/igt@[email protected]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-skl3/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-skl4/igt@[email protected]

* igt@prime_busy@wait-hang-default:
- shard-snb: [PASS][37] -> [DMESG-WARN][38] ([fdo#110789] / [fdo#110913 ])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-snb6/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-snb6/igt@[email protected]

#### Possible fixes ####

* igt@gem_eio@execbuf:
- shard-kbl: ([PASS][39], [DMESG-WARN][40]) ([fdo#110913 ]) -> [PASS][41] +1 similar issue
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-kbl6/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-kbl4/igt@[email protected]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-kbl1/igt@[email protected]

* igt@gem_eio@in-flight-10ms:
- shard-skl: ([PASS][42], [DMESG-WARN][43]) ([fdo#110913 ]) -> [PASS][44] +3 similar issues
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-skl9/igt@[email protected]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-skl7/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-skl2/igt@[email protected]

* igt@gem_eio@reset-stress:
- shard-snb: ([PASS][45], [FAIL][46]) ([fdo#109661]) -> [PASS][47]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-snb4/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-snb7/igt@[email protected]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-snb1/igt@[email protected]

* igt@gem_persistent_relocs@forked-faulting-reloc-thrash-inactive:
- shard-apl: ([INCOMPLETE][48], [PASS][49]) ([fdo#103927]) -> [PASS][50]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-apl3/igt@[email protected]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-apl6/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-apl2/igt@[email protected]

* igt@gem_persistent_relocs@forked-interruptible-thrashing:
- shard-snb: [DMESG-WARN][51] ([fdo#110789] / [fdo#110913 ]) -> [PASS][52] +1 similar issue
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-snb4/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-snb7/igt@[email protected]

* igt@gem_persistent_relocs@forked-thrashing:
- shard-apl: ([DMESG-WARN][53], [DMESG-WARN][54]) ([fdo#110913 ]) -> [PASS][55]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-apl1/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-apl2/igt@[email protected]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-apl7/igt@[email protected]
- shard-skl: ([DMESG-WARN][56], [DMESG-WARN][57]) ([fdo#110913 ]) -> [PASS][58]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-skl5/igt@[email protected]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-skl8/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-skl7/igt@[email protected]
- shard-snb: ([PASS][59], [DMESG-WARN][60]) ([fdo#110789] / [fdo#110913 ]) -> [PASS][61]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-snb4/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-snb5/igt@[email protected]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-snb1/igt@[email protected]

* igt@gem_ppgtt@blt-vs-render-ctx0:
- shard-apl: ([PASS][62], [DMESG-WARN][63]) ([fdo#110913 ]) -> [PASS][64] +2 similar issues
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-apl4/igt@[email protected]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-apl5/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-apl5/igt@[email protected]

* igt@gem_tiled_swapping@non-threaded:
- shard-apl: ([DMESG-WARN][65], [PASS][66]) ([fdo#108686]) -> [PASS][67]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-apl3/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-apl1/igt@[email protected]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-apl2/igt@[email protected]

* igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy-gup:
- shard-snb: ([DMESG-WARN][68], [PASS][69]) ([fdo#110913 ]) -> [PASS][70]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-snb1/igt@[email protected]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-snb5/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-snb6/igt@[email protected]

* igt@gem_userptr_blits@sync-unmap-cycles:
- shard-hsw: ([DMESG-WARN][71], [PASS][72]) ([fdo#110913 ]) -> [PASS][73] +1 similar issue
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-hsw8/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-hsw7/igt@[email protected]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-hsw8/igt@[email protected]
- shard-glk: ([DMESG-WARN][74], [PASS][75]) ([fdo#110913 ]) -> [PASS][76] +3 similar issues
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-glk8/igt@[email protected]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-glk2/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-glk3/igt@[email protected]

* igt@kms_big_fb@x-tiled-32bpp-rotate-180:
- shard-snb: ([PASS][77], [SKIP][78]) ([fdo#109271]) -> [PASS][79]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-snb7/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-snb4/igt@[email protected]
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-snb7/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-suspend:
- shard-kbl: ([PASS][80], [DMESG-WARN][81]) ([fdo#108566]) -> [PASS][82] +1 similar issue
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-kbl2/igt@[email protected]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-kbl7/igt@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-kbl1/igt@[email protected]

* igt@kms_cursor_legacy@cursor-vs-flip-varying-size:
- shard-hsw: ([FAIL][83], [PASS][84]) ([fdo#103355]) -> [PASS][85]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-hsw6/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-hsw8/igt@[email protected]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-hsw8/igt@[email protected]

* igt@kms_draw_crc@draw-method-xrgb2101010-mmap-gtt-untiled:
- shard-skl: ([FAIL][86], [PASS][87]) ([fdo#103184] / [fdo#103232] / [fdo#108472]) -> [PASS][88]
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-skl4/igt@[email protected]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-skl10/igt@[email protected]
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-skl3/igt@[email protected]

* igt@kms_flip@2x-plain-flip:
- shard-hsw: ([PASS][89], [SKIP][90]) ([fdo#109271]) -> [PASS][91] +25 similar issues
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-hsw7/igt@[email protected]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-hsw1/igt@[email protected]
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-hsw5/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-apl: ([DMESG-WARN][92], [PASS][93]) ([fdo#108566]) -> [PASS][94] +1 similar issue
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-apl3/igt@[email protected]
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-apl1/igt@[email protected]
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-apl2/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-badstride:
- shard-iclb: [FAIL][95] ([fdo#103167]) -> [PASS][96] +9 similar issues
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-iclb5/igt@[email protected]
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-iclb7/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-skl: ([INCOMPLETE][97], [PASS][98]) ([fdo#104108]) -> [PASS][99]
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-skl8/igt@[email protected]
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-skl2/igt@[email protected]
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-skl6/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: ([FAIL][100], [FAIL][101]) ([fdo#108145] / [fdo#110403]) -> [PASS][102]
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-skl5/igt@[email protected]
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-skl7/igt@[email protected]
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-skl1/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
- shard-skl: ([FAIL][103], [PASS][104]) ([fdo#108145]) -> [PASS][105]
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-skl10/igt@[email protected]
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-skl4/igt@[email protected]
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-skl8/igt@[email protected]

* igt@kms_psr@psr2_primary_mmap_cpu:
- shard-iclb: [SKIP][106] ([fdo#109441]) -> [PASS][107] +2 similar issues
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-iclb4/igt@kms_psr@psr2_primary_mmap_cpu.html
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html

* igt@kms_setmode@basic:
- shard-hsw: [FAIL][108] ([fdo#99912]) -> [PASS][109]
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-hsw1/igt@[email protected]
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-hsw1/igt@[email protected]

* igt@perf_pmu@rc6-runtime-pm:
- shard-hsw: ([FAIL][110], [FAIL][111]) ([fdo#105010]) -> [PASS][112]
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-hsw2/igt@[email protected]
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6265/shard-hsw8/igt@[email protected]
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/shard-hsw7/igt@[email protected]

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13271/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/1
#3 lore raw
In reply to Greg Kroah-Hartman
Quoted 3 lines · Greg Kroah-Hartman

When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this.

Looks fine to me. We'd follow this idiom.

Quoted 169 lines

Because there is no need to check these functions, a number of local functions can be made to return void to simplify things as nothing can fail.

Cc Zhenyu Wang <[email protected]>
Cc Zhi Wang <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 drivers/gpu/drm/i915/gvt/debugfs.c | 47 ++++++------------------------
 drivers/gpu/drm/i915/gvt/gvt.c     |  4 +--
 drivers/gpu/drm/i915/gvt/gvt.h     |  4 +--
 drivers/gpu/drm/i915/gvt/kvmgt.c   |  3 --
 drivers/gpu/drm/i915/gvt/vgpu.c    |  4 +--
 5 files changed, 13 insertions(+), 49 deletions(-)
drivers/gpu/drm/i915/gvt/debugfs.c +9 -38
index 8a9606f91e68..fdd9058ab8f2 100644
@@ -189,36 +189,19 @@ DEFINE_SIMPLE_ATTRIBUTE(vgpu_scan_nonprivbb_fops,
 /**
  * intel_gvt_debugfs_add_vgpu - register debugfs entries for a vGPU
  * @vgpu: a vGPU
- *
- * Returns:
- * Zero on success, negative error code if failed.
  */
-int intel_gvt_debugfs_add_vgpu(struct intel_vgpu *vgpu)
+void intel_gvt_debugfs_add_vgpu(struct intel_vgpu *vgpu)
 {
-	struct dentry *ent;
 	char name[16] = "";
 
 	snprintf(name, 16, "vgpu%d", vgpu->id);
 	vgpu->debugfs = debugfs_create_dir(name, vgpu->gvt->debugfs_root);
-	if (!vgpu->debugfs)
-		return -ENOMEM;
-
-	ent = debugfs_create_bool("active", 0444, vgpu->debugfs,
-				  &vgpu->active);
-	if (!ent)
-		return -ENOMEM;
-
-	ent = debugfs_create_file("mmio_diff", 0444, vgpu->debugfs,
-				  vgpu, &vgpu_mmio_diff_fops);
-	if (!ent)
-		return -ENOMEM;
 
-	ent = debugfs_create_file("scan_nonprivbb", 0644, vgpu->debugfs,
-				 vgpu, &vgpu_scan_nonprivbb_fops);
-	if (!ent)
-		return -ENOMEM;
-
-	return 0;
+	debugfs_create_bool("active", 0444, vgpu->debugfs, &vgpu->active);
+	debugfs_create_file("mmio_diff", 0444, vgpu->debugfs, vgpu,
+			    &vgpu_mmio_diff_fops);
+	debugfs_create_file("scan_nonprivbb", 0644, vgpu->debugfs, vgpu,
+			    &vgpu_scan_nonprivbb_fops);
 }
 
 /**
@@ -234,27 +217,15 @@ void intel_gvt_debugfs_remove_vgpu(struct intel_vgpu *vgpu)
 /**
  * intel_gvt_debugfs_init - register gvt debugfs root entry
  * @gvt: GVT device
- *
- * Returns:
- * zero on success, negative if failed.
  */
-int intel_gvt_debugfs_init(struct intel_gvt *gvt)
+void intel_gvt_debugfs_init(struct intel_gvt *gvt)
 {
 	struct drm_minor *minor = gvt->dev_priv->drm.primary;
-	struct dentry *ent;
 
 	gvt->debugfs_root = debugfs_create_dir("gvt", minor->debugfs_root);
-	if (!gvt->debugfs_root) {
-		gvt_err("Cannot create debugfs dir\n");
-		return -ENOMEM;
-	}
 
-	ent = debugfs_create_ulong("num_tracked_mmio", 0444, gvt->debugfs_root,
-				   &gvt->mmio.num_tracked_mmio);
-	if (!ent)
-		return -ENOMEM;
-
-	return 0;
+	debugfs_create_ulong("num_tracked_mmio", 0444, gvt->debugfs_root,
+			     &gvt->mmio.num_tracked_mmio);
 }
 
 /**
drivers/gpu/drm/i915/gvt/gvt.c +1 -3
index 43f4242062dd..8f37eefa0a02 100644
@@ -375,9 +375,7 @@ int intel_gvt_init_device(struct drm_i915_private *dev_priv)
 	}
 	gvt->idle_vgpu = vgpu;
 
-	ret = intel_gvt_debugfs_init(gvt);
-	if (ret)
-		gvt_err("debugfs registration failed, go on.\n");
+	intel_gvt_debugfs_init(gvt);
 
 	gvt_dbg_core("gvt device initialization is done\n");
 	dev_priv->gvt = gvt;
drivers/gpu/drm/i915/gvt/gvt.h +2 -2
index f5a328b5290a..b73c7e63b2d5 100644
@@ -682,9 +682,9 @@ static inline void intel_gvt_mmio_set_in_ctx(
 	gvt->mmio.mmio_attribute[offset >> 2] |= F_IN_CTX;
 }
 
-int intel_gvt_debugfs_add_vgpu(struct intel_vgpu *vgpu);
+void intel_gvt_debugfs_add_vgpu(struct intel_vgpu *vgpu);
 void intel_gvt_debugfs_remove_vgpu(struct intel_vgpu *vgpu);
-int intel_gvt_debugfs_init(struct intel_gvt *gvt);
+void intel_gvt_debugfs_init(struct intel_gvt *gvt);
 void intel_gvt_debugfs_clean(struct intel_gvt *gvt);
 
 
drivers/gpu/drm/i915/gvt/kvmgt.c +0 -3
index a68addf95c23..3c26fb28a2d1 100644
@@ -1798,9 +1798,6 @@ static int kvmgt_guest_init(struct mdev_device *mdev)
 						"kvmgt_nr_cache_entries",
 						0444, vgpu->debugfs,
 						&vgpu->vdev.nr_cache_entries);
-	if (!info->debugfs_cache_entries)
-		gvt_vgpu_err("Cannot create kvmgt debugfs entry\n");
-
 	return 0;
 }
 
drivers/gpu/drm/i915/gvt/vgpu.c +1 -3
index 44ce3c2b9ac1..d5a6e4e3d0fd 100644
@@ -420,9 +420,7 @@ static struct intel_vgpu *__intel_gvt_create_vgpu(struct intel_gvt *gvt,
 	if (ret)
 		goto out_clean_submission;
 
-	ret = intel_gvt_debugfs_add_vgpu(vgpu);
-	if (ret)
-		goto out_clean_sched_policy;
+	intel_gvt_debugfs_add_vgpu(vgpu);
 
 	ret = intel_gvt_hypervisor_set_opregion(vgpu);
 	if (ret)
Signature · 6 lines
2.22.0

_______________________________________________
intel-gvt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev
Signature · 3 lines
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx