tools/aubdump: Fix ISO C90 forbids mixed declarations and code warning
PATCH 1/1 tools/aubdump: Fix ISO C90 forbids mixed declarations and code warning
From: Tvrtko Ursulin <[email protected]>
Back to a clean build with no warnings, at least for me.
--- tools/aubdump.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
tools/aubdump.c +4 -3
@@ -394,10 +394,11 @@ gen8_emit_ggtt_pte_for_range(uint64_t start, uint64_t end) entry_addr = start & ~(4096 -1 ); do { + uint64_t last_page_entry, num_entries; + page_num = entry_addr >> 21; - uint64_t last_page_entry = - min((page_num + 1) << 21, end_aligned); - uint64_t num_entries = (last_page_entry - entry_addr) >> 12; + last_page_entry = min((page_num + 1) << 21, end_aligned); + num_entries = (last_page_entry - entry_addr) >> 12; mem_trace_memory_write_header_out( entry_addr >> 9, num_entries * GEN8_PTE_SIZE, AUB_MEM_TRACE_MEMORY_ADDRESS_SPACE_GGTT_ENTRY);
Signature · 6 lines
2.14.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 3 lines · Tvrtko Ursulin
From: Tvrtko Ursulin <[email protected]>
Back to a clean build with no warnings, at least for me.
Why c90? If that's the language we mean to target then we should probably add it to the build system so people with gcc 5.1 and later will see the warnings too. fwiw, my build with clang 6 gives a couple dozen warnings.
Quoted 28 lines
Signed-off-by Tvrtko Ursulin <[email protected]>Cc Jordan Justen <[email protected]>Cc Scott D Phillips <[email protected]>--- tools/aubdump.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)tools/aubdump.c +4
-3@@ -394,10 +394,11 @@ gen8_emit_ggtt_pte_for_range(uint64_t start, uint64_t end) entry_addr = start & ~(4096 -1 ); do { + uint64_t last_page_entry, num_entries; + page_num = entry_addr >> 21; - uint64_t last_page_entry = - min((page_num + 1) << 21, end_aligned); - uint64_t num_entries = (last_page_entry - entry_addr) >> 12; + last_page_entry = min((page_num + 1) << 21, end_aligned); + num_entries = (last_page_entry - entry_addr) >> 12; mem_trace_memory_write_header_out( entry_addr >> 9, num_entries * GEN8_PTE_SIZE, AUB_MEM_TRACE_MEMORY_ADDRESS_SPACE_GGTT_ENTRY);Signature · 1 line
2.14.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for tools/aubdump: Fix ISO C90 forbids mixed declarations and code warning
In reply to Tvrtko Ursulin== Series Details ==
== Series Details ==
Series: tools/aubdump: Fix ISO C90 forbids mixed declarations and code warning
URL : https://patchwork.freedesktop.org/series/41385/
State : success
== Summary ==
IGT patchset tested on top of latest successful build 7c474e011548d35df6b80ceed81d3e6ca560c71d tests/perf: fix gen8 small cores whitelist expectation
with latest DRM-Tip kernel build CI_DRM_40371cda370ffded drm-tip: 2018y-04m-09d-14h-03m-58s UTC integration manifest
No testlist changes.
---- Possible new issues:
Test gem_exec_gttfill:
Subgroup basic:
skip -> PASS (fi-pnv-d510)---- Known issues:
Test debugfs_test:
Subgroup read_all_entries:
pass -> INCOMPLETE (fi-snb-2520m) fdo#103713
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
fail -> PASS (fi-gdg-551) fdo#102575fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fi-bdw-5557u total:285 pass:264 dwarn:0 dfail:0 fail:0 skip:21 time:433s fi-bdw-gvtdvm total:285 pass:261 dwarn:0 dfail:0 fail:0 skip:24 time:445s fi-blb-e6850 total:285 pass:220 dwarn:1 dfail:0 fail:0 skip:64 time:382s fi-bsw-n3050 total:285 pass:239 dwarn:0 dfail:0 fail:0 skip:46 time:542s fi-bwr-2160 total:285 pass:180 dwarn:0 dfail:0 fail:0 skip:105 time:301s fi-bxt-dsi total:285 pass:255 dwarn:0 dfail:0 fail:0 skip:30 time:517s fi-bxt-j4205 total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:514s fi-byt-j1900 total:285 pass:250 dwarn:0 dfail:0 fail:0 skip:35 time:524s fi-byt-n2820 total:285 pass:246 dwarn:0 dfail:0 fail:0 skip:39 time:512s fi-cfl-8700k total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:409s fi-cfl-s3 total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:558s fi-cfl-u total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:516s fi-cnl-y3 total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:588s fi-elk-e7500 total:285 pass:226 dwarn:0 dfail:0 fail:0 skip:59 time:425s fi-gdg-551 total:285 pass:177 dwarn:0 dfail:0 fail:0 skip:108 time:320s fi-glk-1 total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:541s fi-glk-j4005 total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:486s fi-hsw-4770 total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:405s fi-ilk-650 total:285 pass:225 dwarn:0 dfail:0 fail:0 skip:60 time:427s fi-ivb-3520m total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:460s fi-ivb-3770 total:285 pass:252 dwarn:0 dfail:0 fail:0 skip:33 time:440s fi-kbl-7500u total:285 pass:260 dwarn:1 dfail:0 fail:0 skip:24 time:469s fi-kbl-7567u total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:462s fi-kbl-r total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:511s fi-pnv-d510 total:285 pass:220 dwarn:1 dfail:0 fail:0 skip:64 time:665s fi-skl-6260u total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:444s fi-skl-6600u total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:535s fi-skl-6700k2 total:285 pass:261 dwarn:0 dfail:0 fail:0 skip:24 time:507s fi-skl-6770hq total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:500s fi-skl-guc total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:430s fi-skl-gvtdvm total:285 pass:262 dwarn:0 dfail:0 fail:0 skip:23 time:445s fi-snb-2520m total:3 pass:2 dwarn:0 dfail:0 fail:0 skip:0 fi-snb-2600 total:285 pass:245 dwarn:0 dfail:0 fail:0 skip:40 time:404s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1238/issues.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.IGT: success for tools/aubdump: Fix ISO C90 forbids mixed declarations and code warning
In reply to Tvrtko Ursulin== Series Details ==
== Series Details ==
Series: tools/aubdump: Fix ISO C90 forbids mixed declarations and code warning
URL : https://patchwork.freedesktop.org/series/41385/
State : success
== Summary ==
---- Known issues:
Test kms_flip:
Subgroup 2x-flip-vs-expired-vblank-interruptible:
fail -> PASS (shard-hsw) fdo#102887
Test kms_sysfs_edid_timing:
warn -> PASS (shard-apl) fdo#100047fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
shard-apl total:2680 pass:1836 dwarn:1 dfail:0 fail:7 skip:836 time:12709s shard-hsw total:2680 pass:1786 dwarn:1 dfail:0 fail:1 skip:891 time:11493s
Blacklisted hosts:
shard-snb total:2680 pass:1376 dwarn:2 dfail:0 fail:3 skip:1299 time:6890s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1238/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 10 lines · Scott D Phillips
Quoted 3 lines · Tvrtko Ursulin
From: Tvrtko Ursulin <[email protected]>
Back to a clean build with no warnings, at least for me.
Why c90? If that's the language we mean to target then we should probably add it to the build system so people with gcc 5.1 and later will see the warnings too. fwiw, my build with clang 6 gives a couple dozen warnings.
I am building under Ubuntu 17.10 with GCC 7.2.0. Normal configure && make, and get this warning. And since I can't spot that IGT is setting the C standard explicitly, I guess that's the default.
This one is the only warning on my build btw.
Regards,
Tvrtko
Quoted 24 lines
Quoted 24 lines
Signed-off-by Tvrtko Ursulin <[email protected]>Cc Jordan Justen <[email protected]>Cc Scott D Phillips <[email protected]>--- tools/aubdump.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)tools/aubdump.c +4
-3@@ -394,10 +394,11 @@ gen8_emit_ggtt_pte_for_range(uint64_t start, uint64_t end) entry_addr = start & ~(4096 -1 ); do { + uint64_t last_page_entry, num_entries; + page_num = entry_addr >> 21; - uint64_t last_page_entry = - min((page_num + 1) << 21, end_aligned); - uint64_t num_entries = (last_page_entry - entry_addr) >> 12; + last_page_entry = min((page_num + 1) << 21, end_aligned); + num_entries = (last_page_entry - entry_addr) >> 12; mem_trace_memory_write_header_out(
Quoted 9 lines
Quoted 4 lines
tools/aubdump.c +0
-0entry_addr >>9 , num_entries *GEN8_PTE_SIZE , AUB_MEM_TRACE_MEMORY_ADDRESS_SPACE_GGTT_ENTRY);Signature · 1 line
2.14.1_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Scott D Phillips
Reviewed-byQuoted 7 lines · Tvrtko Ursulin
Quoted 6 lines · Scott D Phillips
Quoted 3 lines · Tvrtko Ursulin
From: Tvrtko Ursulin <[email protected]>
Back to a clean build with no warnings, at least for me.
Quoted 8 lines
Quoted 4 lines
Why c90? If that's the language we mean to target then we should probably add it to the build system so people with gcc 5.1 and later will see the warnings too. fwiw, my build with clang 6 gives a couple dozen warnings.
I am building under Ubuntu 17.10 with GCC 7.2.0. Normal configure && make, and get this warning. And since I can't spot that IGT is setting the C standard explicitly, I guess that's the default.
Ah, turns out it's not -std=c90, but an explicit -Wdeclaration-after-statement that we pick up through XORG_DEFAULT_OPTIONS. Clang seems to emit that warning only if it's in c90 mode, which is why I didn't see it. So I'll say
Quoted 39 lines
This one is the only warning on my build btw.
Regards,
Tvrtko
Quoted 33 lines
Quoted 28 lines
Signed-off-by Tvrtko Ursulin <[email protected]>Cc Jordan Justen <[email protected]>Cc Scott D Phillips <[email protected]>--- tools/aubdump.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)tools/aubdump.c +4
-3@@ -394,10 +394,11 @@ gen8_emit_ggtt_pte_for_range(uint64_t start, uint64_t end) entry_addr = start & ~(4096 -1 ); do { + uint64_t last_page_entry, num_entries; + page_num = entry_addr >> 21; - uint64_t last_page_entry = - min((page_num + 1) << 21, end_aligned); - uint64_t num_entries = (last_page_entry - entry_addr) >> 12; + last_page_entry = min((page_num + 1) << 21, end_aligned); + num_entries = (last_page_entry - entry_addr) >> 12; mem_trace_memory_write_header_out( entry_addr >> 9, num_entries * GEN8_PTE_SIZE, AUB_MEM_TRACE_MEMORY_ADDRESS_SPACE_GGTT_ENTRY);Signature · 1 line
2.14.1_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev