From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guenter Roeck Subject: Re: [net 1/1] net/mlx5: Fix build break when CONFIG_SMP=n Date: Tue, 15 May 2018 13:11:53 -0700 Message-ID: <20180515201153.GA23952@roeck-us.net> References: <20180514223810.21197-1-saeedm@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: "David S. Miller" , netdev@vger.kernel.org, Randy Dunlap , Thomas Gleixner To: Saeed Mahameed Return-path: Received: from bh-25.webhostbox.net ([208.91.199.152]:44870 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751104AbeEOUL4 (ORCPT ); Tue, 15 May 2018 16:11:56 -0400 Content-Disposition: inline In-Reply-To: <20180514223810.21197-1-saeedm@mellanox.com> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, May 14, 2018 at 03:38:10PM -0700, Saeed Mahameed wrote: > Avoid using the kernel's irq_descriptor and return IRQ vector affinity > directly from the driver. > > This fixes the following build break when CONFIG_SMP=n > > include/linux/mlx5/driver.h: In function ‘mlx5_get_vector_affinity_hint’: > include/linux/mlx5/driver.h:1299:13: error: > ‘struct irq_desc’ has no member named ‘affinity_hint’ > > Fixes: 6082d9c9c94a ("net/mlx5: Fix mlx5_get_vector_affinity function") > Signed-off-by: Saeed Mahameed > CC: Randy Dunlap > CC: Guenter Roeck > CC: Thomas Gleixner > Tested-by: Israel Rukshin Tested-by: Guenter Roeck > --- > > For -stable v4.14 > > include/linux/mlx5/driver.h | 12 +----------- > 1 file changed, 1 insertion(+), 11 deletions(-) > > diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h > index 2a156c5dfadd..d703774982ca 100644 > --- a/include/linux/mlx5/driver.h > +++ b/include/linux/mlx5/driver.h > @@ -1286,17 +1286,7 @@ enum { > static inline const struct cpumask * > mlx5_get_vector_affinity_hint(struct mlx5_core_dev *dev, int vector) > { > - struct irq_desc *desc; > - unsigned int irq; > - int eqn; > - int err; > - > - err = mlx5_vector2eqn(dev, vector, &eqn, &irq); > - if (err) > - return NULL; > - > - desc = irq_to_desc(irq); > - return desc->affinity_hint; > + return dev->priv.irq_info[vector].mask; > } > > #endif /* MLX5_DRIVER_H */ > -- > 2.17.0 >