eal: remove RTE_FUNC_PTR_* deprecated macros

Message ID 20230803094118.558955-1-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series eal: remove RTE_FUNC_PTR_* deprecated macros |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-testing success Testing PASS
ci/iol-aarch-unit-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS

Commit Message

David Marchand Aug. 3, 2023, 9:41 a.m. UTC
  The RTE_FUNC_PTR_OR_* macros were marked as deprecated in v22.11, we can
remove them.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 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
  

Comments

Bruce Richardson Aug. 3, 2023, 9:43 a.m. UTC | #1
On Thu, Aug 03, 2023 at 11:41:18AM +0200, David Marchand wrote:
> The RTE_FUNC_PTR_OR_* macros were marked as deprecated in v22.11, we can
> remove them.
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  
Morten Brørup Aug. 3, 2023, 3:27 p.m. UTC | #2
> From: David Marchand [mailto:david.marchand@redhat.com]
> Sent: Thursday, 3 August 2023 11.41
> 
> The RTE_FUNC_PTR_OR_* macros were marked as deprecated in v22.11, we can
> remove them.
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---

Acked-by: Morten Brørup <mb@smartsharesystems.com>
  
Tyler Retzlaff Aug. 3, 2023, 4:10 p.m. UTC | #3
On Thu, Aug 03, 2023 at 11:41:18AM +0200, David Marchand wrote:
> The RTE_FUNC_PTR_OR_* macros were marked as deprecated in v22.11, we can
> remove them.
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
  
David Marchand Aug. 4, 2023, 1:02 p.m. UTC | #4
On Thu, Aug 3, 2023 at 11:43 AM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Thu, Aug 03, 2023 at 11:41:18AM +0200, David Marchand wrote:
> > The RTE_FUNC_PTR_OR_* macros were marked as deprecated in v22.11, we can
> > remove them.
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>

Applied, thanks.
  

Patch

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.
  */