From patchwork Thu Feb 19 10:50:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 44806 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4EE7421553 for ; Thu, 19 Feb 2015 10:51:47 +0000 (UTC) Received: by labge10 with SMTP id ge10sf4552833lab.3 for ; Thu, 19 Feb 2015 02:51:45 -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: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=UnhYSvhQ7/RnKp9zNEskGk8ywuQVt53rUobQYHSe9oY=; b=DeTHan5EaVaoZS99zp+eQ+sC1qjUY6l+k7DR9dK32YYDLo74Z0oWA+j3tNvj5OnM8t lwDLQm7bBAvlTGrkLdc80r2PdSUVLW0wNy6/c6D9c6RdAzDjmlXbj70yUimUn30BtR9P 8CAEFhZTF4ciV13Vcsy/IwToVKGWxvOHjFuBqXvl8ICB3o6S0m2y/ggDQsZaY2fz+39w ti71zFEdKBUY4HPVrkBr7VR/TQemdFn11Oy7HSsySMLNTDWAEcAS7iM3PpNK/Geb6mde pPxNMSsF0V8ilO+vPrK/iB1S/LVK5kC/XeTWdnUss/CuVo2ZH4n1czfU7AyrJakYfOQX hJtQ== X-Gm-Message-State: ALoCoQnVYzf2kwKlgjr18AIxVwy5VJ3bCuWwNRVHLfoldLYAfNMLL2KVoi6uBfKN0qsyTOHDaU6t X-Received: by 10.112.130.70 with SMTP id oc6mr494253lbb.13.1424343105917; Thu, 19 Feb 2015 02:51:45 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.7.134 with SMTP id dc6ls116209lad.87.gmail; Thu, 19 Feb 2015 02:51:45 -0800 (PST) X-Received: by 10.112.125.39 with SMTP id mn7mr3340501lbb.23.1424343105752; Thu, 19 Feb 2015 02:51:45 -0800 (PST) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id uc9si906779lac.13.2015.02.19.02.51.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Feb 2015 02:51:45 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by lbjb6 with SMTP id b6so6681012lbj.2 for ; Thu, 19 Feb 2015 02:51:45 -0800 (PST) X-Received: by 10.152.43.193 with SMTP id y1mr3415769lal.35.1424343105592; Thu, 19 Feb 2015 02:51:45 -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 h5csp410259lbj; Thu, 19 Feb 2015 02:51:44 -0800 (PST) X-Received: by 10.140.202.144 with SMTP id x138mr11035780qha.14.1424343103973; Thu, 19 Feb 2015 02:51:43 -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 c9si7547013qam.58.2015.02.19.02.51.42 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 19 Feb 2015 02:51:43 -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 1YOOho-0003Lj-86; Thu, 19 Feb 2015 10:51:40 +0000 Received: from mail-la0-f48.google.com ([209.85.215.48]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YOOhi-0003Le-CC for lng-odp@lists.linaro.org; Thu, 19 Feb 2015 10:51:34 +0000 Received: by lamq1 with SMTP id q1so6772061lam.5 for ; Thu, 19 Feb 2015 02:51:28 -0800 (PST) X-Received: by 10.152.5.167 with SMTP id t7mr3611533lat.32.1424343088093; Thu, 19 Feb 2015 02:51:28 -0800 (PST) Received: from localhost.localdomain (ppp91-76-170-205.pppoe.mtu-net.ru. [91.76.170.205]) by mx.google.com with ESMTPSA id yo6sm4736549lab.36.2015.02.19.02.51.26 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Feb 2015 02:51:27 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Thu, 19 Feb 2015 13:50:51 +0300 Message-Id: <1424343051-12344-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.8.5.1.163.gd7aced9 X-Topics: patch Subject: [lng-odp] [PATCHv6] 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.173 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 --- v6: move #define ODP_VERSION_IMPL to c file platform/linux-generic/Makefile.am | 4 +-- .../linux-generic/include/odp/plat/version_types.h | 30 ------------------- platform/linux-generic/include/odp/version.h | 1 - platform/linux-generic/odp_impl.c | 35 ---------------------- platform/linux-generic/odp_version.c | 21 +++++++++++++ 5 files changed, 22 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..fa88c4b 100644 --- a/platform/linux-generic/include/odp/version.h +++ b/platform/linux-generic/include/odp/version.h @@ -17,7 +17,6 @@ extern "C" { #endif -#include #include #ifdef __cplusplus 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..20cfcf6 100644 --- a/platform/linux-generic/odp_version.c +++ b/platform/linux-generic/odp_version.c @@ -6,7 +6,28 @@ #include +/** + * ODP Implementation version + */ +#define ODP_VERSION_IMPL 0 + +#define ODP_VERSION_STR_EXPAND(x) #x + +#define ODP_VERSION_TO_STR(x) ODP_VERSION_STR_EXPAND(x) + +#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) + +#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; +}