Received: by 10.192.165.156 with SMTP id m28csp1082106imm; Wed, 11 Apr 2018 12:04:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx49wDPCoRKwFYVhWK0NyLBbztM3QCn3ppCMAAQ5Dhrq+s0lejbGKyfSGDNEMyGfd8H+0nFSR X-Received: by 2002:a17:902:b082:: with SMTP id p2-v6mr6433669plr.11.1523473488923; Wed, 11 Apr 2018 12:04:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523473488; cv=none; d=google.com; s=arc-20160816; b=M+cs3f69AmdTkdEXwTx1YV5A1tBi3Fg2XmSy/kK8fT1L9BYmyGM6gRHBnWpvLFAzuy yywnacW8/UzX7eh+/fAXvZMsu4vjR4ZtlxOrlc40AbP+5F9HNar2WpjEA+xTqLr2dzrG KzhTBwGXKFCfbMLYZ6AqVVy+eoMhb2nhArkyFxILWqm13GC8OaEB58lIKqy77AyhA4eQ 5XiXt2sdR/6C7w1Nq8Z2eTskdNXzEJIZtxPcDETDmAykVRAkyargfNr7YSFMfyZIEVyA +au2fyEncjHpa12GOHUtdl9nOcxJ7CuKDp9uOBkiH5awroPdf64oblehmaTN5fxf9rEU ZZoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=2MuCuhiPKYGXxM6CUWwnwjeR7E25KWHXL/pIDBOEVYM=; b=j9R9zJS7AEwNJQe5MNraLPxVAt9hthPXRaUgeVoar2DMFBmU2bzh4ZKkMBWTdBHcK0 b8eFbnX4ZcST8ylpPGQa20+xwLknZ0IkTZq9nq9+AQDIZZqYmRNc7OxBkzU9F2W1wXVc wVVHvrm8S45yx9HZNhZnDhuZITdD4xq05y260wSy2JNS4Sx7AWW/7cRJg+MBl9du44Rl JvkAyW6tud3l+4+zte9HmxUlKI/9dnhtb2aNo8H62B6RMFMCN2YJjRuW0kfSfzbFVh1F xgdZ/ErfGqRiuV2DBCLKsPMw3Y5zVsMr7hm8bw2LRHvgWnTOz7CHsFr1ego7pJkva9nF 8lMQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y7-v6si1656774plh.583.2018.04.11.12.04.12; Wed, 11 Apr 2018 12:04:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756578AbeDKS7p (ORCPT + 99 others); Wed, 11 Apr 2018 14:59:45 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37482 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754570AbeDKS7n (ORCPT ); Wed, 11 Apr 2018 14:59:43 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7AA28CA0; Wed, 11 Apr 2018 18:59:42 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Saeed Mahameed , "David S. Miller" , Sasha Levin Subject: [PATCH 4.9 157/310] net/mlx5: avoid build warning for uniprocessor Date: Wed, 11 Apr 2018 20:34:56 +0200 Message-Id: <20180411183629.159068749@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180411183622.305902791@linuxfoundation.org> References: <20180411183622.305902791@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann [ Upstream commit f0d7ae95fff4ab444b8433f07afc4b077ef1a285 ] Building the driver with CONFIG_SMP disabled results in a harmless warning: ethernet/mellanox/mlx5/core/main.c: In function 'mlx5_irq_set_affinity_hint': ethernet/mellanox/mlx5/core/main.c:615:6: error: unused variable 'irq' [-Werror=unused-variable] It's better to express the conditional compilation using IS_ENABLED() here, as that lets the compiler see what the intented use for the variable is, and that it can be silently discarded. Fixes: b665d98edc9a ("net/mlx5: Tolerate irq_set_affinity_hint() failures") Signed-off-by: Arnd Bergmann Acked-by: Saeed Mahameed Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -557,10 +557,9 @@ static int mlx5_irq_set_affinity_hint(st cpumask_set_cpu(cpumask_local_spread(i, priv->numa_node), priv->irq_info[i].mask); -#ifdef CONFIG_SMP - if (irq_set_affinity_hint(irq, priv->irq_info[i].mask)) + if (IS_ENABLED(CONFIG_SMP) && + irq_set_affinity_hint(irq, priv->irq_info[i].mask)) mlx5_core_warn(mdev, "irq_set_affinity_hint failed, irq 0x%.4x", irq); -#endif return 0; }