From patchwork Thu Nov 24 16:10:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 83957 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp167506qgi; Thu, 24 Nov 2016 08:12:32 -0800 (PST) X-Received: by 10.98.144.213 with SMTP id q82mr3127913pfk.56.1480003951976; Thu, 24 Nov 2016 08:12:31 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id m25si40050014pgd.246.2016.11.24.08.12.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2016 08:12:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c9wcT-0003kI-8k; Thu, 24 Nov 2016 16:11:29 +0000 Received: from mail-wj0-x22f.google.com ([2a00:1450:400c:c01::22f]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c9wcN-0003Ms-N9 for linux-arm-kernel@lists.infradead.org; Thu, 24 Nov 2016 16:11:25 +0000 Received: by mail-wj0-x22f.google.com with SMTP id mp19so37044597wjc.1 for ; Thu, 24 Nov 2016 08:11:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UtvpRa4eyhzNQi1mXwQQFzKyq5psJ48LVMvJ8sGzYcc=; b=D3YysaiDHEp5bKcsT3BiKmE4FN9Cu8Lz4XzCpPS/jg2t7sxbrn1lXPPktsvcpjp+Ki eqHkoaOyrNi6AmthBoRtYkvUXQ3tf2kosrdANprCKguDt4XRSGsukRxmXEKlCKnqnlJU EWcH00In5eP5iygxuQjkUkLWI5gXIIGZrO7cI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UtvpRa4eyhzNQi1mXwQQFzKyq5psJ48LVMvJ8sGzYcc=; b=AN/nYCvvDiJhkGtBi85vySqVOoZFX7UGGKYONUgYDPJPAoBuyrU10jz8Q2WQzHbq5x 9NcNBrRrRzwPFLS9h+e76bNT//nUMeVNY0vlcXkSEKEs+Juxa18bfp5hkHx5aUg7PgVG ggDH/4WiJf+/MzBdzV/5rMsTbo0/C7C90uOgFQlec9fELsvjfYD3Q4ggu71BZldK5q3V yzCM55gG9a8cFwX4sgDUIACcS2DyvesBwaFSbsTJrZHNiZNNvaXvNo/v49Do8WoGY0MZ fGNQZbh3AtwCP3umVc4hA0DPaoYMoG6RnE3OUIeSsH+5gi8SOQMGezJ1qwq1LdyDQM5S blNw== X-Gm-Message-State: AKaTC02iPJ1uxyuKMv7Rq0jcSwYnN0TcnquuXpe2Z/7PBMKjeGInHL35GtVpktnRW9FYlKPs X-Received: by 10.194.22.41 with SMTP id a9mr3452333wjf.30.1480003861270; Thu, 24 Nov 2016 08:11:01 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id u17sm8902441wma.24.2016.11.24.08.11.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2016 08:11:00 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 001BD3E0552; Thu, 24 Nov 2016 16:11:00 +0000 (GMT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, marc.zyngier@arm.com Subject: [kvm-unit-tests PATCH v7 04/11] libcflat: add PRI(dux)32 format types Date: Thu, 24 Nov 2016 16:10:26 +0000 Message-Id: <20161124161033.11456-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161124161033.11456-1-alex.bennee@linaro.org> References: <20161124161033.11456-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161124_081123_942963_469FD183 X-CRM114-Status: UNSURE ( 8.55 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c01:0:0:0:22f listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mttcg@listserver.greensocs.com, peter.maydell@linaro.org, claudio.fontana@huawei.com, nikunj@linux.vnet.ibm.com, jan.kiszka@siemens.com, mark.burton@greensocs.com, a.rigo@virtualopensystems.com, qemu-devel@nongnu.org, cota@braap.org, serge.fdrv@gmail.com, pbonzini@redhat.com, bobby.prani@gmail.com, rth@twiddle.net, =?UTF-8?q?Alex=20Benn=C3=A9e?= , fred.konrad@greensocs.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org So we can have portable formatting of uint32_t types. Signed-off-by: Alex Bennée --- lib/libcflat.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/libcflat.h b/lib/libcflat.h index bdcc561..6dab5be 100644 --- a/lib/libcflat.h +++ b/lib/libcflat.h @@ -55,12 +55,17 @@ typedef _Bool bool; #define true 1 #if __SIZEOF_LONG__ == 8 +# define __PRI32_PREFIX # define __PRI64_PREFIX "l" # define __PRIPTR_PREFIX "l" #else +# define __PRI32_PREFIX "l" # define __PRI64_PREFIX "ll" # define __PRIPTR_PREFIX #endif +#define PRId32 __PRI32_PREFIX "d" +#define PRIu32 __PRI32_PREFIX "u" +#define PRIx32 __PRI32_PREFIX "x" #define PRId64 __PRI64_PREFIX "d" #define PRIu64 __PRI64_PREFIX "u" #define PRIx64 __PRI64_PREFIX "x"