diff options
author | Petri Latvala <petri.latvala@intel.com> | 2020-01-23 15:48:13 +0200 |
---|---|---|
committer | Petri Latvala <petri.latvala@intel.com> | 2020-01-23 16:04:10 +0200 |
commit | 8dbe5ce61baa2d563d4dd7c56a018bb1e1077467 (patch) | |
tree | 8211c33656418915a0be0c48a2e1f598e2e37c8c /tools/intel_reg.c | |
parent | 4ff48cdd5c94140d2dd9bfa3225a6e1e0238e247 (diff) |
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.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'tools/intel_reg.c')
-rw-r--r-- | tools/intel_reg.c | 4 |
1 files 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"); |