From patchwork Tue Jul 1 08:26:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 32862 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f71.google.com (mail-qg0-f71.google.com [209.85.192.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 38674203C0 for ; Tue, 1 Jul 2014 08:29:48 +0000 (UTC) Received: by mail-qg0-f71.google.com with SMTP id f51sf7439158qge.10 for ; Tue, 01 Jul 2014 01:29:48 -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=iYUYeyUdNcPvBbREDi6gzLSDn3G1KRni3ghrqO1ajuA=; b=XY7Nx9rV8lQzwKcivD4TPNYDhTmmMHBJG6Zd9AAahj/g6JU6Da3WOd7RM1y8+77vEE 1eyH8nKkTbHooQEJhiPbMCkCH/+ovw2uv7mg4lgYRfuOfnDX+Rol9zoz16GMqeENTHnG R6jPC8Mn0SF6JglPE8eVGECjQe1MkGxae8oTz0snTGOAu7z7GpZMjQtrFsbmWIxv4ZQn gvdeCLRfAsqpRngdPrUWUFI1aFgSMAeV2tSzrPIhIdU2lIsHsFJtj65rc2y+i92u2W1r pAlwmsKUL7y1I2J/l6W29mX4PkH550vVRrwLPUSm5WVZK3fFOuzvqchKb64Eq0i0f+Nk oQKw== X-Gm-Message-State: ALoCoQk9JLG6QL1VHtM/SnBAf4o0z+AsEympkjyUYwRQ1y16LtSk01F1NRv7qtE2/BptSfxeeMNz X-Received: by 10.236.1.198 with SMTP id 46mr2757048yhd.16.1404203388022; Tue, 01 Jul 2014 01:29:48 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.93.166 with SMTP id d35ls1894269qge.3.gmail; Tue, 01 Jul 2014 01:29:47 -0700 (PDT) X-Received: by 10.58.228.74 with SMTP id sg10mr41731843vec.6.1404203387952; Tue, 01 Jul 2014 01:29:47 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id s5si11151122vcu.2.2014.07.01.01.29.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 01 Jul 2014 01:29:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id ij19so8465834vcb.8 for ; Tue, 01 Jul 2014 01:29:47 -0700 (PDT) X-Received: by 10.220.92.135 with SMTP id r7mr42972090vcm.11.1404203387882; Tue, 01 Jul 2014 01:29:47 -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 tc5csp198734vcb; Tue, 1 Jul 2014 01:29:47 -0700 (PDT) X-Received: by 10.224.163.11 with SMTP id y11mr71261190qax.43.1404203387380; Tue, 01 Jul 2014 01:29:47 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id p4si28400521qab.8.2014.07.01.01.29.46 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 01 Jul 2014 01:29:47 -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 1X1tPf-0000ma-5a; Tue, 01 Jul 2014 08:27:39 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X1tPd-0000kp-DH for xen-devel@lists.xen.org; Tue, 01 Jul 2014 08:27:37 +0000 Received: from [193.109.254.147:7112] by server-14.bemta-14.messagelabs.com id 38/0D-08195-8F072B35; Tue, 01 Jul 2014 08:27:36 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-4.tower-27.messagelabs.com!1404203254!14738574!1 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 23472 invoked from network); 1 Jul 2014 08:27:35 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-4.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 1 Jul 2014 08:27:35 -0000 X-IronPort-AV: E=Sophos;i="5.01,580,1400025600"; d="scan'208";a="148822951" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 01 Jul 2014 08:27:03 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.3.181.6; Tue, 1 Jul 2014 04:27:02 -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 1X1tP4-0008Hn-JL; Tue, 01 Jul 2014 09:27:02 +0100 From: Ian Campbell To: Date: Tue, 1 Jul 2014 09:26:55 +0100 Message-ID: <1404203222-30111-2-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1404202883.1829.125.camel@dagon.hellion.org.uk> References: <1404202883.1829.125.camel@dagon.hellion.org.uk> MIME-Version: 1.0 X-DLP: MIA1 Cc: Ian Jackson , julien.grall@linaro.org, tim@xen.org, Ian Campbell , stefano.stabellini@eu.citrix.com Subject: [Xen-devel] [PATCH v4 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.177 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 c7730f2..47a2801 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__)