[v4,10/11] eal: mark old macros for blacklist/whitelist as deprecated
diff mbox series

Message ID 20200714053919.5609-11-stephen@networkplumber.org
State Superseded
Delegated to: Thomas Monjalon
Headers show
Series
  • rename blacklist/whitelist to exclude/include
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch warning coding style issues

Commit Message

Stephen Hemminger July 14, 2020, 5:39 a.m. UTC
Use of these macros in applications should cause a deprecation
warning.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 lib/librte_eal/include/rte_bus.h     |  9 +++++++--
 lib/librte_eal/include/rte_dev.h     | 10 +++++++---
 lib/librte_eal/include/rte_devargs.h | 10 +++++++---
 3 files changed, 21 insertions(+), 8 deletions(-)

Patch
diff mbox series

diff --git a/lib/librte_eal/include/rte_bus.h b/lib/librte_eal/include/rte_bus.h
index 19309ad2ddd7..aa0f3aa9c81b 100644
--- a/lib/librte_eal/include/rte_bus.h
+++ b/lib/librte_eal/include/rte_bus.h
@@ -220,8 +220,13 @@  enum rte_bus_scan_mode {
 };
 
 /* Backwards compatibility will be deprecated */
-#define RTE_BUS_SCAN_WHITELIST  RTE_BUS_SCAN_ALLOWLIST
-#define RTE_BUS_SCAN_BLACKLIST	RTE_BUS_SCAN_BLOCKLIST
+#define RTE_BUS_SCAN_WHITELIST  \
+	_Pragma("GCC warning \"'RTE_BUS_SCAN_WHITELIST' macro is deprecated.\"") \
+	RTE_BUS_SCAN_ALLOWLIST
+
+#define RTE_BUS_SCAN_BLACKLIST	\
+	_Pragma("GCC warning \"'RTE_BUS_SCAN_BLACKLIST' macro is deprecated.\"") \
+	RTE_BUS_SCAN_BLOCKLIST
 
 /**
  * A structure used to configure bus operations.
diff --git a/lib/librte_eal/include/rte_dev.h b/lib/librte_eal/include/rte_dev.h
index 1208b1e99b05..81dded1dad24 100644
--- a/lib/librte_eal/include/rte_dev.h
+++ b/lib/librte_eal/include/rte_dev.h
@@ -74,9 +74,13 @@  enum rte_dev_policy {
 	RTE_DEV_BLOCKED,
 };
 
-/* Backwards compatiablity will be deprecated */
-#define RTE_DEV_WHITELISTED RTE_DEV_ALLOWED
-#define RTE_DEV_BLACKLISTED RTE_DEV_BLOCKED
+#define RTE_DEV_WHITELISTED \
+	_Pragma("GCC warning \"'RTE_DEV_WHITELISTED' macro is deprecated.\"") \
+	RTE_DEV_ALLOWED
+
+#define RTE_DEV_BLACKLISTED \
+	_Pragma("GCC warning \"'RTE_DEV_BLACKLISTED' macro is deprecated.\"") \
+	RTE_DEV_BLOCKED
 
 /**
  * A generic memory resource representation.
diff --git a/lib/librte_eal/include/rte_devargs.h b/lib/librte_eal/include/rte_devargs.h
index e1a4277ff167..535bff9a14fb 100644
--- a/lib/librte_eal/include/rte_devargs.h
+++ b/lib/librte_eal/include/rte_devargs.h
@@ -34,9 +34,13 @@  enum rte_devtype {
 	RTE_DEVTYPE_VIRTUAL,
 };
 
-/* Backwards compatiablity will be removed later */
-#define RTE_DEVTYPE_WHITELISTED_PCI RTE_DEVTYPE_ALLOWED_PCI
-#define RTE_DEVTYPE_BLACKLISTED_PCI RTE_DEVTYPE_BLOCKED_PCI
+#define RTE_DEVTYPE_WHITELISTED_PCI \
+	_Pragma("GCC warning \"'RTE_DEVTYPE_WHITELISTED_PCI' macro is deprecated.\"") \
+	RTE_DEVTYPE_ALLOWED_PCI
+
+#define RTE_DEVTYPE_BLACKLISTED_PCI \
+	_Pragma("GCC warning \"'RTE_DEVTYPE_BLACKLISTED_PCI' macro is deprecated.\"") \
+	RTE_DEVTYPE_BLOCKED_PCI
 
 /**
  * Structure that stores a device given by the user with its arguments