From patchwork Tue Oct 3 18:00:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 114709 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2166227qgn; Tue, 3 Oct 2017 11:04:34 -0700 (PDT) X-Google-Smtp-Source: AOwi7QD6Ra56EAlZdt6o071XzRIH40HEpQ8w/IHdYutm2vrzK4RADs8RsXjxv8b0suIOLvSMMtIc X-Received: by 10.200.36.24 with SMTP id c24mr25551226qtc.202.1507053873943; Tue, 03 Oct 2017 11:04:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507053873; cv=none; d=google.com; s=arc-20160816; b=aKVL3Y5SdlwgXcljjztAG+V1D612SAW6Eub41ndt8HnrjLf5Dg+HP719PuflpwsChn dQsHfW5nr4IFbEW996KMiUN8UAa98A3YbF+pys5kRnBfRKzIa7CxZlXxjkFd3VNSgfe6 Go5BZ6ior5slVH4Q66eP4XuoMifqwJBcEJrMwvXVClresiMMvro1HpOcJo6lze7NXzai Ky4EoSS23Ux6IEs4vat9E3v9DJ6ddP9Aq86NqhS4KhYwPWOEKu8ouJF1ZLKmU+B0DrgW 4k9BPd9v4cnNywjuFNXdvbR7ay3+vxfQn0roJ0AIV1c15mv+VJXNBPq+wm3vh2pOxhaY S1Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=RIi931A1n69L3W1qo16j/6b344z6Q5PghjatZK96ars=; b=07D6JhWzPjDKFV71oqxxTQBboDiGScbEIMDmxzBb1CzvU6zoBovHYxByTxTshY5PEM ANSrzS2SWMWz0qUeDjw8Z+P0NoeBJxQuziU2yQJzoMmxGJDaKnhzbGid2Qt2a4ED1l0a 8nux0n4iXqIIXQHP0k1Brsj/jAbR8MkTVRyRJnUYeqR8/GaOqGgETfsF2xmH1bFGbQVu x188lWpoK3Gzl/qIWPyqL4WxXyMqKXdgxoNa4MK6PdaCwClCdYnPeiuRDqSMg0zYmNSj jp6+o1tEjFlZiL0uhyqkt5cUgx9XI/CFOjDQ86vP3CgwVZv6NxxaQ8bUp3H0L0kzRhfQ pUXw== ARC-Authentication-Results: i=1; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id h23si2395833qth.500.2017.10.03.11.04.33; Tue, 03 Oct 2017 11:04:33 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 98C8960CA1; Tue, 3 Oct 2017 18:04:33 +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.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL 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 7E31860C29; Tue, 3 Oct 2017 18:02:06 +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 8FB0260CA0; Tue, 3 Oct 2017 18:02:02 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id 7D7EA60CC1 for ; Tue, 3 Oct 2017 18:01:27 +0000 (UTC) Received: from mxback9g.mail.yandex.net (mxback9g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:170]) by forward100o.mail.yandex.net (Yandex) with ESMTP id 20D5F2A23A7F for ; Tue, 3 Oct 2017 21:01:26 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback9g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 6r1axZ7vn0-1PDeA3UE; Tue, 03 Oct 2017 21:01:26 +0300 Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id mHeFvvAoGz-1JMeCWR0; Tue, 03 Oct 2017 21:01:19 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 3 Oct 2017 21:00:04 +0300 Message-Id: <1507053605-3951-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507053605-3951-1-git-send-email-odpbot@yandex.ru> References: <1507053605-3951-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 205 Subject: [lng-odp] [PATCH v1 3/4] linux-gen: timer: drop odp prefix from odp_timer_pool_s 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Maxim Uvarov internal structure should not be named with odp_. Also make code a little bit more consistent to pass type instead of struct to 2 more functions. Signed-off-by: Maxim Uvarov --- /** Email created from pull request 205 (muvarov:master_timer_cleanup) ** https://github.com/Linaro/odp/pull/205 ** Patch: https://github.com/Linaro/odp/pull/205.patch ** Base sha: 052d2687930e5a99568e9349ca9704ae507e8dc5 ** Merge commit sha: 86cbffb9c3a034c900ff3e6f84ef68c62c9dfa29 **/ platform/linux-generic/include/odp/api/plat/timer_types.h | 4 ++-- platform/linux-generic/odp_timer.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/platform/linux-generic/include/odp/api/plat/timer_types.h b/platform/linux-generic/include/odp/api/plat/timer_types.h index a8891f11f..731921b99 100644 --- a/platform/linux-generic/include/odp/api/plat/timer_types.h +++ b/platform/linux-generic/include/odp/api/plat/timer_types.h @@ -24,9 +24,9 @@ extern "C" { * @{ **/ -struct odp_timer_pool_s; /**< Forward declaration */ +struct _timer_pool_s; /**< Forward declaration */ -typedef struct odp_timer_pool_s *odp_timer_pool_t; +typedef struct _timer_pool_s *odp_timer_pool_t; #define ODP_TIMER_POOL_INVALID NULL diff --git a/platform/linux-generic/odp_timer.c b/platform/linux-generic/odp_timer.c index cecbcead0..fb3b34bb4 100644 --- a/platform/linux-generic/odp_timer.c +++ b/platform/linux-generic/odp_timer.c @@ -166,7 +166,7 @@ static inline void set_next_free(odp_timer *tim, uint32_t nf) * Inludes alloc and free timer *****************************************************************************/ -typedef struct odp_timer_pool_s { +typedef struct _timer_pool_s { /* Put frequently accessed fields in the first cache line */ odp_atomic_u64_t cur_tick;/* Current tick value */ uint64_t min_rel_tck; @@ -205,7 +205,7 @@ static inline _timer_pool_t *handle_to_tp(odp_timer_t hdl) } static inline uint32_t handle_to_idx(odp_timer_t hdl, - struct odp_timer_pool_s *tp) + _timer_pool_t *tp) { uint32_t idx = _odp_typeval(hdl) & ((1U << INDEX_BITS) - 1U); __builtin_prefetch(&tp->tick_buf[idx], 0, 0); @@ -214,8 +214,8 @@ static inline uint32_t handle_to_idx(odp_timer_t hdl, ODP_ABORT("Invalid timer handle %#x\n", hdl); } -static inline odp_timer_t tp_idx_to_handle(struct odp_timer_pool_s *tp, - uint32_t idx) +static inline odp_timer_t tp_idx_to_handle(_timer_pool_t *tp, + uint32_t idx) { ODP_ASSERT(idx < (1U << INDEX_BITS)); return _odp_cast_scalar(odp_timer_t, (tp->tp_idx << INDEX_BITS) | idx);