Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2260490imm; Thu, 18 Oct 2018 11:34:33 -0700 (PDT) X-Google-Smtp-Source: ACcGV60ZsTRfi/5Z6M4uPHoxgKY33j8tif5fyUgRxhZUs6EH+NOV0r9iVMWI/28TMkd3eadonjvI X-Received: by 2002:a63:f711:: with SMTP id x17-v6mr29392852pgh.322.1539887673023; Thu, 18 Oct 2018 11:34:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539887672; cv=none; d=google.com; s=arc-20160816; b=XSWQWeqzJ7X/ia9DhfFXiLgnfaEqbvU9IwzsZ0zorDmJo93doi0owTohucR2d+7iI5 w4wLxXhSrQeOcocHCkHQ02tjF+pVT/NqZv+PCy0qBC2bqOK23n0CqQBmf0uZ62KL7a4C zBQTWbIuAmbfo+yUICkvh/6u9QRVYPvkcWq2C2x2R82Lf9jFLpvGgh1TZvboylXNnJbx 65SU3bDk4npvl7KAkFc85xhXAsW4TpWCjOWBmyo39zJKtBIGaBljPdV2mA8rKAksZWph c72CHNtxDpRRcmcyNR/QbLImCWd9X6hvCyKuH4pcLXbTYsWquVqUO4T7DYOKSAq5aEtW j63Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hWIP/PV5FwC3a5k6NckalKhmweusHtEBJZNOj9U3/hQ=; b=jyfHpOsyfd0qeTwAjGXoKkEBk0XIeid45ergZYX7+jXANqEQVpJ5EfwJRrp+Tbxwbf tchZC+nbWgc+RhK+QmSONAT6Xlb5Amz7JI7Z2Q0VHuVQA9nXMQK0nEf8ON5lxMUEkwEI dy8LUbri5mymV9uRxBUoAG40IrjHeZNY00xOKl4PObqbzDbkGgUmx/SLUyMp4KCknlnN 6agJXmVfzvBoKPwLzkBw287bisn8m0xRRAi+Ogtt6/d27oKyx2VAuBw56NGnleAc3Ytp m0rfJTHDeSHBq17odWG88I0g7Vwr9LSX2soDP2xcIYjSp3Vcz8+zLI8hRdN0MLejfGtY ku8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DPF1CQdw; 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 c5-v6si20170731pgq.226.2018.10.18.11.34.17; Thu, 18 Oct 2018 11:34:32 -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=DPF1CQdw; 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 S1730662AbeJSCJ0 (ORCPT + 99 others); Thu, 18 Oct 2018 22:09:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:58838 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728851AbeJSCJZ (ORCPT ); Thu, 18 Oct 2018 22:09:25 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6A85F20658; Thu, 18 Oct 2018 18:07:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539886037; bh=NAab/DawTbwz97yAymf424JRHBvr8024NQn2tkhY8Qc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DPF1CQdw5m1c3FcdHu8wK9qGBgsJa4lUaP/PLlNVxXVKMsu/fMJ1Zhkz5IR67Nm6g +Dkc6lXOtP2vV/C4uJq3HOPso7d7wquc6A3aMI+ZzHLPhs+07+gOf7QLqv5c9QwtP3 ewnqzm4oBGHoKJ5ENkEtNZG8lQrFAxh/foatOc7g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 39/48] net/mlx4: Use cpumask_available for eq->affinity_mask Date: Thu, 18 Oct 2018 19:55:14 +0200 Message-Id: <20181018175430.013043847@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181018175427.133690306@linuxfoundation.org> References: <20181018175427.133690306@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ 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 Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx4/eq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/net/ethernet/mellanox/mlx4/eq.c +++ b/drivers/net/ethernet/mellanox/mlx4/eq.c @@ -228,7 +228,8 @@ static void mlx4_set_eq_affinity_hint(st 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);