From patchwork Thu Apr 17 23:03:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 28597 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f69.google.com (mail-qg0-f69.google.com [209.85.192.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 930972188F for ; Thu, 17 Apr 2014 23:11:02 +0000 (UTC) Received: by mail-qg0-f69.google.com with SMTP id a108sf2254889qge.0 for ; Thu, 17 Apr 2014 16:11:02 -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:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=USH8p6DXuYvouHVj3Rm+vlPEEz13LnP+U8ldMgKuxs8=; b=dzs/wxoI9BqINaGmLgm8Xiitw+Xm00LGgZ5rj9qjQtVCC6KzafBeX218h/jTIkH1sE Wnt0VnwKmepjlW28pRxwxF+ZI/HYT6aw2WqllmGHRI20IG00RzcaK5E1qrZgNXAzoFxv tLGfsi7ALP06k1Zm5MjsheQq3EpGx2OMzzumcVh7xthWO1lBXp3H1OyZeICp8MdKz/Vg Z7NrmgMoE3lPeBMsRwCHzAhWBs1bDEFJubZGvsUNL0u0icz/Itt3/A5+5i/TLRtAWqqD QsNnIV9tqL4bOpr9GfXQskuk1ylwAvWUVXxPVFVcWjljT/TN1tUehZi1t8b9m5bozC6S 1ivg== X-Gm-Message-State: ALoCoQm+jmfRYbpTHOP00aZgVOZGtjPrlWu3sPpBuRcpyquQGo938Ztb8L8rna3KWrWL3OHBiHCK X-Received: by 10.236.197.39 with SMTP id s27mr7841773yhn.36.1397776262338; Thu, 17 Apr 2014 16:11:02 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.18.241 with SMTP id 104ls1302815qgf.24.gmail; Thu, 17 Apr 2014 16:11:02 -0700 (PDT) X-Received: by 10.52.251.199 with SMTP id zm7mr8442692vdc.21.1397776262204; Thu, 17 Apr 2014 16:11:02 -0700 (PDT) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id cx1si3351140vdb.92.2014.04.17.16.11.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Apr 2014 16:11:02 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.170; Received: by mail-ve0-f170.google.com with SMTP id pa12so1536200veb.29 for ; Thu, 17 Apr 2014 16:11:02 -0700 (PDT) X-Received: by 10.58.219.233 with SMTP id pr9mr14375111vec.10.1397776262126; Thu, 17 Apr 2014 16:11:02 -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.220.221.72 with SMTP id ib8csp70915vcb; Thu, 17 Apr 2014 16:11:01 -0700 (PDT) X-Received: by 10.224.76.74 with SMTP id b10mr16865871qak.49.1397775882891; Thu, 17 Apr 2014 16:04:42 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id q105si11296828qgq.120.2014.04.17.16.04.12 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 17 Apr 2014 16:04:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1WavLb-0000Mw-Tz; Thu, 17 Apr 2014 23:03:59 +0000 Received: from mail-ee0-f51.google.com ([74.125.83.51]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1WavLM-0000MH-WE for lng-odp@lists.linaro.org; Thu, 17 Apr 2014 23:03:45 +0000 Received: by mail-ee0-f51.google.com with SMTP id c13so1087929eek.24 for ; Thu, 17 Apr 2014 16:03:51 -0700 (PDT) X-Received: by 10.15.36.6 with SMTP id h6mr17053195eev.54.1397775831883; Thu, 17 Apr 2014 16:03:51 -0700 (PDT) Received: from uglx0153363.synapse.com ([195.238.92.128]) by mx.google.com with ESMTPSA id a4sm71248693eep.12.2014.04.17.16.03.50 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Apr 2014 16:03:51 -0700 (PDT) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Fri, 18 Apr 2014 02:03:42 +0300 Message-Id: <1397775822-26517-3-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1397775822-26517-1-git-send-email-taras.kondratiuk@linaro.org> References: <1397775822-26517-1-git-send-email-taras.kondratiuk@linaro.org> Cc: linaro-networking@linaro.org Subject: [lng-odp] [RFC PATCH 2/2] Make odp_buffer_size() static inline X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: taras.kondratiuk@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.170 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 Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Static variant return a dump value. Just to demonstrate the idea. Signed-off-by: Taras Kondratiuk --- platform/linux-generic/include/plat/odp_buffer.h | 9 +++++++++ platform/linux-generic/source/odp_buffer.c | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/platform/linux-generic/include/plat/odp_buffer.h b/platform/linux-generic/include/plat/odp_buffer.h index 01a96c5..c038fbc 100644 --- a/platform/linux-generic/include/plat/odp_buffer.h +++ b/platform/linux-generic/include/plat/odp_buffer.h @@ -10,3 +10,12 @@ typedef uint32_t odp_buffer_t; #define ODP_BUFFER_INVALID (0xffffffff) /**< Invalid buffer */ +/* Return dump value */ +static inline size_t odp_buffer_size(odp_buffer_t buf) +{ + size_t size = 1; + (void)buf; + + return size; +} + diff --git a/platform/linux-generic/source/odp_buffer.c b/platform/linux-generic/source/odp_buffer.c index afbe96a..add8e2c 100644 --- a/platform/linux-generic/source/odp_buffer.c +++ b/platform/linux-generic/source/odp_buffer.c @@ -19,15 +19,6 @@ void *odp_buffer_addr(odp_buffer_t buf) return hdr->addr; } - -size_t odp_buffer_size(odp_buffer_t buf) -{ - odp_buffer_hdr_t *hdr = odp_buf_to_hdr(buf); - - return hdr->size; -} - - int odp_buffer_type(odp_buffer_t buf) { odp_buffer_hdr_t *hdr = odp_buf_to_hdr(buf);