On Tue 14-04-20 17:58:12, Vishal Verma wrote:
[...]
> +static int check_hotplug_node(int nid)
> +{
> +     int alt_nid;
> +
> +     if (node_possible(nid))
> +             return nid;
> +
> +     alt_nid = numa_map_to_online_node(nid);
> +     if (alt_nid == NUMA_NO_NODE)
> +             alt_nid = first_online_node;
> +     WARN_TAINT(1, TAINT_FIRMWARE_WORKAROUND,
> +                "node %d expected, but was absent from the 
> node_possible_map, using %d instead\n",
> +                nid, alt_nid);

I really do not like this. Why should we try to be clever and change the
node id requested by the caller? I would just stick with node_possible
check and be done with this.

-- 
Michal Hocko
SUSE Labs
_______________________________________________
Linux-nvdimm mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to