From patchwork Wed Dec 9 16:08:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 58164 Delivered-To: patch@linaro.org Received: by 10.112.147.194 with SMTP id tm2csp764657lbb; Wed, 9 Dec 2015 08:08:41 -0800 (PST) X-Received: by 10.140.109.100 with SMTP id k91mr8689432qgf.23.1449677321779; Wed, 09 Dec 2015 08:08:41 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id s18si9460219qhb.77.2015.12.09.08.08.41; Wed, 09 Dec 2015 08:08:41 -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 169B161E71; Wed, 9 Dec 2015 16:08:41 +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_H3, RCVD_IN_MSPIKE_WL, 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 0D4AD61D8A; Wed, 9 Dec 2015 16:08:35 +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 DDC4261E54; Wed, 9 Dec 2015 16:08:31 +0000 (UTC) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com [209.85.217.174]) by lists.linaro.org (Postfix) with ESMTPS id DCE5F61CEB for ; Wed, 9 Dec 2015 16:08:27 +0000 (UTC) Received: by lbpu9 with SMTP id u9so32796180lbp.2 for ; Wed, 09 Dec 2015 08:08:26 -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; bh=5Y+hy46BHwgAFKVU/ar8/O6HNWUMeZNvctW+Qvweu3A=; b=XAKF2h94VzraDRdg/y4IqouZr4mRacmFizOwdq3qLX7KcaQLV+pA3gi+fMHCLnqGpN IF7TyEfjv9Y+9FsgoDs7cBSGmSmc+cpT5UMjg2AgKJY7bGGPq/NaNYnzwM52049GHpEY Zk8wJbhDsJAikgFGhiAbVZABLEI69FT23bJLE2hCm7In0zeZNWyRMmgdiQj6kGWjL5po 1L7OaVZNjHPKerXdLp7+v7fRk2YGLwYEydTXW9eJkM9QnE8U6KI8loLTrbTbxWZR8hQJ Q/OTG//wxWTGcoAbeVDFnV2TYf/zkgOAxbgKi19m3dOr+64YWE/GQ3fD0xTOYfn5xZff 1v8w== 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; bh=5Y+hy46BHwgAFKVU/ar8/O6HNWUMeZNvctW+Qvweu3A=; b=E3z4b19oRGcdfszfRCNLswK9fkcbXgidnO1DM/rNriGFWHBDAF9/nLRnSRodzRwd7f J4Z/Zs2coXYML+yJb6+l4btL/YOZ25MJRxCVOtZxWBNLI9gm6kCfMvtXEnecBFed8cx1 TG7v1y4ucG7l/UdTYk3i45Y3Q+12+ls2MX82AJPNeCnUVHPtJOIzS36Dvn8VdMzq3JG0 RWVcrfcr7mLj1Bps37tgHCG8HGG0RBOamBwo4LBG0ujOKtu+i9IVklfrB4NK8IRA1j34 bFo+2FQwPrQhuK50rfXbeFjHwKtt0b7LziFelH7mfLAH2kOQOVftJzUpXtvjTVzfbbvt WCLA== X-Gm-Message-State: ALoCoQkILuVnfnQaipIoGpy84+yDW3SAeS5Xrfyd6uBTrZ8rB4aUUJT2zh51zolcpoAQKjBFI5LkvZ2n0ceaOWbyivgT4E2IAg== X-Received: by 10.112.162.226 with SMTP id yd2mr2798054lbb.49.1449677306739; Wed, 09 Dec 2015 08:08:26 -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.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 Dec 2015 08:08:26 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Wed, 9 Dec 2015 19:08:20 +0300 Message-Id: <1449677301-3254-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH 1/2] api: linux-generic: no need to define odp_time_null() 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" No need to define odp_time_null() as it only initialize to 0 time. Remove it completely with needed to add doxygen comment for it. Signed-off-by: Maxim Uvarov --- platform/linux-generic/include/odp/plat/time_types.h | 4 +--- platform/linux-generic/odp_time.c | 7 +------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/platform/linux-generic/include/odp/plat/time_types.h b/platform/linux-generic/include/odp/plat/time_types.h index e5765ec..10751f5 100644 --- a/platform/linux-generic/include/odp/plat/time_types.h +++ b/platform/linux-generic/include/odp/plat/time_types.h @@ -23,9 +23,7 @@ extern "C" { typedef struct timespec odp_time_t; -odp_time_t odp_time_null(void); - -#define ODP_TIME_NULL odp_time_null() +#define ODP_TIME_NULL ((odp_time_t) {0, 0}) /** * @} diff --git a/platform/linux-generic/odp_time.c b/platform/linux-generic/odp_time.c index 1c7c214..1d374ca 100644 --- a/platform/linux-generic/odp_time.c +++ b/platform/linux-generic/odp_time.c @@ -113,18 +113,13 @@ uint64_t odp_time_to_u64(odp_time_t time) return time_to_ns(time) / resolution; } -odp_time_t odp_time_null(void) -{ - return (struct timespec) {0, 0}; -} - int odp_time_global_init(void) { int ret; struct timespec time; ret = clock_gettime(CLOCK_MONOTONIC_RAW, &time); - start_time = ret ? odp_time_null() : time; + start_time = ret ? ODP_TIME_NULL : time; return ret; }