From patchwork Wed Jul 9 12:07:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 33288 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 67225203F4 for ; Wed, 9 Jul 2014 12:09:10 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id nu7sf872440obb.7 for ; Wed, 09 Jul 2014 05:09:10 -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=InPtpIlRaf3HoDsrbhUPS2l6ewTjyiUGcgSPFQ44y9w=; b=UghgGgKQOt5m9+gUHunwpIMCQ9EFx+GRiAwzP7crMGoLH5oknapY6OgCXaNxTHM0Yh 6y1sbe0iYr7z/E3RT2+Aql1mDqTvG1eWvlYcSf6T11yTFs7F/wuoCP6JY7hvVUH0hnSy 7s9c7lQ1/KGm/2PAbYPWwY/ek5omahmGfL24PTbJaawSSbX0qi0FxRXFIAeKRbl5gh/U Qq735ocuqOEPSiATMaOvkKtIseVAsjUa/dlyvW+LTzIqXngwm74vS1wcbCCkgpUtflI5 zdFCzWXsIwH6Z6Kb2PNN6D38PF6Q8sPQaWqndRwIT8NCwzhQMMtmv0Fji1P0K4/n7TXx inXA== X-Gm-Message-State: ALoCoQmC9njJLYVyOBu9FXFklbiTO3bOFMYARJhGQTieVUH6652TSlJxRu7PnshAfcYCA4buYI6h X-Received: by 10.50.25.102 with SMTP id b6mr4349926igg.4.1404907750010; Wed, 09 Jul 2014 05:09:10 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.96.6 with SMTP id j6ls2588117qge.89.gmail; Wed, 09 Jul 2014 05:09:09 -0700 (PDT) X-Received: by 10.52.189.161 with SMTP id gj1mr32764846vdc.2.1404907749916; Wed, 09 Jul 2014 05:09:09 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id te2si21384565vcb.101.2014.07.09.05.09.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Jul 2014 05:09:09 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.178 as permitted sender) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id ij19so6759456vcb.37 for ; Wed, 09 Jul 2014 05:09:09 -0700 (PDT) X-Received: by 10.58.155.129 with SMTP id vw1mr27148veb.54.1404907749837; Wed, 09 Jul 2014 05:09:09 -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 tc5csp41885vcb; Wed, 9 Jul 2014 05:09:09 -0700 (PDT) X-Received: by 10.224.51.18 with SMTP id b18mr71513645qag.81.1404907748484; Wed, 09 Jul 2014 05:09:08 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id g6si33150507qgg.20.2014.07.09.05.09.08 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 09 Jul 2014 05:09:08 -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 1X4qfB-0006JT-VI; Wed, 09 Jul 2014 12:07:53 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X4qfA-0006Ic-7t for xen-devel@lists.xen.org; Wed, 09 Jul 2014 12:07:52 +0000 Received: from [85.158.143.35:63619] by server-1.bemta-4.messagelabs.com id 01/17-09496-7903DB35; Wed, 09 Jul 2014 12:07:51 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-9.tower-21.messagelabs.com!1404907669!16872645!2 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 23378 invoked from network); 9 Jul 2014 12:07:50 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-9.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 9 Jul 2014 12:07:50 -0000 X-IronPort-AV: E=Sophos;i="5.01,631,1400025600"; d="scan'208";a="151203270" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 09 Jul 2014 12:07:50 +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; Wed, 9 Jul 2014 08:07:49 -0400 Received: from marilith-n13-p0.uk.xensource.com ([10.80.229.115] helo=localhost.localdomain) by ukmail1.uk.xensource.com with smtp (Exim 4.69) (envelope-from ) id 1X4qf6-00010q-BY; Wed, 09 Jul 2014 13:07:49 +0100 Received: by localhost.localdomain (sSMTP sendmail emulation); Wed, 09 Jul 2014 13:07:48 +0100 From: Ian Campbell To: Date: Wed, 9 Jul 2014 13:07:40 +0100 Message-ID: <1404907666-8594-2-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1404907608.16789.18.camel@kazak.uk.xensource.com> References: <1404907608.16789.18.camel@kazak.uk.xensource.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Ian Jackson , julien.grall@linaro.org, tim@xen.org, Ian Campbell , stefano.stabellini@eu.citrix.com Subject: [Xen-devel] [PATCH v5 2/8] tools/libxc: pull min/max_t into xc_private.h 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.220.178 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: There are generally useful. Signed-off-by: Ian Campbell Acked-by: Julien Grall Cc: Ian Jackson --- v2: New patch. --- tools/libxc/xc_dom_decompress_unsafe_xz.c | 5 ----- tools/libxc/xc_private.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/libxc/xc_dom_decompress_unsafe_xz.c b/tools/libxc/xc_dom_decompress_unsafe_xz.c index 2a32d40..6be1f89 100644 --- a/tools/libxc/xc_dom_decompress_unsafe_xz.c +++ b/tools/libxc/xc_dom_decompress_unsafe_xz.c @@ -40,11 +40,6 @@ static inline u32 le32_to_cpup(const u32 *p) (void) (&_x == &_y); \ _x < _y ? _x : _y; }) -#define min_t(type,x,y) \ - ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; }) -#define max_t(type,x,y) \ - ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; }) - #define __force #define always_inline diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h index 6cc0f2b..c240a7c 100644 --- a/tools/libxc/xc_private.h +++ b/tools/libxc/xc_private.h @@ -349,6 +349,11 @@ int xc_ffs16(uint16_t x); int xc_ffs32(uint32_t x); int xc_ffs64(uint64_t x); +#define min_t(type,x,y) \ + ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; }) +#define max_t(type,x,y) \ + ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; }) + #define DOMPRINTF(fmt, args...) xc_dom_printf(dom->xch, fmt, ## args) #define DOMPRINTF_CALLED(xch) xc_dom_printf((xch), "%s: called", __FUNCTION__)