]> xenbits.xensource.com Git - people/andrewcoop/hwloc.git/commitdiff
linux: remove two debug asserts that make no se...
authorBrice Goglin <brice.goglin@inria.fr>
Fri, 14 Jun 2013 14:13:22 +0000 (14:13 +0000)
committerBrice Goglin <brice.goglin@inria.fr>
Fri, 14 Jun 2013 14:13:22 +0000 (14:13 +0000)
linux: remove two debug asserts that make no sense

We actually wanted to check topology->backends (the first one) instead
of the local backend variable (which is obviously "linux").
But this code can still be valid when using x86+linux anyway.

This commit was SVN r5673.

src/topology-linux.c

index 563d106ea41faadce7ebade011d365440314f512..29ac65735270098849f8fcea992fa2beb97c2862 100644 (file)
@@ -4079,12 +4079,6 @@ hwloc_linux_backend_notify_new_object(struct hwloc_backend *backend, struct hwlo
   assert(obj->type == HWLOC_OBJ_PCI_DEVICE);
 
   /* this should not be called if the backend isn't the real OS one */
-#ifdef HWLOC_DEBUG
-  {
-    int cmp = strcmp(backend->component->name, "linux");
-    assert(!cmp);
-  }
-#endif
   assert(data->is_real_fsroot);
 
   snprintf(pcidevpath, sizeof(pcidevpath), "/sys/bus/pci/devices/%04x:%02x:%02x.%01x/",
@@ -4125,12 +4119,6 @@ hwloc_linux_backend_get_obj_cpuset(struct hwloc_backend *backend,
         || (obj->type == HWLOC_OBJ_BRIDGE && obj->attr->bridge.upstream_type == HWLOC_OBJ_BRIDGE_PCI));
 
   /* this should not be called if the backend isn't the real OS one */
-#ifdef HWLOC_DEBUG
-  {
-    int cmp = strcmp(backend->component->name, "linux");
-    assert(!cmp);
-  }
-#endif
   assert(data->is_real_fsroot);
 
   snprintf(path, sizeof(path), "/sys/bus/pci/devices/%04x:%02x:%02x.%01x/local_cpus",