From patchwork Tue Feb 3 15:24:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 44248 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f199.google.com (mail-we0-f199.google.com [74.125.82.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9A14721513 for ; Tue, 3 Feb 2015 15:25:28 +0000 (UTC) Received: by mail-we0-f199.google.com with SMTP id u56sf21440388wes.2 for ; Tue, 03 Feb 2015 07:25:27 -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=eOTA44wPZ4PSGaUbkyXO10ekWOt3apP3WGNJN6lPD9w=; b=MWiiaPLgBWqWJRvR3lHRYUP8xTcOqsx0OUlKV4nlD+U7cKGdzz9t7QuUCzpFATnACd tvwDwnqinz29nuE/rJAWjyD3V2s04YzGBAWJr2955WOLgBswrDYnLEByB3TSK7f9R/Hw vhNt/QhMdHnT0+LcWGucQfnaCPfFwMkAEG9JBhlaBJsn1Te0/LbucRXhhr8Jy0XBq6HP BTmxW0PlVZzOIEGidj1WVAKHwm+8p2i3dyiL4J3IzlwQy4b/6V55BcDZVExb9Ze9pA8z mnka0KetqpGAHZSNaMvb8cYZ/iEWkmpqQci8V+vXIcPhLUNkmGoo93tdwqf2PNeTifEr nH3g== X-Gm-Message-State: ALoCoQkLQZV2sFU2idP62/lnexjoT2qcFCiWZhN9Ts252cVTl2gPJWalne7FIHKravVXXPOFktQt X-Received: by 10.112.140.65 with SMTP id re1mr3274913lbb.4.1422977127843; Tue, 03 Feb 2015 07:25:27 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.105 with SMTP id r9ls199649lar.8.gmail; Tue, 03 Feb 2015 07:25:27 -0800 (PST) X-Received: by 10.152.10.65 with SMTP id g1mr12843204lab.84.1422977127698; Tue, 03 Feb 2015 07:25:27 -0800 (PST) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id qn4si19456198lbb.56.2015.02.03.07.25.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Feb 2015 07:25:27 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by mail-la0-f51.google.com with SMTP id ge10so52976514lab.10 for ; Tue, 03 Feb 2015 07:25:27 -0800 (PST) X-Received: by 10.112.164.101 with SMTP id yp5mr24669020lbb.82.1422977127119; Tue, 03 Feb 2015 07:25:27 -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 h5csp2007378lbj; Tue, 3 Feb 2015 07:25:26 -0800 (PST) X-Received: by 10.224.125.67 with SMTP id x3mr53465764qar.40.1422977125767; Tue, 03 Feb 2015 07:25:25 -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 y4si28399271qch.0.2015.02.03.07.24.55 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 03 Feb 2015 07:25:25 -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 1YIfLQ-0003Sa-00; Tue, 03 Feb 2015 15:24:52 +0000 Received: from mail-la0-f49.google.com ([209.85.215.49]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YIfLJ-0003SV-R1 for lng-odp@lists.linaro.org; Tue, 03 Feb 2015 15:24:45 +0000 Received: by mail-la0-f49.google.com with SMTP id gf13so52681847lab.8 for ; Tue, 03 Feb 2015 07:24:39 -0800 (PST) X-Received: by 10.152.178.197 with SMTP id da5mr24426751lac.87.1422977079778; Tue, 03 Feb 2015 07:24:39 -0800 (PST) Received: from localhost.localdomain ([188.92.105.210]) by mx.google.com with ESMTPSA id l8sm4040542lag.24.2015.02.03.07.24.38 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Feb 2015 07:24:38 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Tue, 3 Feb 2015 18:24:12 +0300 Message-Id: <1422977052-16544-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] [PATCH] 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.215.51 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 odp_version_api_str() has to be in API header while odp_version_impl_str() should be in linux-generic. That change fixes: https://bugs.linaro.org/show_bug.cgi?id=1194 Signed-off-by: Maxim Uvarov --- include/odp/api/version.h | 29 +++++++++++++++------------- platform/linux-generic/include/odp/version.h | 25 +++++++++++------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/include/odp/api/version.h b/include/odp/api/version.h index 0889d9c..bfeb40b 100644 --- a/include/odp/api/version.h +++ b/include/odp/api/version.h @@ -48,24 +48,27 @@ extern "C" { */ #define ODP_VERSION_API_MINOR 0 +/** @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) + /** * Returns ODP API version string */ -const char *odp_version_api_str(void); - +static inline const char *odp_version_api_str(void) +{ + return ODP_VERSION_API_STR; +} /** - * Returns ODP implementation version string - * - * Every implementation of ODP may receive bug fixes independent of the version - * of the API changing, this function returns that indication string. - * @note This string is implementation specific. - * @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/include/odp/version.h b/platform/linux-generic/include/odp/version.h index f29320a..33cc5ba 100644 --- a/platform/linux-generic/include/odp/version.h +++ b/platform/linux-generic/include/odp/version.h @@ -17,22 +17,19 @@ 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 /** - * @} - */ - -#include + * Returns ODP implementation version string + * + * Every implementation of ODP may receive bug fixes independent of the version + * of the API changing, this function returns that indication string. + * @note This string is implementation specific. + * @sa odp_version_api_str() + * + * @return null terminated implementation specific version identifier string + */ +const char *odp_version_impl_str(void); #ifdef __cplusplus }