Subject: Re: [PATCH net-next 01/11] net/mlx5_core: Set irq affinity hints

From: Ido Shamay <[email-masked]>
Date: Fri, 10 Apr 2015 11:27:26 +0300

On 4/8/2015 5:51 PM, Amir Vadai wrote:
> From: Saeed Mahameed <[email-masked]>
>
> +	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