Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3717813imm; Mon, 8 Oct 2018 08:26:47 -0700 (PDT) X-Google-Smtp-Source: ACcGV61q8pqeDXHBfSsVaNvuJWcu7+s8+vAqkXJbS4KTC+xtUrR65zPLv4PQaKka36BMYmFQizvU X-Received: by 2002:a17:902:d808:: with SMTP id a8-v6mr25165362plz.306.1539012407392; Mon, 08 Oct 2018 08:26:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539012407; cv=none; d=google.com; s=arc-20160816; b=06dw1KrTP37Fj7JqP13YCgyAWaJHceCLh0Cc2bVEN+5uD8Wt4Vmx2dRZuM0EHdtNJq kEMdfjcJdx+8UUe9/Nj4UwplcAg9986ApL4r12NVoLJlMHyjAWWSCvX9h4BwRgxAFBn3 UgBVmZ3kg0118Q1aSWDtCE/R3xYlMQIcJu9vCS4UjC9d1wy6JYByimtnO4daacEDfjPB 6CkbtwjF7efnl/bkt9uAUM0MWD+SOXfrErcGrd2RZvxZqGPuGdjfVGaLn/mRQhi3bK9Z urX8tkSpE7iy07KY09csJGG3zvNgViahsyxSRH01MJmNfCyzW0DqJjE4w49RqdNDRcap a2Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=m+tlLJHotxQo5t/edPvPQmsUnFzHPJfHBG4T18PZdcc=; b=xjmKl2oFOSp7sJiVUiXgkZQE50kV4HSGzpgMtau+sC/bhq0pSdOPmLVjxWYX7UusH/ R/wdvydSfltWWuhckH0CAEH14urQKZ5V00iO2CQSUtWreJuQ3YNKljSpjHfQMGdGodIX w8Olrv3LSWmo7xK5Ff7R5wA69JMl5kl7+Qc3RuS54FSThLcKs5af2S5r5Xs75YJGqwX1 GnVx90IiEa8dSQuD9uGPjcc15rv2YfeySdTSlv+b0KwCL+Tqb2QG4Q8+lsn0oxmtNNOU Pkj9FdJz86ei8WKGeEzB2TJ/Oz/Ut2wk99pGQOEYjDEuONl8Sb28EutvipBvdTCEmK6K VNTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lhzqRLB8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b89-v6si19743371plb.143.2018.10.08.08.26.32; Mon, 08 Oct 2018 08:26:47 -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; dkim=pass header.i=@kernel.org header.s=default header.b=lhzqRLB8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728001AbeJHWi1 (ORCPT + 99 others); Mon, 8 Oct 2018 18:38:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:56982 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727447AbeJHWi0 (ORCPT ); Mon, 8 Oct 2018 18:38:26 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D78EA21479; Mon, 8 Oct 2018 15:26:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539012371; bh=Wzg5sKqqs0bmMjMTJcZGyxc9xKzlGhbKxGMrpUGLHBA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lhzqRLB8Zf9bmHzY/CmY0poiY7CrBqdMIs1USIfKAGyI2hdyUR1+XjXZK75Lqs6Gl 6DOf84Z7Tb24qQ4/EllgfVnAeN75QyI4heNezOGE6s6qC50IJlAk21ID7l8dAiRUk3 G9kC5gnKS6/Ta03v+LAEyKf1AKKRhQbAM55cTezU= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Nathan Chancellor , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL 4.18 47/58] net/mlx4: Use cpumask_available for eq->affinity_mask Date: Mon, 8 Oct 2018 11:25:12 -0400 Message-Id: <20181008152523.70705-47-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181008152523.70705-1-sashal@kernel.org> References: <20181008152523.70705-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor [ Upstream commit 8ac1ee6f4d62e781e3b3fd8b9c42b70371427669 ] Clang warns that the address of a pointer will always evaluated as true in a boolean context: drivers/net/ethernet/mellanox/mlx4/eq.c:243:11: warning: address of array 'eq->affinity_mask' will always evaluate to 'true' [-Wpointer-bool-conversion] if (!eq->affinity_mask || cpumask_empty(eq->affinity_mask)) ~~~~~^~~~~~~~~~~~~ 1 warning generated. Use cpumask_available, introduced in commit f7e30f01a9e2 ("cpumask: Add helper cpumask_available()"), which does the proper checking and avoids this warning. Link: https://github.com/ClangBuiltLinux/linux/issues/86 Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx4/eq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c b/drivers/net/ethernet/mellanox/mlx4/eq.c index 1f3372c1802e..2df92dbd38e1 100644 --- a/drivers/net/ethernet/mellanox/mlx4/eq.c +++ b/drivers/net/ethernet/mellanox/mlx4/eq.c @@ -240,7 +240,8 @@ static void mlx4_set_eq_affinity_hint(struct mlx4_priv *priv, int vec) struct mlx4_dev *dev = &priv->dev; struct mlx4_eq *eq = &priv->eq_table.eq[vec]; - if (!eq->affinity_mask || cpumask_empty(eq->affinity_mask)) + if (!cpumask_available(eq->affinity_mask) || + cpumask_empty(eq->affinity_mask)) return; hint_err = irq_set_affinity_hint(eq->irq, eq->affinity_mask); -- 2.17.1