From patchwork Wed Oct 4 18:15:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 114784 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp3428394qgn; Wed, 4 Oct 2017 11:17:26 -0700 (PDT) X-Received: by 10.36.67.75 with SMTP id s72mr29508151itb.12.1507141046123; Wed, 04 Oct 2017 11:17:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507141046; cv=none; d=google.com; s=arc-20160816; b=Jz5HjRq1k2+USXKCCoUt8uoDFYIn0CW0fAUKMtDVvH5krKrPuu7wGchDKToaBtUTK7 rRbHI0bGS1gTd6zLrSGFfVEs4v7Cy5VgJ74UjPSe2KJsFurVAhBqQEvoxjuHw9zv/JsI KyAJkxXJDgtUq1JkD+1Un9oU3cwA8ol0uHFg+BwZaa6JRsTR6NE0f2UaA/MfYONHrNMo xwJEe+MERN2jTkHR4OlJQiVXppA4YK9oH1SgvHRR9eGVq8DeGR61e8insv5/OWDtsZtO WM03Cr83IbSieWtTuH2b+AV6w4o49wdHajtZxhi9GVW/vdYhPXRXB+R9OfupKk6cJmdr h75g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:dkim-signature:arc-authentication-results; bh=mxVIMOls87t1XhIehbUTQejD98csvA1XDfx3RQrgdIw=; b=fqoRcRig7WqcpxzDc1igKLPSln7Mot8Hbhr5REby0LWlyMRZ4j3wF9APCmX9GYI6JD GQAlPbsn7jsC0xRoNXIt3HhNAtYV0X+z0SP9CQMg+JOi/X5GYRpzw8RJ+wVrSupi/Z0M Teb66R7wUKNA35sILNat7mIIQwskWgSpcileRtTxpYkYJCr406CQsu+tGCsrg8EKLFQ8 zB+Y3WqPDZYKn7luFonJ197dMFo23A4kpnl6qEYBpa3THro/TyIPd8x6LeGYdVVD4GNY WPchVZsHJJlfWraagO4SPSzrGX5ujLBAOjO52sfKSfQTAyYTUP1GAg/3/bhjGHn/SPeW dOvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=PdOaXisM; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id r7si13201373iti.176.2017.10.04.11.17.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Oct 2017 11:17:26 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=PdOaXisM; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzoCo-0001zF-1G; Wed, 04 Oct 2017 18:15:38 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzoCn-0001yn-6w for xen-devel@lists.xen.org; Wed, 04 Oct 2017 18:15:37 +0000 Received: from [85.158.139.211] by server-3.bemta-5.messagelabs.com id 16/64-30688-84525D95; Wed, 04 Oct 2017 18:15:36 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrKIsWRWlGSWpSXmKPExsVyMfTGVl131au RBlcOWFks+biYxYHR4+ju30wBjFGsmXlJ+RUJrBlf/19mKbjAXXF1Zy9bA+MJji5GLg4hgUmM EjP3bmcFcVgE5jFLvG09y9jFyMkhIdDPKtF3Q6yLkQPIzpP4t7cAIpwmcXfVfnYIu0pi5sO9L CAlQgJqEmveREHM7GeSeP7uNxNInE1AR2LdjFqQchEBaYlrny+DTWcWiJA4/+EgG4gtLOAsMb V9KzOIzSKgKrF4bxdYDa+AtcTnA99ZIFbJS+xqu8gKYnMK2EjMmtIOViMEVNPXfpp1AqPgAka GVYwaxalFZalFuobmeklFmekZJbmJmTm6hgamermpxcWJ6ak5iUnFesn5uZsYgcHGAAQ7GC+e 9jzEKMnBpCTKO0v+aqQQX1J+SmVGYnFGfFFpTmrxIUYZDg4lCd4gFaCcYFFqempFWmYOMOxh0 hIcPEoivCkgad7igsTc4sx0iNQpRkuOC3cu/WHiOLDnFpDsuHn3D5MQS15+XqqUOG8rSIMASE NGaR7cOFhsXmKUlRLmZQQ6UIinILUoN7MEVf4VozgHo5IwrynIFJ7MvBK4ra+ADmICOmhO0xW Qg0oSEVJSDYxh4btXnjrNdM5/X66xYZ7quvtThK+XNYiIsDirnv1itbh18i7ZG9Fu7foljPma M2VrBHrs7xX0FiUFaS3+2R4nfGwel0bfH03VdAcf6XzTHjOGl/3/1ry6MkF+v63hFa7tMzIyL 84rDZO+atm8Tn/X72XFTm5TSydMc3JzZNsu1VGxevWmMCWW4oxEQy3mouJEAP704SzIAgAA X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-4.tower-206.messagelabs.com!1507140935!114565025!1 X-Originating-IP: [209.85.216.181] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 32056 invoked from network); 4 Oct 2017 18:15:35 -0000 Received: from mail-qt0-f181.google.com (HELO mail-qt0-f181.google.com) (209.85.216.181) by server-4.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 4 Oct 2017 18:15:35 -0000 Received: by mail-qt0-f181.google.com with SMTP id z50so15876085qtj.4 for ; Wed, 04 Oct 2017 11:15:35 -0700 (PDT) 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; bh=MEmYS6IxTegIzPJbXZAp4NTTSK3vZuMuwzS7cLxF3h0=; b=PdOaXisM8ukbIf2OeyFam0TPCyU14UMoQ/CkcVxqqIF2Y8h3rg6MLEAeoPpK7EkyIm Dsx/SKwi0GmEJUMnC8vl0jMuy9AOv3z7UIxe4yMfeU5wjYOffzUJBfV95ILNa+7Cj5xb T0byx94DhTF1NzLupb6GJDISrR1cUfoQMc1Ts= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MEmYS6IxTegIzPJbXZAp4NTTSK3vZuMuwzS7cLxF3h0=; b=ZhkhHYEUvOpNHuc17fmK0SStDkuhPoG1c75VCRYwhyY/kbvQp4oV9Se0AcuzxFuzbX 3v7dkKRyM5m06fIXD3GG3qknx6VALfmYyVuGE/hI5ApjyrJ5XjxRsXc6va5sgHa/NtFE KoZIKNb2pjcKsJuRmTI00bhVYt/j4YvuHc7AediSXcSMtd4w+rWM1asAu0cv74uenAw2 /eq2J/mvkGMdwpK/KHYyO+Nghe/SjCyT2R+dlNq7YYTmZR1iYBDCWE5OvtcgOSg5M5Oq yJXCStCYsXOQmEpxsXWQ5DtlfmG8wLrGHte3wqmHECArSE2+nC6brPcL7ScBOJBfzGri rr9Q== X-Gm-Message-State: AMCzsaWwvMmIDDo/sgMGzlv7NoYChCYEc+VBLvKTdsHlDMDI54sn1NEh Yg+nO796zmWiSyJ1Pr8+mlSsBUzL2To= X-Google-Smtp-Source: AOwi7QA+9j9N/aScmFq/8SBxyQ225+SYBaufTPQoXJ+zVUrI8mNiDJao/8vHEVJKPJhNzDNhybKYEQ== X-Received: by 10.200.38.35 with SMTP id u32mr11937197qtu.312.1507140934795; Wed, 04 Oct 2017 11:15:34 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com ([2001:41d0:1:6c23::1]) by smtp.gmail.com with ESMTPSA id l188sm10210622qkd.43.2017.10.04.11.15.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Oct 2017 11:15:34 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Wed, 4 Oct 2017 19:15:20 +0100 Message-Id: <20171004181526.9405-2-julien.grall@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171004181526.9405-1-julien.grall@linaro.org> References: <20171004181526.9405-1-julien.grall@linaro.org> Cc: Julien Grall , Stefano Stabellini Subject: [Xen-devel] [PATCH 1/7] xen/arm: domain_build: Clean-up insert_11_bank X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" - Remove spurious () - Add missing spaces - Turn 1 << to 1UL << Signed-off-by: Julien Grall --- Cc: Stefano Stabellini --- xen/arch/arm/domain_build.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 3723dc3f78..093ebf1a8e 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -109,11 +109,11 @@ static bool insert_11_bank(struct domain *d, spfn = page_to_mfn(pg); start = pfn_to_paddr(spfn); - size = pfn_to_paddr((1 << order)); + size = pfn_to_paddr(1UL << order); D11PRINT("Allocated %#"PRIpaddr"-%#"PRIpaddr" (%ldMB/%ldMB, order %d)\n", start, start + size, - 1UL << (order+PAGE_SHIFT-20), + 1UL << (order + PAGE_SHIFT - 20), /* Don't want format this as PRIpaddr (16 digit hex) */ (unsigned long)(kinfo->unassigned_mem >> 20), order); @@ -167,7 +167,8 @@ static bool insert_11_bank(struct domain *d, */ if ( start + size < bank->start && kinfo->mem.nr_banks < NR_MEM_BANKS ) { - memmove(bank + 1, bank, sizeof(*bank)*(kinfo->mem.nr_banks - i)); + memmove(bank + 1, bank, + sizeof(*bank) * (kinfo->mem.nr_banks - i)); kinfo->mem.nr_banks++; bank->start = start; bank->size = size;