From patchwork Wed Dec 9 16:08:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 58165 Delivered-To: patch@linaro.org Received: by 10.112.147.194 with SMTP id tm2csp765235lbb; Wed, 9 Dec 2015 08:09:31 -0800 (PST) X-Received: by 10.55.77.9 with SMTP id a9mr8377460qkb.38.1449677370995; Wed, 09 Dec 2015 08:09:30 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id q68si9488357qgq.99.2015.12.09.08.09.30; Wed, 09 Dec 2015 08:09:30 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro-org.20150623.gappssmtp.com Received: by lists.linaro.org (Postfix, from userid 109) id 80DAD61E4E; Wed, 9 Dec 2015 16:09:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,T_DKIM_INVALID,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 74B0961E55; Wed, 9 Dec 2015 16:08:39 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 00FF561E4E; Wed, 9 Dec 2015 16:08:32 +0000 (UTC) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com [209.85.217.175]) by lists.linaro.org (Postfix) with ESMTPS id F151061D8A for ; Wed, 9 Dec 2015 16:08:28 +0000 (UTC) Received: by lbblt2 with SMTP id lt2so33147738lbb.3 for ; Wed, 09 Dec 2015 08:08:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iCzDjMQzmKXBVzjFFdnnLhF/rA+9mV0M5KHqK7d/fFU=; b=F7tMz9klrwpE8WNhtTpKcL/XsWi5IwNIPHexg8OpH/FesX2js7PkVXosFEgFN0KtSn 8gEu466E9EfnvY7LFvTz8nJ/s4WHsPydFa7AN0RTM0HjRSSy+rTtzQDGK1ugPUOgeBev PPa0jw9JfRYaTdAHq5YwDFE12Xdz20DASClQDRHdQ2tBVLojrz06IjZ5TmcIjRVsLRfi BcaMECQMHvJmI4IJhIgAP1BqP+CG0pjBXSAN3j/EnCVojSOLphooHEI84KnPts3WkJAC zGsk4BlGmI4Ev27RsXV0Z6nGR5CUByOHh5weAUg3R1+kpEEsm7ZBWOzzK2W64mS/ruzS KbaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iCzDjMQzmKXBVzjFFdnnLhF/rA+9mV0M5KHqK7d/fFU=; b=F7Vzoyfbk6v1GG4/s9E/Yfzu4xohzQC/cU2oJGtuybZGHTGcggGNsVvnoQaWyXhKXD nJ+A76Eb4cGfBqcvsH2a6i/cu/0XeCZPAbUuEENweCRJrxi1OXjnme4isTa4lYdhKRMI rf05lLE8XvHZfxW/UcV4S5D7y810nK8dDP9eCHARt7rWXNtNw9pRTVwArQzDNNyN55pf avG0PjlqiTEmwWIs1iDe752mvbJgUlPu5kQq+R4F+YmShZtO+vMxtshtqjsHdHHcfShO aXDo5E2t+smz3/7mbZ07FDF8Psb38PI/H6cVHhYg62DhLgg79FsQheqFZnePzkjB45rO 7dxg== X-Gm-Message-State: ALoCoQmNZ30+ibwaxzbxdwFGt+UiKUdQGmRhOZL+LJlOlUZvyq0kWK5c9Dce2X//20JPR3ewUF8tgm1oy0YkarNtEi1GpNZZvw== X-Received: by 10.112.148.37 with SMTP id tp5mr2324244lbb.84.1449677307682; Wed, 09 Dec 2015 08:08:27 -0800 (PST) Received: from localhost.localdomain (ppp91-76-173-134.pppoe.mtu-net.ru. [91.76.173.134]) by smtp.gmail.com with ESMTPSA id s185sm1531308lfe.24.2015.12.09.08.08.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 Dec 2015 08:08:27 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Wed, 9 Dec 2015 19:08:21 +0300 Message-Id: <1449677301-3254-2-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1449677301-3254-1-git-send-email-maxim.uvarov@linaro.org> References: <1449677301-3254-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH 2/2] linux-generic: time: use same type as returned X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" 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" Signed-off-by: Maxim Uvarov --- platform/linux-generic/odp_time.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/linux-generic/odp_time.c b/platform/linux-generic/odp_time.c index 1d374ca..500ba4b 100644 --- a/platform/linux-generic/odp_time.c +++ b/platform/linux-generic/odp_time.c @@ -27,7 +27,7 @@ uint64_t time_to_ns(odp_time_t time) static inline odp_time_t time_diff(odp_time_t t2, odp_time_t t1) { - struct timespec time; + odp_time_t time; time.tv_sec = t2.tv_sec - t1.tv_sec; time.tv_nsec = t2.tv_nsec - t1.tv_nsec; @@ -43,7 +43,7 @@ odp_time_t time_diff(odp_time_t t2, odp_time_t t1) odp_time_t odp_time_local(void) { int ret; - struct timespec time; + odp_time_t time; ret = clock_gettime(CLOCK_MONOTONIC_RAW, &time); if (odp_unlikely(ret != 0)) @@ -64,7 +64,7 @@ uint64_t odp_time_to_ns(odp_time_t time) odp_time_t odp_time_local_from_ns(uint64_t ns) { - struct timespec time; + odp_time_t time; time.tv_sec = ns / ODP_TIME_SEC_IN_NS; time.tv_nsec = ns - time.tv_sec * ODP_TIME_SEC_IN_NS; @@ -85,7 +85,7 @@ int odp_time_cmp(odp_time_t t2, odp_time_t t1) odp_time_t odp_time_sum(odp_time_t t1, odp_time_t t2) { - struct timespec time; + odp_time_t time; time.tv_sec = t2.tv_sec + t1.tv_sec; time.tv_nsec = t2.tv_nsec + t1.tv_nsec;