From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2607AA04F9 for ; Thu, 9 Jan 2020 14:34:56 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1BBBE1DD8F; Thu, 9 Jan 2020 14:34:56 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 4285D1DD8F for ; Thu, 9 Jan 2020 14:34:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578576893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Irnsgc5mNBcFg/qswAwHRXdkpgKiy2QYiMrsMYd4cRg=; b=DYF1+U4mfaZV7L0vvT70WfschD61/ZlmOtoORQxgQPipYBXiScPXESTCAmbrhj0Es7r0+Q whDG3pSmxF5Mc2oOM7vbAh2+D7Dvqoi9oZC/kiTmBMUEQ3m0BbhBDwOuqvkOxKM1B5laBk lvPGeIO2QSLGV4HAgAuaQmAiI5JUuSo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-338-uuEI6yUwMbOPbs82YdCmJw-1; Thu, 09 Jan 2020 08:34:50 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1D08C801E6C; Thu, 9 Jan 2020 13:34:49 +0000 (UTC) Received: from rh.redhat.com (unknown [10.36.118.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id E25A47C38D; Thu, 9 Jan 2020 13:34:47 +0000 (UTC) From: Kevin Traynor To: stable@dpdk.org Cc: ktraynor@redhat.com, Stephen Hemminger , Ferruh Yigit Date: Thu, 9 Jan 2020 13:34:29 +0000 Message-Id: <20200109133433.12494-4-ktraynor@redhat.com> In-Reply-To: <20200109133433.12494-1-ktraynor@redhat.com> References: <20200109133433.12494-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: uuEI6yUwMbOPbs82YdCmJw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] [18.11 3/7] eal: remove legacy PMD log macro X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Stephen Hemminger [ upstream commit e7d798172f911b1af74f3c54ef67e8bb18b36284 ] The RTE_PMD_DEBUG_TRACE was only enabled for EVENTDEV_DEBUG and that configuration is now handled by RTE_EDEV_LOG macros. Signed-off-by: Stephen Hemminger Reviewed-by: Ferruh Yigit --- lib/librte_eal/common/include/rte_dev.h | 41 ++----------------------- 1 file changed, 2 insertions(+), 39 deletions(-) diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/commo= n/include/rte_dev.h index 850b03e13..d006b5743 100644 --- a/lib/librte_eal/common/include/rte_dev.h +++ b/lib/librte_eal/common/include/rte_dev.h @@ -44,50 +44,13 @@ typedef void (*rte_dev_event_cb_fn)(const char *device_= name, =09=09=09=09=09void *cb_arg); =20 -__attribute__((format(printf, 2, 0))) -static inline void -rte_pmd_debug_trace(const char *func_name, const char *fmt, ...) -{ -=09va_list ap; - -=09va_start(ap, fmt); - -=09{ -=09=09char buffer[vsnprintf(NULL, 0, fmt, ap) + 1]; - -=09=09va_end(ap); - -=09=09va_start(ap, fmt); -=09=09vsnprintf(buffer, sizeof(buffer), fmt, ap); -=09=09va_end(ap); - -=09=09rte_log(RTE_LOG_ERR, RTE_LOGTYPE_PMD, "%s: %s", -=09=09=09func_name, buffer); -=09} -} - -/* - * Enable RTE_PMD_DEBUG_TRACE() when at least one component relying on the - * RTE_*_RET() macros defined below is compiled in debug mode. - */ -#if defined(RTE_LIBRTE_EVENTDEV_DEBUG) -#define RTE_PMD_DEBUG_TRACE(...) \ -=09rte_pmd_debug_trace(__func__, __VA_ARGS__) -#else -#define RTE_PMD_DEBUG_TRACE(...) (void)0 -#endif - /* Macros to check for invalid function pointers */ #define RTE_FUNC_PTR_OR_ERR_RET(func, retval) do { \ -=09if ((func) =3D=3D NULL) { \ -=09=09RTE_PMD_DEBUG_TRACE("Function not supported\n"); \ +=09if ((func) =3D=3D NULL) \ =09=09return retval; \ -=09} \ } while (0) =20 #define RTE_FUNC_PTR_OR_RET(func) do { \ -=09if ((func) =3D=3D NULL) { \ -=09=09RTE_PMD_DEBUG_TRACE("Function not supported\n"); \ +=09if ((func) =3D=3D NULL) \ =09=09return; \ -=09} \ } while (0) =20 --=20 2.21.1