Igor Mammedov 6bea1ddf8b numa: reduce code duplication by adding helper numa_get_node_for_cpu()
Replace repeated pattern

    for (i = 0; i < nb_numa_nodes; i++) {
        if (test_bit(idx, numa_info[i].node_cpu)) {
           ...
           break;

with a helper function to lookup numa node index for cpu.

Suggested-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-10-10 01:16:57 +03:00
..
2016-05-12 13:40:48 +01:00
2016-05-19 16:42:27 +02:00
2016-06-06 16:59:31 +01:00
2016-06-06 16:59:31 +01:00
2016-06-13 13:24:41 +02:00
2016-05-12 13:42:08 +01:00
2016-06-13 13:24:41 +02:00
2016-07-04 13:15:22 +01:00
2016-06-06 16:59:31 +01:00
2016-06-13 13:24:41 +02:00
2016-06-06 16:59:31 +01:00
2016-07-04 13:15:22 +01:00
2016-07-04 13:15:22 +01:00