From patchwork Thu Aug 3 09:41:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 129902 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 65C2742FC4; Thu, 3 Aug 2023 11:41:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E544F4282D; Thu, 3 Aug 2023 11:41:24 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id AB81D4161A for ; Thu, 3 Aug 2023 11:41:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691055683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IM4DoVeIAPX9k4f+UGYF+66LaGzaNBKC3MUqmyHMg7g=; b=H9XgbS74ktYJwf2IoPYaUmTjvguEAW9RHa7tF2s5z/xukpSNclgLUc06lwMmdIOuK55ERV cnRrVPOyqZaddTJES8ZprjrgGkH3CZU4BRmE7t9Sr93AOKUqPiKdpmY9bEs+Sj4gnt8MMx z4+8lQDhBGW83GHsxIoV7hqfCcjpVpc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-348-Jh9710ODMP-CmP0Ugj19sw-1; Thu, 03 Aug 2023 05:41:21 -0400 X-MC-Unique: Jh9710ODMP-CmP0Ugj19sw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 40B3C185A791 for ; Thu, 3 Aug 2023 09:41:21 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.120]) by smtp.corp.redhat.com (Postfix) with ESMTP id CA292200B66C for ; Thu, 3 Aug 2023 09:41:20 +0000 (UTC) From: David Marchand To: dev@dpdk.org Subject: [PATCH] eal: remove RTE_FUNC_PTR_* deprecated macros Date: Thu, 3 Aug 2023 11:41:18 +0200 Message-ID: <20230803094118.558955-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The RTE_FUNC_PTR_OR_* macros were marked as deprecated in v22.11, we can remove them. Signed-off-by: David Marchand Acked-by: Bruce Richardson Acked-by: Morten Brørup Acked-by: Tyler Retzlaff Acked-by: Morten Brørup Acked-by: Tyler Retzlaff --- devtools/cocci/func_or_ret.cocci | 12 ------------ doc/guides/rel_notes/deprecation.rst | 4 ---- doc/guides/rel_notes/release_23_11.rst | 2 ++ lib/eal/include/rte_dev.h | 13 ------------- 4 files changed, 2 insertions(+), 29 deletions(-) delete mode 100644 devtools/cocci/func_or_ret.cocci diff --git a/devtools/cocci/func_or_ret.cocci b/devtools/cocci/func_or_ret.cocci deleted file mode 100644 index f23d60cc4e..0000000000 --- a/devtools/cocci/func_or_ret.cocci +++ /dev/null @@ -1,12 +0,0 @@ -@@ -expression cond, ret; -@@ --RTE_FUNC_PTR_OR_ERR_RET(cond, ret); -+if (cond == NULL) -+ return ret; -@@ -expression cond; -@@ --RTE_FUNC_PTR_OR_RET(cond); -+if (cond == NULL) -+ return; diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 494b401cda..502dd3a28c 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -51,10 +51,6 @@ Deprecation Notices are renamed to ``rte_tel_data_add_array_uint`` and ``rte_tel_data_add_dict_uint`` respectively. As such, the old function names are deprecated and will be removed in a future release. -* eal: RTE_FUNC_PTR_OR_* macros have been marked deprecated and will be removed - in the future. Applications can use ``devtools/cocci/func_or_ret.cocci`` - to update their code. - * eal: The functions ``rte_thread_setname`` and ``rte_ctrl_thread_create`` are planned to be deprecated starting with the 23.07 release, subject to the replacement API rte_thread_set_name and rte_thread_create_control being diff --git a/doc/guides/rel_notes/release_23_11.rst b/doc/guides/rel_notes/release_23_11.rst index 6b4dd21fd0..f644f03def 100644 --- a/doc/guides/rel_notes/release_23_11.rst +++ b/doc/guides/rel_notes/release_23_11.rst @@ -68,6 +68,8 @@ Removed Items Also, make sure to start the actual text at the margin. ======================================================= +* eal: Removed deprecated ``RTE_FUNC_PTR_OR_*`` macros. + API Changes ----------- diff --git a/lib/eal/include/rte_dev.h b/lib/eal/include/rte_dev.h index dc1acc8953..8568535ac0 100644 --- a/lib/eal/include/rte_dev.h +++ b/lib/eal/include/rte_dev.h @@ -42,19 +42,6 @@ typedef void (*rte_dev_event_cb_fn)(const char *device_name, enum rte_dev_event_type event, void *cb_arg); -/* Macros to check for invalid function pointers */ -#define RTE_FUNC_PTR_OR_ERR_RET(func, retval) RTE_DEPRECATED(RTE_FUNC_PTR_OR_ERR_RET) \ -do { \ - if ((func) == NULL) \ - return retval; \ -} while (0) - -#define RTE_FUNC_PTR_OR_RET(func) RTE_DEPRECATED(RTE_FUNC_PTR_OR_RET) \ -do { \ - if ((func) == NULL) \ - return; \ -} while (0) - /** * Device policies. */