From patchwork Fri Nov 13 16:06:26 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Khapyorsky X-Patchwork-Id: 59863 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nADG0HdO008094 for ; Fri, 13 Nov 2009 16:04:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752346AbZKMQEG (ORCPT ); Fri, 13 Nov 2009 11:04:06 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753288AbZKMQEG (ORCPT ); Fri, 13 Nov 2009 11:04:06 -0500 Received: from mail-bw0-f227.google.com ([209.85.218.227]:47013 "EHLO mail-bw0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752346AbZKMQEF (ORCPT ); Fri, 13 Nov 2009 11:04:05 -0500 Received: by bwz27 with SMTP id 27so3583942bwz.21 for ; Fri, 13 Nov 2009 08:04:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:date:from:to :cc:subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=GwhB64yfd0zsWB4aWUSW9lJFyyBhnmTBt4tpUdm+pMc=; b=kdb6ObYh3mn4tMWeFnoUZwDa8naQHifd7i4nOI1ZiIIxrT4ngRoocPRh/6FBWU4ANq xZJCiH3gwahlLSHDE+50LYorFZ9XASQ4B/0u8n2ldebK6J3daurOHvbu6rFxV6oiSR9Q mKHKkipksAslq7JeJJTEzr80+nY+5f8Rklirc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=IefcjaO8qkGHPCK4A4GHTwBRHjkH4f1QWh6tN5KPP2V+8XLqb/iyOtF7jBu9L2hj7R 3IMMx4NA5U745R228EYiKtIrLLyztgKeJRMa0agf0YEXSlkk1IekD69fidGqFJcxWm52 JWtrO6zMILJxt173FeL9zaRrLw2RKQRZhPWzo= Received: by 10.102.248.26 with SMTP id v26mr2070239muh.9.1258128249964; Fri, 13 Nov 2009 08:04:09 -0800 (PST) Received: from me.localdomain (85.64.35.106.dynamic.barak-online.net [85.64.35.106]) by mx.google.com with ESMTPS id 23sm9501556mun.1.2009.11.13.08.04.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 13 Nov 2009 08:04:09 -0800 (PST) Received: by me.localdomain (Postfix, from userid 1000) id 448CC1209B; Fri, 13 Nov 2009 18:06:26 +0200 (IST) Date: Fri, 13 Nov 2009 18:06:26 +0200 From: Sasha Khapyorsky To: linux-rdma Cc: Sean Hefty , "Smith, Stan" , ofw@lists.openfabrics.org Subject: [PATCH] complib: replace intn_t types by C99 intptr_t Message-ID: <20091113160626.GQ7192@me> References: <3F6F638B8D880340AB536D29CD4C1E1912C86E8A8F@orsmsx501.amr.corp.intel.com> <20091004001316.GK17846@me> <20091112191811.GO7192@me> <81D21ED9D6F34BC1B7DA64F50EE5A7DD@amr.corp.intel.com> <20091112202257.GR7192@me> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20091112202257.GR7192@me> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org diff --git a/opensm/complib/cl_pool.c b/opensm/complib/cl_pool.c index 1f66284..5a8d637 100644 --- a/opensm/complib/cl_pool.c +++ b/opensm/complib/cl_pool.c @@ -128,7 +128,7 @@ cl_status_t cl_qcpool_init(IN cl_qcpool_t * const p_pool, * are aligned on a natural boundary. */ p_pool->component_sizes[i] = - ROUNDUP(p_pool->component_sizes[i], sizeof(uintn_t)); + ROUNDUP(p_pool->component_sizes[i], sizeof(uintptr_t)); } p_pool->max_objects = max_size ? max_size : ~(size_t) 0; diff --git a/opensm/include/complib/cl_types.h b/opensm/include/complib/cl_types.h index 84f629d..2891c6b 100644 --- a/opensm/include/complib/cl_types.h +++ b/opensm/include/complib/cl_types.h @@ -89,7 +89,7 @@ typedef uint64_t net64_t; * The offsetof macro returns the offset of a member within a structure. * * SYNOPSIS -* uintn_t +* uintptr_t * offsetof( * IN TYPE, * IN MEMBER ); @@ -110,7 +110,7 @@ typedef uint64_t net64_t; * PARENT_STRUCT *********/ #ifndef offsetof -#define offsetof(TYPE, MEMBER) ((uintn_t) &((TYPE *)0)->MEMBER) +#define offsetof(TYPE, MEMBER) ((uintptr_t) &((TYPE *)0)->MEMBER) #endif /****d* Component Library: Pointer Manipulation/PARENT_STRUCT @@ -245,14 +245,6 @@ typedef uint64_t net64_t; * net64_t * 64-bit network byte order value. * -* intn_t -* Signed natural sized integer. 32-bit on a 32-bit platform, 64-bit on -* a 64-bit platform. -* -* uintn_t -* Unsigned natural sized integer. 32-bit on a 32-bit platform, 64-bit on -* a 64-bit platform. -* * boolean_t * integral sized. Set to TRUE or FALSE and used in logical expressions. * diff --git a/opensm/include/complib/cl_types_osd.h b/opensm/include/complib/cl_types_osd.h index d12aa4c..7c6e51d 100644 --- a/opensm/include/complib/cl_types_osd.h +++ b/opensm/include/complib/cl_types_osd.h @@ -37,8 +37,7 @@ * Abstract: * Defines sized datatypes for Linux User mode * exported sizes are int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t - * int64_t, uint64_t. uintn_t is a polymorphic type, size is native size and - * also size of the pointer. + * int64_t, uint64_t. */ #ifndef _CL_TYPES_OSD_H_ @@ -73,8 +72,6 @@ BEGIN_C_DECLS /* * Types not explicitly defined are native to the platform. */ -typedef unsigned long uintn_t; -typedef long intn_t; typedef int boolean_t; typedef volatile int32_t atomic32_t;