All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tools/aubdump: Fix ISO C90 forbids mixed declarations and code warning
@ 2018-04-09 16:35 ` Tvrtko Ursulin
  0 siblings, 0 replies; 10+ messages in thread
From: Tvrtko Ursulin @ 2018-04-09 16:35 UTC (permalink / raw)
  To: igt-dev; +Cc: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Back to a clean build with no warnings, at least for me.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Scott D Phillips <scott.d.phillips@intel.com>
---
 tools/aubdump.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/aubdump.c b/tools/aubdump.c
index 267061b0fc2b..2d2b6c607a43 100644
--- a/tools/aubdump.c
+++ b/tools/aubdump.c
@@ -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);
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [igt-dev] [PATCH i-g-t] tools/aubdump: Fix ISO C90 forbids mixed declarations and code warning
@ 2018-04-09 16:35 ` Tvrtko Ursulin
  0 siblings, 0 replies; 10+ messages in thread
From: Tvrtko Ursulin @ 2018-04-09 16:35 UTC (permalink / raw)
  To: igt-dev; +Cc: Intel-gfx, Tvrtko Ursulin

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Back to a clean build with no warnings, at least for me.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Scott D Phillips <scott.d.phillips@intel.com>
---
 tools/aubdump.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/aubdump.c b/tools/aubdump.c
index 267061b0fc2b..2d2b6c607a43 100644
--- a/tools/aubdump.c
+++ b/tools/aubdump.c
@@ -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);
-- 
2.14.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH i-g-t] tools/aubdump: Fix ISO C90 forbids mixed declarations and code warning
  2018-04-09 16:35 ` [igt-dev] " Tvrtko Ursulin
@ 2018-04-09 17:03   ` Scott D Phillips
  -1 siblings, 0 replies; 10+ messages in thread
From: Scott D Phillips @ 2018-04-09 17:03 UTC (permalink / raw)
  To: Tvrtko Ursulin, igt-dev; +Cc: Intel-gfx

Tvrtko Ursulin <tursulin@ursulin.net> writes:

> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> 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.

> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Scott D Phillips <scott.d.phillips@intel.com>
> ---
>  tools/aubdump.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/tools/aubdump.c b/tools/aubdump.c
> index 267061b0fc2b..2d2b6c607a43 100644
> --- a/tools/aubdump.c
> +++ b/tools/aubdump.c
> @@ -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);
> -- 
> 2.14.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Intel-gfx] [PATCH i-g-t] tools/aubdump: Fix ISO C90 forbids mixed declarations and code warning
@ 2018-04-09 17:03   ` Scott D Phillips
  0 siblings, 0 replies; 10+ messages in thread
From: Scott D Phillips @ 2018-04-09 17:03 UTC (permalink / raw)
  To: Tvrtko Ursulin, igt-dev; +Cc: Intel-gfx

Tvrtko Ursulin <tursulin@ursulin.net> writes:

> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> 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.

> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Scott D Phillips <scott.d.phillips@intel.com>
> ---
>  tools/aubdump.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/tools/aubdump.c b/tools/aubdump.c
> index 267061b0fc2b..2d2b6c607a43 100644
> --- a/tools/aubdump.c
> +++ b/tools/aubdump.c
> @@ -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);
> -- 
> 2.14.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for tools/aubdump: Fix ISO C90 forbids mixed declarations and code warning
  2018-04-09 16:35 ` [igt-dev] " Tvrtko Ursulin
  (?)
  (?)
@ 2018-04-09 17:28 ` Patchwork
  -1 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2018-04-09 17:28 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: igt-dev

== 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_4037
1cda370ffded 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#102575

fdo#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
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for tools/aubdump: Fix ISO C90 forbids mixed declarations and code warning
  2018-04-09 16:35 ` [igt-dev] " Tvrtko Ursulin
                   ` (2 preceding siblings ...)
  (?)
@ 2018-04-09 22:42 ` Patchwork
  -1 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2018-04-09 22:42 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: igt-dev

== 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#100047

fdo#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
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tools/aubdump: Fix ISO C90 forbids mixed declarations and code warning
  2018-04-09 17:03   ` [Intel-gfx] " Scott D Phillips
@ 2018-04-10  7:42     ` Tvrtko Ursulin
  -1 siblings, 0 replies; 10+ messages in thread
From: Tvrtko Ursulin @ 2018-04-10  7:42 UTC (permalink / raw)
  To: Scott D Phillips, Tvrtko Ursulin, igt-dev; +Cc: Intel-gfx


On 09/04/2018 18:03, Scott D Phillips wrote:
> Tvrtko Ursulin <tursulin@ursulin.net> writes:
> 
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> 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

