From patchwork Wed Sep 27 07:43:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 819009 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.b="WP//q08M"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y29963dF9z9t1G for ; Wed, 27 Sep 2017 17:55:22 +1000 (AEST) Received: from localhost ([::1]:53049 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dx7Bg-00031T-Jv for incoming@patchwork.ozlabs.org; Wed, 27 Sep 2017 03:55:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dx70P-0001TK-2V for qemu-devel@nongnu.org; Wed, 27 Sep 2017 03:43:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dx70N-00046S-Sj for qemu-devel@nongnu.org; Wed, 27 Sep 2017 03:43:41 -0400 Received: from ozlabs.org ([103.22.144.67]:49611) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dx70N-00044O-FP; Wed, 27 Sep 2017 03:43:39 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3y28vP1whVz9tXf; Wed, 27 Sep 2017 17:43:28 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1506498209; bh=XNAB8P5Qi4lRb+IfLIj9Z+5B29yRmOlbSRwkiPSxZMw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WP//q08MzlbyAfkcOHo8t3gVNqqS6/pVBCNfZzZCdlVydfiL9JYJyWv8EIdQj7o7f BR99HJSgmhAHY2Oivnu53FjlTc6Y6yERagIWuptzlAMuWOqTRqM/48+RtpxG/OVj0K 30emd0xGAAj0KD3mxahGOQtjW9+Q5WkeqGn0Cuhg= From: David Gibson To: peter.maydell@linaro.org Date: Wed, 27 Sep 2017 17:43:05 +1000 Message-Id: <20170927074316.4454-16-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170927074316.4454-1-david@gibson.dropbear.id.au> References: <20170927074316.4454-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 15/26] ppc/pnv: Improve macro parenthesization 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: agraf@suse.de, mark.cave-ayland@ilande.co.uk, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Eric Blake Although none of the existing macro call-sites were broken, it's always better to write macros that properly parenthesize arguments that can be complex expressions, so that the intended order of operations is not broken. Signed-off-by: Eric Blake Reviewed-by: Cédric Le Goater Signed-off-by: David Gibson --- include/hw/ppc/pnv_xscom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/ppc/pnv_xscom.h b/include/hw/ppc/pnv_xscom.h index 3757b2cab9..38077b4796 100644 --- a/include/hw/ppc/pnv_xscom.h +++ b/include/hw/ppc/pnv_xscom.h @@ -54,7 +54,7 @@ typedef struct PnvXScomInterfaceClass { * PCB SLAVE 0x110Fxxxx */ -#define PNV_XSCOM_EX_CORE_BASE(base, i) (base | (((uint64_t)i) << 24)) +#define PNV_XSCOM_EX_CORE_BASE(base, i) ((base) | ((uint64_t)(i) << 24)) #define PNV_XSCOM_EX_CORE_SIZE 0x100000 #define PNV_XSCOM_LPC_BASE 0xb0020