[IA64] BUG to BUG_ON changes
[sfrench/cifs-2.6.git] / arch / ia64 / sn / kernel / sn2 / sn_hwperf.c
index 45f3c23904286368187c10725bd59e3dd8dda1a3..9e6491cf72bd4f1d1246b826e4fa878b4fce7394 100644 (file)
@@ -275,8 +275,7 @@ static int sn_hwperf_get_nearest_node_objdata(struct sn_hwperf_object_info *objb
 
        /* get it's interconnect topology */
        sz = op->ports * sizeof(struct sn_hwperf_port_info);
-       if (sz > sizeof(ptdata))
-               BUG();
+       BUG_ON(sz > sizeof(ptdata));
        e = ia64_sn_hwperf_op(sn_hwperf_master_nasid,
                              SN_HWPERF_ENUM_PORTS, nodeobj->id, sz,
                              (u64)&ptdata, 0, 0, NULL);
@@ -310,8 +309,7 @@ static int sn_hwperf_get_nearest_node_objdata(struct sn_hwperf_object_info *objb
        if (router && (!found_cpu || !found_mem)) {
                /* search for a node connected to the same router */
                sz = router->ports * sizeof(struct sn_hwperf_port_info);
-               if (sz > sizeof(ptdata))
-                       BUG();
+               BUG_ON(sz > sizeof(ptdata));
                e = ia64_sn_hwperf_op(sn_hwperf_master_nasid,
                                      SN_HWPERF_ENUM_PORTS, router->id, sz,
                                      (u64)&ptdata, 0, 0, NULL);