From patchwork Wed Feb 4 15:22:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 44374 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 43F732029F for ; Wed, 4 Feb 2015 15:23:49 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id u10sf1817074lbd.3 for ; Wed, 04 Feb 2015 07:23:48 -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=Y2bt349J3gtrPbNUMnWZsWVuW7JqqYGgebmmJdACFWE=; b=b0dvGb6gQjgPyCEVRLXAGBJ9XRFPf189KzELJv5LsKJo81eBDb2GomM5epWLyVNrQC 9HEUWnuxNEoeuJlcWD/pvLQa06oun8fPOeOsX9CrxXP1xFo/iwoDsvMvCzg8mO7Gtwfq SCFYtm/ljRI45n76Ng6SUCFKO54ihJ39X5Hj2CqTG65i2F4NkvbDrUVLyvNb+Bb84qJD wwmvbvxsMj13qdNraEhSb9ikHwti/lxLfXuyKW8mc7qWEs3d8O/uZqq3+x6PTQfVOviS Uqgi6eFgHJ7TKMlBbsZ3LlFiG5SePfqI8Yj7e3jg36k8Pynq7mXcAaOWj2yt7n3F4JMA Moxw== X-Gm-Message-State: ALoCoQnwGgHxpnHNb0CC8Js53Xv17puHi6b3zLzJW0Q6HDCwyoSnPfDuDiSvbSdxssK7E8yEL2cP X-Received: by 10.112.162.35 with SMTP id xx3mr4000851lbb.16.1423063428217; Wed, 04 Feb 2015 07:23:48 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.234.102 with SMTP id ud6ls45144lac.26.gmail; Wed, 04 Feb 2015 07:23:48 -0800 (PST) X-Received: by 10.152.28.37 with SMTP id y5mr10300221lag.55.1423063428023; Wed, 04 Feb 2015 07:23:48 -0800 (PST) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id ur5si1610938lac.57.2015.02.04.07.23.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Feb 2015 07:23:48 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by mail-lb0-f178.google.com with SMTP id u10so2059089lbd.9 for ; Wed, 04 Feb 2015 07:23:47 -0800 (PST) X-Received: by 10.152.7.229 with SMTP id m5mr31509055laa.80.1423063427915; Wed, 04 Feb 2015 07:23:47 -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 h5csp556534lbj; Wed, 4 Feb 2015 07:23:47 -0800 (PST) X-Received: by 10.140.36.239 with SMTP id p102mr17355938qgp.8.1423063426767; Wed, 04 Feb 2015 07:23:46 -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 w7si2166690qal.63.2015.02.04.07.23.45 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 04 Feb 2015 07:23:46 -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 1YJ1nq-0002G6-Pq; Wed, 04 Feb 2015 15:23:42 +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 1YJ1nk-0002E2-V2 for lng-odp@lists.linaro.org; Wed, 04 Feb 2015 15:23:37 +0000 Received: by mail-la0-f48.google.com with SMTP id pv20so2139870lab.7 for ; Wed, 04 Feb 2015 07:23:30 -0800 (PST) X-Received: by 10.152.10.4 with SMTP id e4mr31328331lab.62.1423063410601; Wed, 04 Feb 2015 07:23:30 -0800 (PST) Received: from localhost.localdomain ([188.92.105.210]) by mx.google.com with ESMTPSA id x9sm414005lbb.46.2015.02.04.07.23.29 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 04 Feb 2015 07:23:29 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Wed, 4 Feb 2015 18:22:40 +0300 Message-Id: <1423063360-9010-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] [PATCHv4] api: fix odp_version_api_str() 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.178 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 Remove odp_impl.c and version_types.h, represent odp_version.c which has implementation for both api and imp versions. That change fixes: https://bugs.linaro.org/show_bug.cgi?id=1194 Signed-off-by: Maxim Uvarov --- v4: imp version is public api, place to to public header. include/odp/api/version.h | 2 +- platform/linux-generic/Makefile.am | 5 ++- .../linux-generic/include/odp/plat/version_types.h | 30 ----------------- platform/linux-generic/include/odp/version.h | 17 ++-------- platform/linux-generic/odp_impl.c | 35 ------------------- platform/linux-generic/odp_version.c | 39 ++++++++++++++++++++++ 6 files changed, 44 insertions(+), 84 deletions(-) delete mode 100644 platform/linux-generic/include/odp/plat/version_types.h delete mode 100644 platform/linux-generic/odp_impl.c create mode 100644 platform/linux-generic/odp_version.c diff --git a/include/odp/api/version.h b/include/odp/api/version.h index 0889d9c..e684984 100644 --- a/include/odp/api/version.h +++ b/include/odp/api/version.h @@ -63,7 +63,7 @@ const char *odp_version_api_str(void); * @sa odp_version_api_str() * * @return null terminated implementation specific version identifier string - */ + */ const char *odp_version_impl_str(void); /** * @} diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 81245b1..68603c7 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -57,8 +57,7 @@ odpplatinclude_HEADERS = \ $(top_srcdir)/platform/linux-generic/include/odp/plat/queue_types.h \ $(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/version_types.h + $(top_srcdir)/platform/linux-generic/include/odp/plat/strong_types.h odpapiincludedir= $(includedir)/odp/api odpapiinclude_HEADERS = \ @@ -137,7 +136,6 @@ __LIB__libodp_la_SOURCES = \ odp_crypto.c \ odp_event.c \ odp_init.c \ - odp_impl.c \ odp_linux.c \ odp_packet.c \ odp_packet_flags.c \ @@ -154,4 +152,5 @@ __LIB__libodp_la_SOURCES = \ odp_ticketlock.c \ odp_time.c \ odp_timer.c \ + odp_version.c \ odp_weak.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 f29320a..462ab56 100644 --- a/platform/linux-generic/include/odp/version.h +++ b/platform/linux-generic/include/odp/version.h @@ -17,23 +17,10 @@ extern "C" { #endif -#include - -/** @ingroup odp_ver_abt_log_dbg - * @{ - */ - -static inline const char *odp_version_api_str(void) -{ - return ODP_VERSION_API_STR; -} - -/** - * @} - */ - #include +#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 new file mode 100644 index 0000000..032564d --- /dev/null +++ b/platform/linux-generic/odp_version.c @@ -0,0 +1,39 @@ +/* Copyright (c) 2014, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * ODP API and Implementation information + */ + +#include +#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) + +const char *odp_version_api_str(void) +{ + return ODP_VERSION_API_STR; +} + +/** @internal Implementation version to string */ +#define ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL) + +const char *odp_version_impl_str(void) +{ + return ODP_VERSION_IMPL_STR; +}