>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Cc: Jordan Justen <jordan.l.justen@intel.com>
>> Cc: Scott D Phillips <scott.d.phillips@intel.com>
>> ---
>>   tools/aubdump.c | 7 ++++---
>>   1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/tools/aubdump.c b/tools/aubdump.c
>> index 267061b0fc2b..2d2b6c607a43 100644
>> --- a/tools/aubdump.c
>> +++ b/tools/aubdump.c
>> @@ -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);
>> -- 
>> 2.14.1
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tools/aubdump: Fix ISO C90 forbids mixed declarations and code warning
@ 2018-04-10  7:42     ` Tvrtko Ursulin
  0 siblings, 0 replies; 10+ messages in thread
From: Tvrtko Ursulin @ 2018-04-10  7:42 UTC (permalink / raw)
  To: Scott D Phillips, Tvrtko Ursulin, igt-dev; +Cc: Intel-gfx, Tvrtko Ursulin


On 09/04/2018 18:03, Scott D Phillips wrote:
> Tvrtko Ursulin <tursulin@ursulin.net> writes:
> 
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> 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

>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Cc: Jordan Justen <jordan.l.justen@intel.com>
>> Cc: Scott D Phillips <scott.d.phillips@intel.com>
>> ---
>>   tools/aubdump.c | 7 ++++---
>>   1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/tools/aubdump.c b/tools/aubdump.c
>> index 267061b0fc2b..2d2b6c607a43 100644
>> --- a/tools/aubdump.c
>> +++ b/tools/aubdump.c
>> @@ -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);
>> -- 
>> 2.14.1
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tools/aubdump: Fix ISO C90 forbids mixed declarations and code warning
  2018-04-10  7:42     ` Tvrtko Ursulin
@ 2018-04-10 14:57       ` Scott D Phillips
  -1 siblings, 0 replies; 10+ messages in thread
From: Scott D Phillips @ 2018-04-10 14:57 UTC (permalink / raw)
  To: Tvrtko Ursulin, Tvrtko Ursulin, igt-dev; +Cc: Intel-gfx

Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> writes:

> On 09/04/2018 18:03, Scott D Phillips wrote:
>> Tvrtko Ursulin <tursulin@ursulin.net> writes:
>> 
>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>
>>> 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.

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

Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>

> This one is the only warning on my build btw.
>
> Regards,
>
> Tvrtko
>
>>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>> Cc: Jordan Justen <jordan.l.justen@intel.com>
>>> Cc: Scott D Phillips <scott.d.phillips@intel.com>
>>> ---
>>>   tools/aubdump.c | 7 ++++---
>>>   1 file changed, 4 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/tools/aubdump.c b/tools/aubdump.c
>>> index 267061b0fc2b..2d2b6c607a43 100644
>>> --- a/tools/aubdump.c
>>> +++ b/tools/aubdump.c
>>> @@ -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);
>>> -- 
>>> 2.14.1
>> _______________________________________________
>> igt-dev mailing list
>> igt-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/igt-dev
>> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tools/aubdump: Fix ISO C90 forbids mixed declarations and code warning
@ 2018-04-10 14:57       ` Scott D Phillips
  0 siblings, 0 replies; 10+ messages in thread
From: Scott D Phillips @ 2018-04-10 14:57 UTC (permalink / raw)
  To: Tvrtko Ursulin, Tvrtko Ursulin, igt-dev; +Cc: Intel-gfx, Tvrtko Ursulin

Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> writes:

> On 09/04/2018 18:03, Scott D Phillips wrote:
>> Tvrtko Ursulin <tursulin@ursulin.net> writes:
>> 
>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>
>>> 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.

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

Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>

> This one is the only warning on my build btw.
>
> Regards,
>
> Tvrtko
>
>>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>> Cc: Jordan Justen <jordan.l.justen@intel.com>
>>> Cc: Scott D Phillips <scott.d.phillips@intel.com>
>>> ---
>>>   tools/aubdump.c | 7 ++++---
>>>   1 file changed, 4 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/tools/aubdump.c b/tools/aubdump.c
>>> index 267061b0fc2b..2d2b6c607a43 100644
>>> --- a/tools/aubdump.c
>>> +++ b/tools/aubdump.c
>>> @@ -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);
>>> -- 
>>> 2.14.1
>> _______________________________________________
>> igt-dev mailing list
>> igt-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/igt-dev
>> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-04-10 14:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-09 16:35 [PATCH i-g-t] tools/aubdump: Fix ISO C90 forbids mixed declarations and code warning Tvrtko Ursulin
2018-04-09 16:35 ` [igt-dev] " Tvrtko Ursulin
2018-04-09 17:03 ` Scott D Phillips
2018-04-09 17:03   ` [Intel-gfx] " Scott D Phillips
2018-04-10  7:42   ` [igt-dev] " Tvrtko Ursulin
2018-04-10  7:42     ` Tvrtko Ursulin
2018-04-10 14:57     ` Scott D Phillips
2018-04-10 14:57       ` Scott D Phillips
2018-04-09 17:28 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-04-09 22:42 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.