public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] intel_reg: Use static iterator
@ 2020-01-23 13:48 Petri Latvala
  2020-01-23 13:49 ` Tvrtko Ursulin
  2020-01-23 15:33 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Petri Latvala @ 2020-01-23 13:48 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala, Tvrtko Ursulin

Convert open-coded for loops to __for_each_static_engine. That takes
care of the last direct user of intel_execution_engines2.

More work is needed to make intel_reg support dynamically queried
engines but this restores the old functionality.

Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 tools/intel_reg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/intel_reg.c b/tools/intel_reg.c
index 847fdbed..5f1beba4 100644
--- a/tools/intel_reg.c
+++ b/tools/intel_reg.c
@@ -252,7 +252,7 @@ static const struct intel_execution_engine2 *find_engine(const char *name)
 	if (name[0] == '-')
 		name++;
 
-	for (e = intel_execution_engines2; e->name; e++) {
+	__for_each_static_engine(e) {
 		if (!strcasecmp(e->name, name))
 			return e;
 	}
@@ -783,7 +783,7 @@ static int intel_reg_help(struct config *config, int argc, char *argv[])
 	printf("\n\n");
 
 	printf("ENGINE is one of:\n");
-	for (e = intel_execution_engines2; e->name; e++)
+	__for_each_static_engine(e)
 		printf("%s -%s ", e->name, e->name);
 	printf("\n\n");
 
-- 
2.20.1

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

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

* Re: [igt-dev] [PATCH i-g-t] intel_reg: Use static iterator
  2020-01-23 13:48 [igt-dev] [PATCH i-g-t] intel_reg: Use static iterator Petri Latvala
@ 2020-01-23 13:49 ` Tvrtko Ursulin
  2020-01-23 15:33 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Tvrtko Ursulin @ 2020-01-23 13:49 UTC (permalink / raw)
  To: Petri Latvala, igt-dev; +Cc: Tvrtko Ursulin


On 23/01/2020 13:48, Petri Latvala wrote:
> Convert open-coded for loops to __for_each_static_engine. That takes
> care of the last direct user of intel_execution_engines2.
> 
> More work is needed to make intel_reg support dynamically queried
> engines but this restores the old functionality.
> 
> Signed-off-by: Petri Latvala <petri.latvala@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>   tools/intel_reg.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/intel_reg.c b/tools/intel_reg.c
> index 847fdbed..5f1beba4 100644
> --- a/tools/intel_reg.c
> +++ b/tools/intel_reg.c
> @@ -252,7 +252,7 @@ static const struct intel_execution_engine2 *find_engine(const char *name)
>   	if (name[0] == '-')
>   		name++;
>   
> -	for (e = intel_execution_engines2; e->name; e++) {
> +	__for_each_static_engine(e) {
>   		if (!strcasecmp(e->name, name))
>   			return e;
>   	}
> @@ -783,7 +783,7 @@ static int intel_reg_help(struct config *config, int argc, char *argv[])
>   	printf("\n\n");
>   
>   	printf("ENGINE is one of:\n");
> -	for (e = intel_execution_engines2; e->name; e++)
> +	__for_each_static_engine(e)
>   		printf("%s -%s ", e->name, e->name);
>   	printf("\n\n");
>   
> 

My bad for not grepping outside lib and tests with the previous patch. 
Thanks for jumping in!

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

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

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

* [igt-dev] ✗ Fi.CI.BAT: failure for intel_reg: Use static iterator
  2020-01-23 13:48 [igt-dev] [PATCH i-g-t] intel_reg: Use static iterator Petri Latvala
  2020-01-23 13:49 ` Tvrtko Ursulin
@ 2020-01-23 15:33 ` Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2020-01-23 15:33 UTC (permalink / raw)
  To: Petri Latvala; +Cc: igt-dev

== Series Details ==

Series: intel_reg: Use static iterator
URL   : https://patchwork.freedesktop.org/series/72470/
State : failure

== Summary ==

Series 72470 revision 1 was fully merged or fully failed: no git log

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

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

end of thread, other threads:[~2020-01-23 15:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-23 13:48 [igt-dev] [PATCH i-g-t] intel_reg: Use static iterator Petri Latvala
2020-01-23 13:49 ` Tvrtko Ursulin
2020-01-23 15:33 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox