From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [dpdk-dev] [PATCH v2 10/10] eal: mark old macros for blacklist/whitelist as deprecated
Date: Thu, 11 Jun 2020 17:20:39 -0700 [thread overview]
Message-ID: <20200612002039.17450-11-stephen@networkplumber.org> (raw)
In-Reply-To: <20200612002039.17450-1-stephen@networkplumber.org>
Use of these macros in applications should cause a deprecation warning.
This patch causes a false positive in checkpatch.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/librte_eal/include/rte_bus.h | 10 +++++++---
lib/librte_eal/include/rte_dev.h | 10 +++++++---
lib/librte_eal/include/rte_devargs.h | 10 +++++++---
3 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/lib/librte_eal/include/rte_bus.h b/lib/librte_eal/include/rte_bus.h
index 463f0224ff2b..b1a0ac554d83 100644
--- a/lib/librte_eal/include/rte_bus.h
+++ b/lib/librte_eal/include/rte_bus.h
@@ -219,9 +219,13 @@ enum rte_bus_scan_mode {
RTE_BUS_SCAN_BLOCKLIST,
};
-/* Backwards compatiablity 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
--
2.26.2
next prev parent reply other threads:[~2020-06-12 0:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-12 0:20 [dpdk-dev] [PATCH v2 00/10] Rename blacklsit/whitelist to block/allow list Stephen Hemminger
2020-06-12 0:20 ` [dpdk-dev] [PATCH v2 01/10] rte_ethdev: change comment to rte_dev_eth_mac_addr_add Stephen Hemminger
2020-06-12 0:20 ` [dpdk-dev] [PATCH v2 02/10] mk: replace reference to blacklist/whitelist Stephen Hemminger
2020-06-12 0:20 ` [dpdk-dev] [PATCH v2 03/10] check_maintainers: change variable names Stephen Hemminger
2020-06-12 0:20 ` [dpdk-dev] [PATCH v2 04/10] eal: replace usage of blacklist/whitelist in enum Stephen Hemminger
2020-06-12 9:28 ` Gaëtan Rivet
2020-06-12 0:20 ` [dpdk-dev] [PATCH v2 05/10] drivers: replace references to blacklist Stephen Hemminger
2020-06-12 9:33 ` Gaëtan Rivet
2020-06-12 0:20 ` [dpdk-dev] [PATCH v2 06/10] eal: replace pci-whitelist/pci-blacklist options Stephen Hemminger
2020-06-12 0:20 ` [dpdk-dev] [PATCH v2 07/10] doc: replace references to blacklist/whitelist Stephen Hemminger
2020-06-12 0:20 ` [dpdk-dev] [PATCH v2 08/10] app/test: use new allowlist and blocklist Stephen Hemminger
2020-06-12 0:20 ` [dpdk-dev] [PATCH v2 09/10] doc: add note about blacklist/whitelist changes Stephen Hemminger
2020-06-12 0:20 ` Stephen Hemminger [this message]
2020-06-12 8:09 ` [dpdk-dev] [PATCH v2 00/10] Rename blacklsit/whitelist to block/allow list Luca Boccassi
-- strict thread matches above, loose matches on Subject: below --
2020-06-07 17:01 [dpdk-dev] [PATCH 0/9] Rename blacklist/whitelist to blocklist/allowlist Stephen Hemminger
2020-06-08 19:25 ` [dpdk-dev] [PATCH v2 00/10] Rename blacklist/whitelist to Stephen Hemminger
2020-06-08 19:25 ` [dpdk-dev] [PATCH v2 10/10] eal: mark old macros for blacklist/whitelist as deprecated Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200612002039.17450-11-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).