intel: decoder: reorder iterator init function
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 2 Aug 2017 21:30:14 +0000 (22:30 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 1 Nov 2017 13:19:20 +0000 (13:19 +0000)
Making the next change more readable.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
src/intel/common/gen_decoder.c

index acd0908acb36953dcbf900b95c06be567196dec1..bd3e139404c34a0b5d01a4009d679a9e1fa4b368 100644 (file)
@@ -758,20 +758,6 @@ gen_group_get_length(struct gen_group *group, const uint32_t *p)
    return -1;
 }
 
-void
-gen_field_iterator_init(struct gen_field_iterator *iter,
-                        struct gen_group *group,
-                        const uint32_t *p,
-                        bool print_colors)
-{
-   memset(iter, 0, sizeof(*iter));
-
-   iter->group = group;
-   iter->field = group->fields;
-   iter->p = p;
-   iter->print_colors = print_colors;
-}
-
 static const char *
 gen_get_enum_name(struct gen_enum *e, uint64_t value)
 {
@@ -941,6 +927,20 @@ gen_field_iterator_next(struct gen_field_iterator *iter)
    return true;
 }
 
+void
+gen_field_iterator_init(struct gen_field_iterator *iter,
+                        struct gen_group *group,
+                        const uint32_t *p,
+                        bool print_colors)
+{
+   memset(iter, 0, sizeof(*iter));
+
+   iter->group = group;
+   iter->field = group->fields;
+   iter->p = p;
+   iter->print_colors = print_colors;
+}
+
 static void
 print_dword_header(FILE *outfile,
                    struct gen_field_iterator *iter,