[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5527896E.4040604@dev.mellanox.co.il>
Date: Fri, 10 Apr 2015 11:27:26 +0300
From: Ido Shamay <idos@....mellanox.co.il>
To: Amir Vadai <amirv@...lanox.com>,
"David S. Miller" <davem@...emloft.net>
CC: netdev@...r.kernel.org, Yevgeny Petrilin <yevgenyp@...lanox.com>,
Saeed Mahameed <saeedm@...lanox.com>,
Or Gerlitz <ogerlitz@...lanox.com>,
Achiad Shochat <achiad@...lanox.com>,
Ido Shamay <idos@...lanox.com>,
Rana Shahout <ranas@...lanox.com>
Subject: Re: [PATCH net-next 01/11] net/mlx5_core: Set irq affinity hints
On 4/8/2015 5:51 PM, Amir Vadai wrote:
> From: Saeed Mahameed <saeedm@...lanox.com>
>
> + int numa_node =
> +#if IS_ENABLED(CONFIG_NUMA)
> + mdev->pdev->dev.numa_node;
> +#else
> + -1;
> +#endif
Would be nicer to use dev_to_node helper here, which already checks for
CONFIG_NUMA
include/linux/device.h:
#ifdef CONFIG_NUMA
static inline int dev_to_node(struct device *dev)
{
return dev->numa_node;
}
static inline void set_dev_node(struct device *dev, int node)
{
dev->numa_node = node;
}
#else
static inline int dev_to_node(struct device *dev)
{
return -1;
}
static inline void set_dev_node(struct device *dev, int node)
{
}
#endif
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists