Skip to contentSkip to conversation

is sba_map_ioc_to_node() needed in arch/ia64/hp/common/sba_iommu.c

DISCUSSION Toralf Förster 1 participant 1 message Jun 8, 2014

lore
Share & tools
lore
#0 lore raw

I'm playing with cppcheck which complains about :

        /* setup NUMA node association */
        sba_map_ioc_to_node(ioc, device->handle);
        return 0;<--- Memory leak: ioc
}

Well, cppcheck produces a fair amount of false positives, but in this case I'm just wondering if there is really just one caller of the function sba_map_ioc_to_node and furthermore if the function itself is needed b/c its whole body is #ifdef'ed ? :

static void __init
sba_map_ioc_to_node(struct ioc *ioc, acpi_handle handle) {

#ifdef CONFIG_NUMA
        unsigned int node;

        node = acpi_get_node(handle);
        if (node != NUMA_NO_NODE && !node_online(node))
                node = NUMA_NO_NODE;

        ioc->node = node;

#endif
}

Signature · 1 line
Toralf