drm/i915: Mark check_shadow_context_ppgtt as maybe unused
PATCH 1/1 drm/i915: Mark check_shadow_context_ppgtt as maybe unused
When CONFIG_DRM_I915_DEBUG_GEM is not set, clang warns:
drivers/gpu/drm/i915/gvt/scheduler.c:884:1: warning: function 'check_shadow_context_ppgtt' is not needed and will not be emitted [-Wunneeded-internal-declaration] check_shadow_context_ppgtt(struct execlist_ring_context *c, struct intel_vgpu_mm *m)
^
1 warning generated.
This warning is similar to -Wunused-function but rather than warning that the function is completely unused, it warns that it is used in some expression within the file but that expression will be evaluated to a constant or be optimized away in the final assembly, essentially making it appeared used but really isn't. Usually, this happens when a function or variable is only used in sizeof, where it will appear to be used but will be evaluated at compile time and not be required to be emitted.
In this case, the function is only used in GEM_BUG_ON, which is defined as BUILD_BUG_ON_INVALID, which intentionally follows this pattern. To fix this warning, add __maybe_unused to make it clear that this is intentional depending on the configuration.
--- drivers/gpu/drm/i915/gvt/scheduler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/gvt/scheduler.c +1 -1
@@ -880,7 +880,7 @@ static void update_guest_pdps(struct intel_vgpu *vgpu, gpa + i * 8, &pdp[7 - i], 4); } -static bool +static __maybe_unused bool check_shadow_context_ppgtt (struct execlist_ring_context *c,struct intel_vgpu_mm *m) {if (m->ppgtt_mm.root_entry_type ==GTT_TYPE_PPGTT_ROOT_L4_ENTRY ) {
base-commit: bdecf38f228bcca73b31ada98b5b7ba1215eb9c9
Signature · 1 line
2.26.2
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Mark check_shadow_context_ppgtt as maybe unused
== Series Details ==
== Series Details ==
Series: drm/i915: Mark check_shadow_context_ppgtt as maybe unused
URL : https://patchwork.freedesktop.org/series/77317/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8491 -> Patchwork_17678
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/index.html
Known issues
------------
Here are the changes found in Patchwork_17678 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@execlists:
- fi-apl-guc: [PASS][1] -> [INCOMPLETE][2] ([i915#656])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/fi-apl-guc/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/fi-apl-guc/igt@i915_selftest@[email protected]
- fi-skl-6700k2: [PASS][3] -> [INCOMPLETE][4] ([i915#1795] / [i915#656])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/fi-skl-6700k2/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/fi-skl-6700k2/igt@i915_selftest@[email protected]
- fi-kbl-soraka: [PASS][5] -> [INCOMPLETE][6] ([i915#656])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/fi-kbl-soraka/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/fi-kbl-soraka/igt@i915_selftest@[email protected]
#### Possible fixes ####
* igt@i915_selftest@live@execlists:
- fi-skl-guc: [INCOMPLETE][7] ([i915#1795] / [i915#656]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/fi-skl-guc/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/fi-skl-guc/igt@i915_selftest@[email protected]
[i915#1795]: https://gitlab.freedesktop.org/drm/intel/issues/1795
[i915#656]: https://gitlab.freedesktop.org/drm/intel/issues/656
Participating hosts (50 -> 44)
------------------------------
Additional (2): fi-kbl-7560u fi-skl-6600u
Missing (8): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-tgl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_8491 -> Patchwork_17678
CI-20190529: 20190529
CI_DRM_8491: 45b04894467fea442ac135a64318220fbf42cae5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5656: 3996584aa3fad5dd7a52cb90bb3cda87f645addf @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17678: e8b666a33069df3d77f0c0ec0764f8dc69f8e56f @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
e8b666a33069 drm/i915: Mark check_shadow_context_ppgtt as maybe unused
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Mark check_shadow_context_ppgtt as maybe unused
In reply to Nathan Chancellor== Series Details ==
== Series Details ==
Series: drm/i915: Mark check_shadow_context_ppgtt as maybe unused
URL : https://patchwork.freedesktop.org/series/77317/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8491_full -> Patchwork_17678_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_17678_full:
### IGT changes ###
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* {igt@kms_flip@2x-plain-flip-fb-recreate-interruptible@bc-hdmi-a1-hdmi-a2}:
- shard-glk: [PASS][1] -> [DMESG-WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-glk7/igt@kms_flip@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-glk4/igt@kms_flip@[email protected]
Known issues
------------
Here are the changes found in Patchwork_17678_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_workarounds@suspend-resume-fd:
- shard-kbl: [PASS][3] -> [DMESG-WARN][4] ([i915#180]) +4 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-kbl2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-kbl3/igt@[email protected]
* igt@i915_suspend@sysfs-reader:
- shard-apl: [PASS][5] -> [DMESG-WARN][6] ([i915#180]) +2 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-apl2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-apl6/igt@[email protected]
* igt@kms_cursor_crc@pipe-c-cursor-64x21-random:
- shard-skl: [PASS][7] -> [FAIL][8] ([i915#54])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-skl7/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-skl1/igt@[email protected]
* igt@kms_cursor_legacy@pipe-c-torture-bo:
- shard-tglb: [PASS][9] -> [DMESG-WARN][10] ([i915#128])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-tglb1/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-tglb8/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
- shard-skl: [PASS][11] -> [FAIL][12] ([fdo#108145] / [i915#265])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-skl6/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-skl9/igt@[email protected]
* igt@kms_psr@psr2_cursor_plane_move:
- shard-iclb: [PASS][13] -> [SKIP][14] ([fdo#109441]) +2 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-iclb2/igt@kms_psr@psr2_cursor_plane_move.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-iclb6/igt@kms_psr@psr2_cursor_plane_move.html
#### Possible fixes ####
* igt@i915_suspend@forcewake:
- shard-kbl: [INCOMPLETE][15] ([i915#155]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-kbl4/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-kbl6/igt@[email protected]
* igt@kms_big_fb@x-tiled-64bpp-rotate-180:
- shard-tglb: [FAIL][17] ([i915#1172]) -> [PASS][18] +1 similar issue
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-tglb6/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-tglb7/igt@[email protected]
* igt@kms_ccs@pipe-c-crc-primary-basic:
- shard-tglb: [FAIL][19] -> [PASS][20] +18 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-tglb7/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-tglb2/igt@[email protected]
* igt@kms_color@pipe-d-ctm-max:
- shard-tglb: [FAIL][21] ([i915#1149]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-tglb7/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-tglb2/igt@[email protected]
* igt@kms_cursor_crc@pipe-b-cursor-64x64-onscreen:
- shard-skl: [FAIL][23] ([i915#54]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-skl7/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-skl1/igt@[email protected]
* igt@kms_cursor_legacy@pipe-b-torture-move:
- shard-kbl: [DMESG-WARN][25] ([i915#128]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-kbl4/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-kbl6/igt@[email protected]
* {igt@kms_flip@plain-flip-fb-recreate@c-edp1}:
- shard-skl: [FAIL][27] ([i915#1883]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-skl8/igt@kms_flip@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-skl8/igt@kms_flip@[email protected]
* igt@kms_frontbuffer_tracking@psr-farfromfence:
- shard-tglb: [SKIP][29] ([i915#668]) -> [PASS][30] +2 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-tglb6/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-tglb7/igt@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
- shard-kbl: [DMESG-WARN][31] ([i915#180]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-kbl6/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-kbl2/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [FAIL][33] ([fdo#108145] / [i915#265]) -> [PASS][34] +1 similar issue
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-skl7/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-skl1/igt@[email protected]
* igt@kms_psr@psr2_cursor_plane_onoff:
- shard-iclb: [SKIP][35] ([fdo#109441]) -> [PASS][36] +2 similar issues
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-iclb8/igt@kms_psr@psr2_cursor_plane_onoff.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-iclb2/igt@kms_psr@psr2_cursor_plane_onoff.html
* igt@kms_setmode@basic:
- shard-apl: [FAIL][37] ([i915#31]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-apl8/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-apl2/igt@[email protected]
#### Warnings ####
* igt@i915_pm_dc@dc3co-vpb-simulation:
- shard-iclb: [SKIP][39] ([i915#658]) -> [SKIP][40] ([i915#588])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-iclb8/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-iclb2/igt@[email protected]
* igt@i915_pm_dc@dc6-psr:
- shard-tglb: [SKIP][41] ([i915#468]) -> [SKIP][42] ([i915#668])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-tglb2/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-tglb7/igt@[email protected]
* igt@i915_pm_rpm@dpms-mode-unset-lpsp:
- shard-snb: [INCOMPLETE][43] ([i915#82]) -> [SKIP][44] ([fdo#109271])
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-snb6/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-snb6/igt@[email protected]
* igt@kms_content_protection@atomic-dpms:
- shard-apl: [FAIL][45] ([fdo#110321] / [fdo#110336]) -> [TIMEOUT][46] ([i915#1319])
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-apl7/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-apl2/igt@[email protected]
* igt@kms_psr2_su@page_flip:
- shard-tglb: [SKIP][47] ([i915#668]) -> [FAIL][48] ([i915#608])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8491/shard-tglb1/igt@kms_psr2_su@page_flip.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17678/shard-tglb5/igt@kms_psr2_su@page_flip.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110321]: https://bugs.freedesktop.org/show_bug.cgi?id=110321
[fdo#110336]: https://bugs.freedesktop.org/show_bug.cgi?id=110336
[i915#1149]: https://gitlab.freedesktop.org/drm/intel/issues/1149
[i915#1172]: https://gitlab.freedesktop.org/drm/intel/issues/1172
[i915#128]: https://gitlab.freedesktop.org/drm/intel/issues/128
[i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#155]: https://gitlab.freedesktop.org/drm/intel/issues/155
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1883]: https://gitlab.freedesktop.org/drm/intel/issues/1883
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#468]: https://gitlab.freedesktop.org/drm/intel/issues/468
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#588]: https://gitlab.freedesktop.org/drm/intel/issues/588
[i915#608]: https://gitlab.freedesktop.org/drm/intel/issues/608
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#668]: https://gitlab.freedesktop.org/drm/intel/issues/668
[i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (11 -> 11)
------------------------------
No changes in participating hosts
Build changes
-------------
* Linux: CI_DRM_8491 -> Patchwork_17678
CI-20190529: 20190529
CI_DRM_8491: 45b04894467fea442ac135a64318220fbf42cae5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5656: 3996584aa3fad5dd7a52cb90bb3cda87f645addf @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17678: e8b666a33069df3d77f0c0ec0764f8dc69f8e56f @ 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_17678/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 44 lines · Nathan Chancellor
When
CONFIG_DRM_I915_DEBUG_GEMis not set, clang warns:
drivers/gpu/drm/i915/gvt/scheduler.c:884:1: warning: function 'check_shadow_context_ppgtt' is not needed and will not be emitted [-Wunneeded-internal-declaration]check_shadow_context_ppgtt(struct execlist_ring_context *c, struct intel_vgpu_mm *m)
^
1 warning generated.This warning is similar to -Wunused-function but rather than warning that the function is completely unused, it warns that it is used in some expression within the file but that expression will be evaluated to a constant or be optimized away in the final assembly, essentially making it appeared used but really isn't. Usually, this happens when a function or variable is only used in sizeof, where it will appear to be used but will be evaluated at compile time and not be required to be emitted.
In this case, the function is only used in
GEM_BUG_ON, which is defined asBUILD_BUG_ON_INVALID, which intentionally follows this pattern. To fix this warning, add__maybe_unusedto make it clear that this is intentional depending on the configuration.Fixes bec3df930fbd ("drm/i915/gvt: Support PPGTT table load command")Signed-off-by Nathan Chancellor <[email protected]>--- drivers/gpu/drm/i915/gvt/scheduler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/gvt/scheduler.c +1
-1@@ -880,7 +880,7 @@ static void update_guest_pdps(struct intel_vgpu *vgpu, gpa + i * 8, &pdp[7 - i], 4); } -static bool +static __maybe_unused bool check_shadow_context_ppgtt (struct execlist_ring_context *c,struct intel_vgpu_mm *m) {if (m->ppgtt_mm.root_entry_type ==GTT_TYPE_PPGTT_ROOT_L4_ENTRY ) {
Quoted 1 line
base-commit:
bdecf38f228bcca73b31ada98b5b7ba1215eb9c9
Thanks for the fix!
I'll pick up for gvt-next-fixes pull.
Signature · 3 lines
Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827