intel_reg: Use static iterator
PATCH 1/1 intel_reg: Use static iterator
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.
--- tools/intel_reg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/intel_reg.c +2 -2
@@ -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" );
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 27 lines · Petri Latvala
Convert open-coded for loops to
__for_each_static_engine. That takes care of the last direct user ofintel_execution_engines2.More work is needed to make
intel_regsupport dynamically queried engines but this restores the old functionality.Signed-off-by Petri Latvala <[email protected]>Cc Tvrtko Ursulin <[email protected]>--- tools/intel_reg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tools/intel_reg.c +1
-1@@ -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; }
tools/intel_reg.c static int intel_reg_help(struct config *config, int argc, char *argv[]) · line 789
Quoted 8 lines
tools/intel_reg.c +1
-1@@ -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!
Regards,
Tvrtko
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✗ Fi.CI.BAT: failure for intel_reg: Use static iterator
In reply to Petri Latvala== Series Details ==
== 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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev