From patchwork Thu Dec 22 14:30:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 88872 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp2836861qgi; Thu, 22 Dec 2016 06:34:26 -0800 (PST) X-Received: by 10.55.161.87 with SMTP id k84mr11420426qke.234.1482417266419; Thu, 22 Dec 2016 06:34:26 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id a8si17582852qte.122.2016.12.22.06.34.26 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 22 Dec 2016 06:34:26 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:34507 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cK4Ru-0002La-2L for patch@linaro.org; Thu, 22 Dec 2016 09:34:26 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cK4Og-0007dB-3a for qemu-devel@nongnu.org; Thu, 22 Dec 2016 09:31:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cK4Ob-00087e-An for qemu-devel@nongnu.org; Thu, 22 Dec 2016 09:31:06 -0500 Received: from mail-oi0-x242.google.com ([2607:f8b0:4003:c06::242]:34132) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cK4Ob-00087T-5P for qemu-devel@nongnu.org; Thu, 22 Dec 2016 09:31:01 -0500 Received: by mail-oi0-x242.google.com with SMTP id 3so4088330oih.1 for ; Thu, 22 Dec 2016 06:31:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=gpCRvLTdvMqIWYapnUTXdY8qwnnpDwc2NyliaB/TrD8=; b=PtBPcYpBbldvKbwqmO6+B+fDBO74rYl5tGFBPDt1L49ncYZCOvmwxVjMBx1vVi8hlx Qi9CNSO2RQriWs3Z5pLJi9A2BISikqPxaE7yVjh2UoSA3pClMRJreOfCnOqPegEQoBoq Ktl8uAwspfN9MF/SYJVCOBFA10lpShqi3t7EXW3EErLG8i+44kSnLHvIGbpbqt/LZwE9 oXb6qfTI2/o9uqEOA8b97+UNJCe7rMb1YhX46UZnMvzJvvX2JJgirgWheaEw9N/GmSZl cVwn0BNiA42KTR67JvoX7/OZ8gEXzP8VHC4zqUcZZ36gacBLAG46wm932sZQlDZNV+IH xDqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=gpCRvLTdvMqIWYapnUTXdY8qwnnpDwc2NyliaB/TrD8=; b=BrMmY36JqwpzFA4yyKg2OeRqirx3iTUXEN4U3/QkuMK41k2E5IJQstM0e2D1l2fQLh L7Lp6wrAb7IUhWVotIfC2m77JvX9y751nfYeYmDy9/GU3tSqGRc0wR9TvoMRmDOj9Qq7 lXfOn5SSxYKDKSYijYD/HcSpUN5xdU5dh+F7N+NNSRjuz98XZeHdCHCnQNH6OAtbMV35 AeZUQx+uRDxsDh2VOvt9skr0h9kIU0ZGgO+p+YWbuEI3robFbOMbDt1zrcwKmz3ULu2Z HDehk/Qs/ILwtmqbtWow90m8mqfIXBDx/HiRSgwmEOILS8DD/icthGuQxbKalVwS/vx5 2KpA== X-Gm-Message-State: AIkVDXLHZ/WvCxvocgTAkt6mXwauKvVMeYwNwEwbP1do03yWV4C1xVH4IPhAMxL1OocIMw== X-Received: by 10.157.40.12 with SMTP id m12mr4229296otb.226.1482417060416; Thu, 22 Dec 2016 06:31:00 -0800 (PST) Received: from serve.minyard.net ([47.184.183.230]) by smtp.gmail.com with ESMTPSA id 68sm279675oto.39.2016.12.22.06.30.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Dec 2016 06:30:59 -0800 (PST) Received: from t430.minyard.net (unknown [IPv6:2001:470:b8f6:1b:5572:ad87:9d15:4a12]) by serve.minyard.net (Postfix) with ESMTPA id 83EE8F80; Thu, 22 Dec 2016 08:30:58 -0600 (CST) Received: by t430.minyard.net (Postfix, from userid 1000) id F3C4E302773; Thu, 22 Dec 2016 08:30:57 -0600 (CST) From: minyard@acm.org To: Bug 1651167 <1651167@bugs.launchpad.net>, qemu-devel@nongnu.org Date: Thu, 22 Dec 2016 08:30:47 -0600 Message-Id: <1482417047-15588-1-git-send-email-minyard@acm.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20161219154752.14563.46483.malonedeb@wampee.canonical.com> References: <20161219154752.14563.46483.malonedeb@wampee.canonical.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::242 Subject: [Qemu-devel] [PATCH] ipmi: Add parenthesis around some macro parameters X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Corey Minyard Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Corey Minyard Macro parameters should almost always have () around them when used. llvm reported an error on this. Reported in https://bugs.launchpad.net/bugs/1651167 Signed-off-by: Corey Minyard --- hw/ipmi/isa_ipmi_bt.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) -- 2.7.4 diff --git a/hw/ipmi/isa_ipmi_bt.c b/hw/ipmi/isa_ipmi_bt.c index f036617..8a97314 100644 --- a/hw/ipmi/isa_ipmi_bt.c +++ b/hw/ipmi/isa_ipmi_bt.c @@ -40,37 +40,37 @@ #define IPMI_BT_CLR_WR_MASK (1 << IPMI_BT_CLR_WR_BIT) #define IPMI_BT_GET_CLR_WR(d) (((d) >> IPMI_BT_CLR_WR_BIT) & 0x1) #define IPMI_BT_SET_CLR_WR(d, v) (d) = (((d) & ~IPMI_BT_CLR_WR_MASK) | \ - (((v & 1) << IPMI_BT_CLR_WR_BIT))) + ((((v) & 1) << IPMI_BT_CLR_WR_BIT))) #define IPMI_BT_CLR_RD_MASK (1 << IPMI_BT_CLR_RD_BIT) #define IPMI_BT_GET_CLR_RD(d) (((d) >> IPMI_BT_CLR_RD_BIT) & 0x1) #define IPMI_BT_SET_CLR_RD(d, v) (d) = (((d) & ~IPMI_BT_CLR_RD_MASK) | \ - (((v & 1) << IPMI_BT_CLR_RD_BIT))) + ((((v) & 1) << IPMI_BT_CLR_RD_BIT))) #define IPMI_BT_H2B_ATN_MASK (1 << IPMI_BT_H2B_ATN_BIT) #define IPMI_BT_GET_H2B_ATN(d) (((d) >> IPMI_BT_H2B_ATN_BIT) & 0x1) #define IPMI_BT_SET_H2B_ATN(d, v) (d) = (((d) & ~IPMI_BT_H2B_ATN_MASK) | \ - (((v & 1) << IPMI_BT_H2B_ATN_BIT))) + ((((v) & 1) << IPMI_BT_H2B_ATN_BIT))) #define IPMI_BT_B2H_ATN_MASK (1 << IPMI_BT_B2H_ATN_BIT) #define IPMI_BT_GET_B2H_ATN(d) (((d) >> IPMI_BT_B2H_ATN_BIT) & 0x1) #define IPMI_BT_SET_B2H_ATN(d, v) (d) = (((d) & ~IPMI_BT_B2H_ATN_MASK) | \ - (((v & 1) << IPMI_BT_B2H_ATN_BIT))) + ((((v) & 1) << IPMI_BT_B2H_ATN_BIT))) #define IPMI_BT_SMS_ATN_MASK (1 << IPMI_BT_SMS_ATN_BIT) #define IPMI_BT_GET_SMS_ATN(d) (((d) >> IPMI_BT_SMS_ATN_BIT) & 0x1) #define IPMI_BT_SET_SMS_ATN(d, v) (d) = (((d) & ~IPMI_BT_SMS_ATN_MASK) | \ - (((v & 1) << IPMI_BT_SMS_ATN_BIT))) + ((((v) & 1) << IPMI_BT_SMS_ATN_BIT))) #define IPMI_BT_HBUSY_MASK (1 << IPMI_BT_HBUSY_BIT) #define IPMI_BT_GET_HBUSY(d) (((d) >> IPMI_BT_HBUSY_BIT) & 0x1) #define IPMI_BT_SET_HBUSY(d, v) (d) = (((d) & ~IPMI_BT_HBUSY_MASK) | \ - (((v & 1) << IPMI_BT_HBUSY_BIT))) + ((((v) & 1) << IPMI_BT_HBUSY_BIT))) #define IPMI_BT_BBUSY_MASK (1 << IPMI_BT_BBUSY_BIT) #define IPMI_BT_GET_BBUSY(d) (((d) >> IPMI_BT_BBUSY_BIT) & 0x1) #define IPMI_BT_SET_BBUSY(d, v) (d) = (((d) & ~IPMI_BT_BBUSY_MASK) | \ - (((v & 1) << IPMI_BT_BBUSY_BIT))) + ((((v) & 1) << IPMI_BT_BBUSY_BIT))) /* Mask register */ @@ -80,12 +80,12 @@ #define IPMI_BT_B2H_IRQ_EN_MASK (1 << IPMI_BT_B2H_IRQ_EN_BIT) #define IPMI_BT_GET_B2H_IRQ_EN(d) (((d) >> IPMI_BT_B2H_IRQ_EN_BIT) & 0x1) #define IPMI_BT_SET_B2H_IRQ_EN(d, v) (d) = (((d) & ~IPMI_BT_B2H_IRQ_EN_MASK) | \ - (((v & 1) << IPMI_BT_B2H_IRQ_EN_BIT))) + ((((v) & 1) << IPMI_BT_B2H_IRQ_EN_BIT))) #define IPMI_BT_B2H_IRQ_MASK (1 << IPMI_BT_B2H_IRQ_BIT) #define IPMI_BT_GET_B2H_IRQ(d) (((d) >> IPMI_BT_B2H_IRQ_BIT) & 0x1) #define IPMI_BT_SET_B2H_IRQ(d, v) (d) = (((d) & ~IPMI_BT_B2H_IRQ_MASK) | \ - (((v & 1) << IPMI_BT_B2H_IRQ_BIT))) + ((((v) & 1) << IPMI_BT_B2H_IRQ_BIT))) typedef struct IPMIBT { IPMIBmc *bmc;