From patchwork Tue Oct 10 15:00:09 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: 115414 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp3860498qgn; Tue, 10 Oct 2017 08:05:29 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBZIIUv0+FlChiKf8dYAjJ7n5keBE9BKhnC+yVw4sw4TZulRfNouG522l8nAhLOji0a/Kky X-Received: by 10.107.201.144 with SMTP id z138mr4872488iof.223.1507647929333; Tue, 10 Oct 2017 08:05:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507647929; cv=none; d=google.com; s=arc-20160816; b=1KKmELDOhKCW9IR/7eR4CD8BwD1L37nVbLzm+rlQ/S/T9XonqQafg5zCiuBay67pxJ g585dGy3rfVTaNeqL2e5AAoBNvE6M6QMnZNJKEmQbix5pqPzKulAtFmqS+ALupt4h4/u iTdFuHBMAZ734E7kJrHXPmf4KvRLjZ5pcjdvJCCvFKmMT7cUGxBFGwLTafb2Aey09OhY UmCskn5SvwqpGTWZbNxcw+3+qPlxdUKXBcmlzkYoXfEuGNMadThVqNKkJccPbJEYBmHQ bxJ/x68Xax8dHxcXFUMVT3wwyoXcWKT9Y3VFEEBNUwZ8QkZOVU5aOFKGf1tHqQG/pz0F aghA== 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=2zRfzq7qelY4y9Btjbr5TPyJ41jzAv+rFDewkwEgMkw=; b=Bvyj4AQVmp1vTqcW1hndHdWkc0XtrZPlqrXIpj+z3h32Y+ZwlBxH8ANC1PfoJK+EdT pYXgzNZDJLOVXRJReOjKP95DF2MAYk701aU5uleAZbNkV35vYjFiqSY1WZntT0vcEksk D16cB6ePLscumlhKa1qeXEOBGA9PFUTOKIrUzofXnZT6VihHSMgXYLW9m99yrdhSBtQm IwfiNA6e6L+qT/TiyQE7yKSRjwft0Aiu/z7i6oZFejhd/quSSZPGjQZfcGt20s5L2ruj mRbV03LvJLYdaV/kF/ALwnGu1gg34fpBT6SH1TLIlQtoKHMSttzv5S1jV4kvoptN4ISu XO5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 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 (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id y67si3683817itg.46.2017.10.10.08.05.21; Tue, 10 Oct 2017 08:05:29 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 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 BEBE761CBB; Tue, 10 Oct 2017 15:05:21 +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,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 A6A3F60D3E; Tue, 10 Oct 2017 15:01:33 +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 6F29860C03; Tue, 10 Oct 2017 15:00:56 +0000 (UTC) Received: from forward103p.mail.yandex.net (forward103p.mail.yandex.net [77.88.28.106]) by lists.linaro.org (Postfix) with ESMTPS id 066BD60C16 for ; Tue, 10 Oct 2017 15:00:48 +0000 (UTC) Received: from mxback5o.mail.yandex.net (mxback5o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1f]) by forward103p.mail.yandex.net (Yandex) with ESMTP id 7959921844F1 for ; Tue, 10 Oct 2017 18:00:46 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback5o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id YfXO8TVNFs-0kVeGuYd; Tue, 10 Oct 2017 18:00:46 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id jk0YtVglYD-0jxGRn3g; Tue, 10 Oct 2017 18:00:45 +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, 10 Oct 2017 18:00:09 +0300 Message-Id: <1507647610-23573-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507647610-23573-1-git-send-email-odpbot@yandex.ru> References: <1507647610-23573-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 205 Subject: [lng-odp] [PATCH v2 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: 3bacbfd55edf76b897a4b2e5c62b59ca6fa95331 ** Merge commit sha: 818bddefdf4c5afa6d1608da3de280ebcf585d75 **/ 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..9605d5841 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 977385a7f..8b8166784 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);