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 A7C3BA00BE; Fri, 12 Jun 2020 02:22:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1BED15B3C; Fri, 12 Jun 2020 02:21:07 +0200 (CEST) Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id 02D282C38 for ; Fri, 12 Jun 2020 02:21:02 +0200 (CEST) Received: by mail-pf1-f194.google.com with SMTP id a127so3422794pfa.12 for ; Thu, 11 Jun 2020 17:21:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eNIUN6IJe4EtoB9Jci8gcZXywLkvX82UeHltNcXgvtY=; b=AZHQ0bbA4Vl8xJHeUpPDNU7WJurXMzDSgVBNV6PvcJpMzicHF0yw/q0iI3E7j7kDkF A6E9GS24eyT0INRFlm/3xWSH3L6qgY/iJsg0W3kzHdCew79+6e2LJ7Pyi0WdnMMdHlSE cQ0vCj17HGwfXYOkVijGdh33wqLvfb2EfvupmpWu5KCPGENGnJ04JP69QUA4OMIK3LM4 znvLTmPOmVh110zI+3bOd4ccgqz+sg47e3uxM3/S4gmhTXcEk3rU3kwT4te5rCWptyy3 ZpBnNo3aHWiphKm/UUf5E8pS11KCybAftHlUElEAVO7YD7VXIP4+vDy9DpDtgPs50NhY +/8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eNIUN6IJe4EtoB9Jci8gcZXywLkvX82UeHltNcXgvtY=; b=lWh9oUi14l15Ql0uTrVSCF6/ktfWDv8I8xzTPwnejTYPGq3bCd3uiLHyO99ADEOCZ9 FBZZJOq87XubqeCbpS1LFBQyloPC69X9PkJLjWi6iftPmHspiheZA7Rb5Cci+DXkmXmS UVvAh6Zvnk74S354uiXFgBmIq8INEpxy8QjY7Ki0UyVdS7JNUQuCzht8X7hlO8SbfhP6 VlvjMuVETxVvUFUJzJ2GYSKV5bZR4DiIBpMntI5+SvH8GsqcwzzPRgBUrcnwoGvWEmKw 6eTbFuki5dCJQezGwYmiWQXgLOf/fTUlVBd9luc105cB9WiCwR5N6hI+JyvMEGqeMAgp H1OQ== X-Gm-Message-State: AOAM531S8QR9FPaDc+6Lv3KsoP/j0z+VclqrN1qRgYneBmVwnbxrdVTE CDzJFQ5Jko6aQy19dT+jWEY0EtcewUs= X-Google-Smtp-Source: ABdhPJwd/7JokSC9N0Np/YF/aE2IWIxzmY9GShcsFLUaHRrzFav9rJSZ9kvpxnDNAeJIopo9N/QM/w== X-Received: by 2002:aa7:9a91:: with SMTP id w17mr9878701pfi.199.1591921261722; Thu, 11 Jun 2020 17:21:01 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id l63sm4395273pfd.122.2020.06.11.17.21.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 17:21:00 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Thu, 11 Jun 2020 17:20:39 -0700 Message-Id: <20200612002039.17450-11-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200612002039.17450-1-stephen@networkplumber.org> References: <20200612002039.17450-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 10/10] eal: mark old macros for blacklist/whitelist as deprecated X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use of these macros in applications should cause a deprecation warning. This patch causes a false positive in checkpatch. Signed-off-by: Stephen Hemminger --- 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