aubinator: Simplify gen_disasm_create()'s devinfo handling
authorSirisha Gandikota <Sirisha.Gandikota@intel.com>
Thu, 8 Sep 2016 23:15:19 +0000 (16:15 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 12 Sep 2016 23:20:04 +0000 (16:20 -0700)
Copy the whole devinfo structure instead of just few fields (Ken)

Earlier, copied only couple of fields which added more code. So,
simplify code by copying the whole structure.

Signed-off-by: Sirisha Gandikota <Sirisha.Gandikota@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/tools/disasm.c

index ddbfa9f..7e5a7cb 100644 (file)
@@ -89,18 +89,12 @@ struct gen_disasm *
 gen_disasm_create(int pciid)
 {
    struct gen_disasm *gd;
-   const struct gen_device_info *dev_info = NULL;
 
    gd = malloc(sizeof *gd);
    if (gd == NULL)
       return NULL;
 
-   dev_info = gen_get_device_info(pciid);
-
-   gd->devinfo.gen = dev_info->gen;
-   gd->devinfo.is_cherryview = dev_info->is_cherryview;
-   gd->devinfo.is_g4x = dev_info->is_g4x;
-
+   gd->devinfo = *gen_get_device_info(pciid);
    brw_init_compaction_tables(&gd->devinfo);
 
    return gd;