From patchwork Mon Jan 27 22:15:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 23759 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3D61120300 for ; Mon, 27 Jan 2014 22:15:33 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id c9sf12704509qcz.5 for ; Mon, 27 Jan 2014 14:15:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:message-id:date:from:user-agent :mime-version:to:subject:references:in-reply-to:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=BxGiir3szLnB3tnuoCsEt3PEUeHZLTLgNcOtDy35sko=; b=dBcmSJMv+Pi5SbK9pGVcj32/+TcN5avHg+God8/4itibsLECJYh5TuMAHOtaWfycM/ 9MAzdGdbiVQYSBEEg+7dmOUtleGiGqdWSxp6c3zr0YgRH6GxD3pZ9/JsoklGFtTHRmWk j8ZaamDI6ngMtRED5x3z9PovdAnnHccz3oPl3r5HQfTgWwvO7sq79zI3hsEKMbvR2+JW eGScbCRzjcMjtQ88S4Nsrs2No1FLZZFQn1sXA4H2IMRqgzWKJ+2Jof4qpQJFn2ESgiEF Hp98tfAZ8a0hQWHMLHGP7inpLatKNIOv6TIBERJF5etyWS4PXSGOx+wxilWu2qYONFFu qkEA== X-Gm-Message-State: ALoCoQlYu5WBrJzDEAIRNkzj61PF0zf1m0Bs4eLG83b20L2yG+P91hADaVJevq4sJgOkN9cihds8 X-Received: by 10.58.156.42 with SMTP id wb10mr11934858veb.26.1390860932443; Mon, 27 Jan 2014 14:15:32 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.49.231 with SMTP id q94ls1924832qga.45.gmail; Mon, 27 Jan 2014 14:15:32 -0800 (PST) X-Received: by 10.58.248.198 with SMTP id yo6mr547190vec.40.1390860932304; Mon, 27 Jan 2014 14:15:32 -0800 (PST) Received: from mail-vb0-f41.google.com (mail-vb0-f41.google.com [209.85.212.41]) by mx.google.com with ESMTPS id n8si1909445vdv.68.2014.01.27.14.15.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Jan 2014 14:15:32 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.41 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.41; Received: by mail-vb0-f41.google.com with SMTP id g10so3881120vbg.0 for ; Mon, 27 Jan 2014 14:15:32 -0800 (PST) X-Received: by 10.220.88.204 with SMTP id b12mr17281403vcm.3.1390860932208; Mon, 27 Jan 2014 14:15:32 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp162746vcz; Mon, 27 Jan 2014 14:15:31 -0800 (PST) X-Received: by 10.50.25.129 with SMTP id c1mr19665373igg.23.1390860929087; Mon, 27 Jan 2014 14:15:29 -0800 (PST) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx.google.com with ESMTPS id je8si870430icb.17.2014.01.27.14.15.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Jan 2014 14:15:29 -0800 (PST) Received-SPF: neutral (google.com: 209.85.223.182 is neither permitted nor denied by best guess record for domain of alex.elder@linaro.org) client-ip=209.85.223.182; Received: by mail-ie0-f182.google.com with SMTP id lx4so6720160iec.27 for ; Mon, 27 Jan 2014 14:15:28 -0800 (PST) X-Received: by 10.50.79.198 with SMTP id l6mr19688397igx.23.1390860928831; Mon, 27 Jan 2014 14:15:28 -0800 (PST) Received: from [172.22.22.4] (c-71-195-31-37.hsd1.mn.comcast.net. [71.195.31.37]) by mx.google.com with ESMTPSA id ac3sm49116049igd.4.2014.01.27.14.15.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Jan 2014 14:15:28 -0800 (PST) Message-ID: <52E6DA7F.5050500@linaro.org> Date: Mon, 27 Jan 2014 16:15:27 -0600 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: patches@linaro.org Subject: Fwd: [PATCH 1/3] conditionally define U32_MAX References: <52BC4740.1010503@linaro.org> In-Reply-To: <52BC4740.1010503@linaro.org> X-Enigmail-Version: 1.5.2 X-Forwarded-Message-Id: <52BC4740.1010503@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: alex.elder@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.41 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , -------- Original Message -------- Subject: [PATCH 1/3] conditionally define U32_MAX Date: Thu, 26 Dec 2013 09:12:00 -0600 From: Alex Elder To: Sage Weil , David Miller , kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net, Al Viro , jeffm@suse.com, Steven Rostedt , Andrew Morton , mst@redhat.com, Ingo Molnar The symbol U32_MAX is defined in several spots. Change these definitions to be conditional. This is in preparation for the next patch, which centralizes the definition in . Signed-off-by: Alex Elder --- fs/reiserfs/reiserfs.h | 2 ++ include/linux/ceph/decode.h | 2 ++ net/ipv4/tcp_illinois.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/fs/reiserfs/reiserfs.h b/fs/reiserfs/reiserfs.h index f8adaee..66a2e83 100644 --- a/fs/reiserfs/reiserfs.h +++ b/fs/reiserfs/reiserfs.h @@ -1958,7 +1958,9 @@ struct treepath var = {.path_length = ILLEGAL_PATH_ELEMENT_OFFSET, .reada = 0,} #define MAX_US_INT 0xffff // reiserfs version 2 has max offset 60 bits. Version 1 - 32 bit offset +#ifndef U32_MAX #define U32_MAX (~(__u32)0) +#endif /* !U32_MAX */ static inline loff_t max_reiserfs_offset(struct inode *inode) { diff --git a/include/linux/ceph/decode.h b/include/linux/ceph/decode.h index 0442c3d..27fe66a 100644 --- a/include/linux/ceph/decode.h +++ b/include/linux/ceph/decode.h @@ -10,6 +10,7 @@ /* This seemed to be the easiest place to define these */ +#ifndef U32_MAX #define U8_MAX ((u8)(~0U)) #define U16_MAX ((u16)(~0U)) #define U32_MAX ((u32)(~0U)) @@ -24,6 +25,7 @@ #define S16_MIN ((s16)(-S16_MAX - 1)) #define S32_MIN ((s32)(-S32_MAX - 1)) #define S64_MIN ((s64)(-S64_MAX - 1LL)) +#endif /* !U32_MAX */ /* * in all cases, diff --git a/net/ipv4/tcp_illinois.c b/net/ipv4/tcp_illinois.c index 8a52099..f439472 100644 --- a/net/ipv4/tcp_illinois.c +++ b/net/ipv4/tcp_illinois.c @@ -23,7 +23,9 @@ #define ALPHA_MIN ((3*ALPHA_SCALE)/10) /* ~0.3 */ #define ALPHA_MAX (10*ALPHA_SCALE) /* 10.0 */ #define ALPHA_BASE ALPHA_SCALE /* 1.0 */ +#ifndef U32_MAX #define U32_MAX ((u32)~0U) +#endif /* !U32_MAX */ #define RTT_MAX (U32_MAX / ALPHA_MAX) /* 3.3 secs */ #define BETA_SHIFT 6