From patchwork Thu Jun 26 16:45:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 32576 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f71.google.com (mail-pb0-f71.google.com [209.85.160.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0DB3E201EF for ; Thu, 26 Jun 2014 16:47:18 +0000 (UTC) Received: by mail-pb0-f71.google.com with SMTP id rq2sf14505802pbb.2 for ; Thu, 26 Jun 2014 09:47:18 -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=rUTBlbKfYb4Vqdaq1DjOBKU3ZHoGWNnPRDW1AaB6zRY=; b=RTitbxKEyh/8123ZFFcHYR/3iMO9WIHGLDvILDr7U4uU/y0sezjpM33YAV+BRbn6In ZlIq4yEk2JKtchpX6lcOpmNtLGEAtkCs6lNTS6E4bD7zrsfDZAMSAkV1/TKUkBVp+n35 uYjP+u5SVu532585gJPV4kaMxpauqVFhRmpulL6Z6O/86IPzLiCoc2BMUI32iHovc9Os yLbRklzfR8amiURt/x3Y9jIji8Ihe8A8BoyKifRxnFYhDCsExODdTEtpFBUG4BMYeyGG flretyZ2p35s0Z8AGTNI3alJGAhBuSoaN8UauGZN4xrYWFy89xL0GuoUQ5BZV+ceO3+G jZHg== X-Gm-Message-State: ALoCoQmNDok83AH/dmQer6M9p9bXmUAMtcODDVId4O2uV3mWTBD6nisnljyTwGEWUwJ/z6pwU2ry X-Received: by 10.68.253.66 with SMTP id zy2mr8691981pbc.1.1403801238273; Thu, 26 Jun 2014 09:47:18 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.91.53 with SMTP id y50ls260424qgd.8.gmail; Thu, 26 Jun 2014 09:47:18 -0700 (PDT) X-Received: by 10.58.72.165 with SMTP id e5mr1921641vev.59.1403801238178; Thu, 26 Jun 2014 09:47:18 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id oq10si1157886vcb.48.2014.06.26.09.47.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Jun 2014 09:47:18 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.175 as permitted sender) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id jx11so3976588veb.20 for ; Thu, 26 Jun 2014 09:47:18 -0700 (PDT) X-Received: by 10.58.182.234 with SMTP id eh10mr3702596vec.41.1403801238051; Thu, 26 Jun 2014 09:47:18 -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.37.5 with SMTP id tc5csp44085vcb; Thu, 26 Jun 2014 09:47:17 -0700 (PDT) X-Received: by 10.42.64.141 with SMTP id g13mr14921070ici.17.1403801237299; Thu, 26 Jun 2014 09:47:17 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id vm6si3459711igb.55.2014.06.26.09.47.16 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 26 Jun 2014 09:47:17 -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 1X0CoB-0004KO-NT; Thu, 26 Jun 2014 16:45:59 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X0Co9-0004Ic-CT for xen-devel@lists.xen.org; Thu, 26 Jun 2014 16:45:57 +0000 Received: from [85.158.137.68:12703] by server-5.bemta-3.messagelabs.com id 71/2A-27487-44E4CA35; Thu, 26 Jun 2014 16:45:56 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-7.tower-31.messagelabs.com!1403801152!12507594!3 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 24807 invoked from network); 26 Jun 2014 16:45:56 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-7.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 26 Jun 2014 16:45:56 -0000 X-IronPort-AV: E=Sophos;i="5.01,554,1400025600"; d="scan'208";a="147431687" Received: from accessns.citrite.net (HELO FTLPEX01CL01.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 26 Jun 2014 16:45:52 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.3.181.6; Thu, 26 Jun 2014 12:45:52 -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 1X0Co3-0002AU-R9; Thu, 26 Jun 2014 17:45:51 +0100 From: Ian Campbell To: Date: Thu, 26 Jun 2014 17:45:45 +0100 Message-ID: <1403801151-11007-3-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1403801130.31742.1.camel@kazak.uk.xensource.com> References: <1403801130.31742.1.camel@kazak.uk.xensource.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: julien.grall@linaro.org, tim@xen.org, Ian Campbell , stefano.stabellini@eu.citrix.com Subject: [Xen-devel] [PATCH v2 3/9] 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.175 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,