From patchwork Tue Feb 17 14:26:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 44748 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f69.google.com (mail-ee0-f69.google.com [74.125.83.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A30E521557 for ; Tue, 17 Feb 2015 14:27:53 +0000 (UTC) Received: by mail-ee0-f69.google.com with SMTP id b15sf24165590eek.0 for ; Tue, 17 Feb 2015 06:27:52 -0800 (PST) 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:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=Mz5YFmCSM40YPITlwW2VE7fKNltkhfqngC3yX7Vg/+Y=; b=VXppPeGazfjQeOC1rNRXMYWP4L1q63FqjyPNLiDoVfGKOWaFElQaGUmqi+sV8e9GzO tca9g5lRQ25N9cs2CTkrm9EkR8EJbjWRwrP7Glk5Aigv/DsCNPodoPlH4WzKvCSs+SC9 xkSbWmmg4g95re8Tm4pG5uoovA9/2nAqS1zl/FCicKzYIfVx2ll6cC77cffvZeyFKMbX 5KFwdbmyKg7htCZlJ1Ip0l9ZtvnzEPEIrmiW5/RigwbiWY0WDV8gvTMXT3KTQMLxY5kS As1A82u8ScaY7oiGKh7E2xVWIPeFsaw+GhLH7x/Tx5JijIwTF65Mn6gcXWU29KM0GJeH 7SpQ== X-Gm-Message-State: ALoCoQkBmrLE0On510iL5Dk51A1Aoq1oKDAKEpCrTU8dWtFjyt41ydAv6W3z2w30DuWIQ1JbOn7E X-Received: by 10.112.50.106 with SMTP id b10mr1269916lbo.8.1424183272853; Tue, 17 Feb 2015 06:27:52 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.234.102 with SMTP id ud6ls610973lac.26.gmail; Tue, 17 Feb 2015 06:27:52 -0800 (PST) X-Received: by 10.152.27.136 with SMTP id t8mr28616561lag.60.1424183272689; Tue, 17 Feb 2015 06:27:52 -0800 (PST) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id vh9si12664897lac.2.2015.02.17.06.27.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Feb 2015 06:27:52 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lbdu14 with SMTP id u14so4713710lbd.1 for ; Tue, 17 Feb 2015 06:27:52 -0800 (PST) X-Received: by 10.112.161.34 with SMTP id xp2mr28392298lbb.73.1424183272485; Tue, 17 Feb 2015 06:27:52 -0800 (PST) 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.112.35.133 with SMTP id h5csp2237312lbj; Tue, 17 Feb 2015 06:27:51 -0800 (PST) X-Received: by 10.140.109.164 with SMTP id l33mr455598qgf.91.1424183270942; Tue, 17 Feb 2015 06:27:50 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id d2si17866900qam.66.2015.02.17.06.27.49 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 17 Feb 2015 06:27:50 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YNj7r-0007Vl-AN; Tue, 17 Feb 2015 14:27:47 +0000 Received: from mail-lb0-f172.google.com ([209.85.217.172]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YNj7g-0007QE-Ha for lng-odp@lists.linaro.org; Tue, 17 Feb 2015 14:27:36 +0000 Received: by lbiz11 with SMTP id z11so4759453lbi.8 for ; Tue, 17 Feb 2015 06:27:30 -0800 (PST) X-Received: by 10.152.23.42 with SMTP id j10mr28704619laf.104.1424183250364; Tue, 17 Feb 2015 06:27:30 -0800 (PST) Received: from localhost.localdomain ([188.92.105.210]) by mx.google.com with ESMTPSA id jk7sm1801982lbc.14.2015.02.17.06.27.28 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Feb 2015 06:27:29 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Tue, 17 Feb 2015 17:26:42 +0300 Message-Id: <1424183202-23602-3-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.8.5.1.163.gd7aced9 In-Reply-To: <1424183202-23602-1-git-send-email-maxim.uvarov@linaro.org> References: <1424183202-23602-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv5 2/2] linux-generic: move versions to odp_version.c and get rid of odp_impl.c 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: maxim.uvarov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) 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 Move implementation version to odp_version.c and get rid of odp_impl.c. Signed-off-by: Maxim Uvarov --- platform/linux-generic/Makefile.am | 4 +-- .../linux-generic/include/odp/plat/version_types.h | 30 ------------------- platform/linux-generic/include/odp/version.h | 6 +++- platform/linux-generic/odp_impl.c | 35 ---------------------- platform/linux-generic/odp_version.c | 20 +++++++++++++ 5 files changed, 26 insertions(+), 69 deletions(-) delete mode 100644 platform/linux-generic/include/odp/plat/version_types.h delete mode 100644 platform/linux-generic/odp_impl.c diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 16adccc..b77b05b 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -61,8 +61,7 @@ odpplatinclude_HEADERS = \ $(top_srcdir)/platform/linux-generic/include/odp/plat/schedule_types.h \ $(top_srcdir)/platform/linux-generic/include/odp/plat/shared_memory_types.h \ $(top_srcdir)/platform/linux-generic/include/odp/plat/strong_types.h \ - $(top_srcdir)/platform/linux-generic/include/odp/plat/timer_types.h \ - $(top_srcdir)/platform/linux-generic/include/odp/plat/version_types.h + $(top_srcdir)/platform/linux-generic/include/odp/plat/timer_types.h odpapiincludedir= $(includedir)/odp/api odpapiinclude_HEADERS = \ @@ -144,7 +143,6 @@ __LIB__libodp_la_SOURCES = \ odp_errno.c \ odp_event.c \ odp_init.c \ - odp_impl.c \ odp_linux.c \ odp_packet.c \ odp_packet_flags.c \ diff --git a/platform/linux-generic/include/odp/plat/version_types.h b/platform/linux-generic/include/odp/plat/version_types.h deleted file mode 100644 index e3327eb..0000000 --- a/platform/linux-generic/include/odp/plat/version_types.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (c) 2015, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef ODP_VERSION_TYPESH_ -#define ODP_VERSION_TYPESH_ - -#ifdef __cplusplus -extern "C" { -#endif - -/** @internal Version string expand */ -#define ODP_VERSION_STR_EXPAND(x) #x - -/** @internal Version to string */ -#define ODP_VERSION_TO_STR(x) ODP_VERSION_STR_EXPAND(x) - -/** @internal API version string */ -#define ODP_VERSION_API_STR \ -ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ -ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ -ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/include/odp/version.h b/platform/linux-generic/include/odp/version.h index c98cb30..4f1eff4 100644 --- a/platform/linux-generic/include/odp/version.h +++ b/platform/linux-generic/include/odp/version.h @@ -17,9 +17,13 @@ extern "C" { #endif -#include #include +/** + * ODP Implementation version + */ +#define ODP_VERSION_IMPL 0 + #ifdef __cplusplus } #endif diff --git a/platform/linux-generic/odp_impl.c b/platform/linux-generic/odp_impl.c deleted file mode 100644 index ca3224d..0000000 --- a/platform/linux-generic/odp_impl.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (c) 2014, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - - -/** - * @file - * - * ODP Implementation information - */ - -#ifndef ODP_IMPL_H_ -#define ODP_IMPL_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#define ODP_VERSION_IMPL 0 -#define ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL) - -const char *odp_version_impl_str(void) -{ - return ODP_VERSION_IMPL_STR; -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/platform/linux-generic/odp_version.c b/platform/linux-generic/odp_version.c index b5219d4..3d91d88 100644 --- a/platform/linux-generic/odp_version.c +++ b/platform/linux-generic/odp_version.c @@ -6,7 +6,27 @@ #include +/** @internal Version string expand */ +#define ODP_VERSION_STR_EXPAND(x) #x + +/** @internal Version to string */ +#define ODP_VERSION_TO_STR(x) ODP_VERSION_STR_EXPAND(x) + +/** @internal API version string */ +#define ODP_VERSION_API_STR \ +ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ +ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ +ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) + +/** @internal Implementation version string */ +#define ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL) + const char *odp_version_api_str(void) { return ODP_VERSION_API_STR; } + +const char *odp_version_impl_str(void) +{ + return ODP_VERSION_IMPL_STR; +}