devargs: rename enum items with singular form
authorThomas Monjalon <thomas@monjalon.net>
Wed, 3 Oct 2018 12:55:11 +0000 (14:55 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 11 Oct 2018 11:57:29 +0000 (13:57 +0200)
The enum names are *_params (plural form).
And the items are also using the plural form: *_PARAMS_*.
It looks more natural to use the singular form *_PARAM_* for items.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
drivers/bus/pci/pci_params.c
drivers/bus/vdev/vdev_params.c
lib/librte_ethdev/rte_class_eth.c

index 77b722b..3192e9c 100644 (file)
 #include "private.h"
 
 enum pci_params {
-       RTE_PCI_PARAMS_ADDR,
-       RTE_PCI_PARAMS_MAX,
+       RTE_PCI_PARAM_ADDR,
+       RTE_PCI_PARAM_MAX,
 };
 
 static const char * const pci_params_keys[] = {
-       [RTE_PCI_PARAMS_ADDR] = "addr",
-       [RTE_PCI_PARAMS_MAX] = NULL,
+       [RTE_PCI_PARAM_ADDR] = "addr",
+       [RTE_PCI_PARAM_MAX] = NULL,
 };
 
 static int
@@ -47,7 +47,7 @@ pci_dev_match(const struct rte_device *dev,
                return 0;
        pdev = RTE_DEV_TO_PCI_CONST(dev);
        /* if any field does not match. */
-       if (rte_kvargs_process(kvlist, pci_params_keys[RTE_PCI_PARAMS_ADDR],
+       if (rte_kvargs_process(kvlist, pci_params_keys[RTE_PCI_PARAM_ADDR],
                               &pci_addr_kv_cmp,
                               (void *)(intptr_t)&pdev->addr))
                return 1;
index 842a468..da270f2 100644 (file)
 #include "vdev_private.h"
 
 enum vdev_params {
-       RTE_VDEV_PARAMS_MAX,
+       RTE_VDEV_PARAM_MAX,
 };
 
 static const char * const vdev_params_keys[] = {
-       [RTE_VDEV_PARAMS_MAX] = NULL,
+       [RTE_VDEV_PARAM_MAX] = NULL,
 };
 
 static int
index b6557db..84b6462 100644 (file)
 #include "ethdev_private.h"
 
 enum eth_params {
-       RTE_ETH_PARAMS_MAX,
+       RTE_ETH_PARAM_MAX,
 };
 
 static const char * const eth_params_keys[] = {
-       [RTE_ETH_PARAMS_MAX] = NULL,
+       [RTE_ETH_PARAM_MAX] = NULL,
 };
 
 struct eth_dev_match_arg {