summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2017-03-15 00:40:44 -0700
committerKenneth Graunke <[email protected]>2017-03-16 10:48:37 -0700
commitf0aa8fd4e46f7fb00b493ce0267b4404b4a1a0dd (patch)
tree234ce6d51340c3860e7b5430231582aec19067a4 /src/intel
parent65138ce0196d9b9d0a99fbac1ddf936a8b7c522b (diff)
aubinator: Delete redundant NULL check.
handle_struct_decode() is just a wrapper around decode_structure() with a NULL check. But the only caller already does that NULL check. So, just use decode_structure() directly. Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/tools/aubinator.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/intel/tools/aubinator.c b/src/intel/tools/aubinator.c
index 139637cfefa..676358f57a1 100644
--- a/src/intel/tools/aubinator.c
+++ b/src/intel/tools/aubinator.c
@@ -162,15 +162,6 @@ decode_structure(struct gen_spec *spec, struct gen_group *strct,
}
static void
-handle_struct_decode(struct gen_spec *spec, char *struct_name, uint32_t *p)
-{
- if (struct_name == NULL)
- return;
- struct gen_group *struct_val = gen_spec_find_struct(spec, struct_name);
- decode_structure(spec, struct_val, p);
-}
-
-static void
dump_binding_table(struct gen_spec *spec, uint32_t offset)
{
uint32_t *pointers, i;
@@ -802,7 +793,9 @@ parse_commands(struct gen_spec *spec, uint32_t *cmds, int size, int engine)
if (token != NULL) {
printf("0x%08"PRIx64": 0x%08x : Dword %d\n",
offset + 4 * idx, p[idx], idx);
- handle_struct_decode(spec,token, &p[idx]);
+ struct gen_group *struct_val =
+ gen_spec_find_struct(spec, token);
+ decode_structure(spec, struct_val, &p[idx]);
token = NULL;
}
}