From patchwork Mon Jun 16 11:44:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 31951 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 853CD206A0 for ; Mon, 16 Jun 2014 11:46:41 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id fp1sf5330789pdb.0 for ; Mon, 16 Jun 2014 04:46:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=2Zw/QKFZDR9Pny6f/ST6+DE5lPU+EnSWpd1CYPY+QBk=; b=gyx8ujNQZXby/qgOr2oKTZIaLZHMQIn8HBMiJpECWiLTgNUCnYIrIBrZVMRHhcfPSf bz1KjIk65NIvJRPS7d46juBYOu5aCbB4QcHNnrJKW/RnhX/zv5bzh8T1DGfDSALPvRRH YqPrm/VIDuL5lQrWxFBMeXIh+84QYmUtu6/K8+x7xXw/JljUDrZmTEiMIul9gdkhZQeZ Cl2gtmzqLlbn+7b43EYo8UEJZ5O/MC0UUcG9hDplU/wtAvpWE+4rQkVnwNWlNQxx+GDL ymlMbkg4IPFiJmNNSCbolvJKSlIRL2li6jCweNUzjmlT90xT5uoiX8HFdlgCyQDF8TLX gYUg== X-Gm-Message-State: ALoCoQm/pDTrfBl/Asa0UBDMSLC4xubQ0DKZO6E5mzkD/IzkDstfjZjw+omB00YMYTAqaeJiqIjK X-Received: by 10.66.169.79 with SMTP id ac15mr478890pac.48.1402919200676; Mon, 16 Jun 2014 04:46:40 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.96.6 with SMTP id j6ls451227qge.89.gmail; Mon, 16 Jun 2014 04:46:40 -0700 (PDT) X-Received: by 10.58.141.168 with SMTP id rp8mr519077veb.40.1402919200549; Mon, 16 Jun 2014 04:46:40 -0700 (PDT) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id ot8si4001066vcb.95.2014.06.16.04.46.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Jun 2014 04:46:40 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.170 as permitted sender) client-ip=209.85.128.170; Received: by mail-ve0-f170.google.com with SMTP id i13so2396030veh.1 for ; Mon, 16 Jun 2014 04:46:40 -0700 (PDT) X-Received: by 10.52.64.225 with SMTP id r1mr3677809vds.30.1402919200453; Mon, 16 Jun 2014 04:46:40 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp128498vcb; Mon, 16 Jun 2014 04:46:40 -0700 (PDT) X-Received: by 10.220.47.201 with SMTP id o9mr142769vcf.65.1402919200129; Mon, 16 Jun 2014 04:46:40 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id er10si3999223vdc.28.2014.06.16.04.46.39 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 16 Jun 2014 04:46:40 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WwVLi-0003Vd-Ik; Mon, 16 Jun 2014 11:45:18 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WwVLb-0003Mw-4t for xen-devel@lists.xen.org; Mon, 16 Jun 2014 11:45:11 +0000 Received: from [193.109.254.147:37683] by server-16.bemta-14.messagelabs.com id 0E/8A-16986-5C8DE935; Mon, 16 Jun 2014 11:45:09 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-15.tower-27.messagelabs.com!1402919104!11532797!3 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 27857 invoked from network); 16 Jun 2014 11:45:09 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-15.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 16 Jun 2014 11:45:09 -0000 X-IronPort-AV: E=Sophos;i="5.01,486,1400025600"; d="scan'208";a="144026037" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 16 Jun 2014 11:45:04 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.3.181.6; Mon, 16 Jun 2014 07:45:04 -0400 Received: from marilith-n13-p0.uk.xensource.com ([10.80.229.115] helo=marilith-n13.uk.xensource.com.) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1WwVLT-000152-T2; Mon, 16 Jun 2014 12:45:03 +0100 From: Ian Campbell To: Date: Mon, 16 Jun 2014 12:44:56 +0100 Message-ID: <1402919103-29642-3-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1402919079.14907.22.camel@kazak.uk.xensource.com> References: <1402919079.14907.22.camel@kazak.uk.xensource.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Ian Campbell , stefano.stabellini@eu.citrix.com, Naresh Bhat , julien.grall@linaro.org, tim@xen.org, Roy Franz , Fu Wei Subject: [Xen-devel] [PATCH 03/10] xen: arm: prefer typesafe max()/min() over MAX()/MIN() X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: Signed-off-by: Ian Campbell Acked-by: Julien Grall --- xen/arch/arm/p2m.c | 4 ++-- xen/common/device_tree.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 9960e17..dd2c5a4 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -500,8 +500,8 @@ static int apply_p2m_changes(struct domain *d, unsigned long sgfn = paddr_to_pfn(start_gpaddr); unsigned long egfn = paddr_to_pfn(end_gpaddr); - p2m->max_mapped_gfn = MAX(p2m->max_mapped_gfn, egfn); - p2m->lowest_mapped_gfn = MIN(p2m->lowest_mapped_gfn, sgfn); + p2m->max_mapped_gfn = max(p2m->max_mapped_gfn, egfn); + p2m->lowest_mapped_gfn = min(p2m->lowest_mapped_gfn, sgfn); } rc = 0; diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c index 48ae849..03d495a 100644 --- a/xen/common/device_tree.c +++ b/xen/common/device_tree.c @@ -425,7 +425,7 @@ static void __init process_chosen_node(const void *fdt, int node, mod->start = start; mod->size = end - start; - early_info.modules.nr_mods = MAX(MOD_INITRD, early_info.modules.nr_mods); + early_info.modules.nr_mods = max(MOD_INITRD, early_info.modules.nr_mods); } static int __init early_scan_node(const void *fdt,