summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFerruh Yigit <ferruh.yigit@intel.com>2018-10-28 23:57:38 +0000
committerThomas Monjalon <thomas@monjalon.net>2018-10-29 02:01:08 +0100
commitb74fd6b842b7e41e4ee6a037dd37735aeedd8095 (patch)
treee01d4326124f30290bb5859dc97f55b7a64399f3 /lib
parent3f2ef27972a6f60e4e41aceba1f9b53a553ff065 (diff)
downloaddpdk-b74fd6b842b7e41e4ee6a037dd37735aeedd8095.zip
dpdk-b74fd6b842b7e41e4ee6a037dd37735aeedd8095.tar.gz
dpdk-b74fd6b842b7e41e4ee6a037dd37735aeedd8095.tar.xz
add missing static keyword to globals
Some global variables can indeed be static, add static keyword to them. Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/librte_eal/common/eal_common_bus.c2
-rw-r--r--lib/librte_eal/common/eal_common_class.c2
-rw-r--r--lib/librte_eal/common/eal_common_devargs.c2
-rw-r--r--lib/librte_eal/linuxapp/eal/eal_memalloc.c2
-rw-r--r--lib/librte_ethdev/rte_class_eth.c2
-rw-r--r--lib/librte_ethdev/rte_ethdev.c2
-rw-r--r--lib/librte_eventdev/rte_eventdev.c2
-rw-r--r--lib/librte_net/net_crc_sse.h4
8 files changed, 9 insertions, 9 deletions
diff --git a/lib/librte_eal/common/eal_common_bus.c b/lib/librte_eal/common/eal_common_bus.c
index 62b7318..c8f1901 100644
--- a/lib/librte_eal/common/eal_common_bus.c
+++ b/lib/librte_eal/common/eal_common_bus.c
@@ -41,7 +41,7 @@
#include "eal_private.h"
-struct rte_bus_list rte_bus_list =
+static struct rte_bus_list rte_bus_list =
TAILQ_HEAD_INITIALIZER(rte_bus_list);
void
diff --git a/lib/librte_eal/common/eal_common_class.c b/lib/librte_eal/common/eal_common_class.c
index 404a906..d922266 100644
--- a/lib/librte_eal/common/eal_common_class.c
+++ b/lib/librte_eal/common/eal_common_class.c
@@ -9,7 +9,7 @@
#include <rte_class.h>
#include <rte_debug.h>
-struct rte_class_list rte_class_list =
+static struct rte_class_list rte_class_list =
TAILQ_HEAD_INITIALIZER(rte_class_list);
__rte_experimental void
diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c
index c1b0609..b7b9cb6 100644
--- a/lib/librte_eal/common/eal_common_devargs.c
+++ b/lib/librte_eal/common/eal_common_devargs.c
@@ -25,7 +25,7 @@
TAILQ_HEAD(rte_devargs_list, rte_devargs);
/** Global list of user devices */
-struct rte_devargs_list devargs_list =
+static struct rte_devargs_list devargs_list =
TAILQ_HEAD_INITIALIZER(devargs_list);
static size_t
diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c b/lib/librte_eal/linuxapp/eal/eal_memalloc.c
index f6a0098..48b9c73 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memalloc.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c
@@ -61,7 +61,7 @@ const int anonymous_hugepages_supported =
* and/or memfd with hugetlbfs, so we need to be able to adjust this flag at
* runtime, and fall back to anonymous memory.
*/
-int memfd_create_supported =
+static int memfd_create_supported =
#ifdef MFD_HUGETLB
#define MEMFD_SUPPORTED
1;
diff --git a/lib/librte_ethdev/rte_class_eth.c b/lib/librte_ethdev/rte_class_eth.c
index cebbb64..cb99c92 100644
--- a/lib/librte_ethdev/rte_class_eth.c
+++ b/lib/librte_ethdev/rte_class_eth.c
@@ -166,7 +166,7 @@ eth_dev_iterate(const void *start,
return edev;
}
-struct rte_class rte_class_eth = {
+static struct rte_class rte_class_eth = {
.dev_iterate = eth_dev_iterate,
};
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index b2ac590..9d34813 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -4311,7 +4311,7 @@ enum rte_eth_switch_domain_state {
* RTE_MAX_ETHPORTS elements as there cannot be more active switch domains than
* ethdev ports in a single process.
*/
-struct rte_eth_dev_switch {
+static struct rte_eth_dev_switch {
enum rte_eth_switch_domain_state state;
} rte_eth_switch_domains[RTE_MAX_ETHPORTS];
diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
index 32c5319..e70315e 100644
--- a/lib/librte_eventdev/rte_eventdev.c
+++ b/lib/librte_eventdev/rte_eventdev.c
@@ -35,7 +35,7 @@
#include "rte_eventdev.h"
#include "rte_eventdev_pmd.h"
-struct rte_eventdev rte_event_devices[RTE_EVENT_MAX_DEVS];
+static struct rte_eventdev rte_event_devices[RTE_EVENT_MAX_DEVS];
struct rte_eventdev *rte_eventdevs = &rte_event_devices[0];
diff --git a/lib/librte_net/net_crc_sse.h b/lib/librte_net/net_crc_sse.h
index da81524..1c7b7a5 100644
--- a/lib/librte_net/net_crc_sse.h
+++ b/lib/librte_net/net_crc_sse.h
@@ -21,8 +21,8 @@ struct crc_pclmulqdq_ctx {
__m128i rk7_rk8;
};
-struct crc_pclmulqdq_ctx crc32_eth_pclmulqdq __rte_aligned(16);
-struct crc_pclmulqdq_ctx crc16_ccitt_pclmulqdq __rte_aligned(16);
+static struct crc_pclmulqdq_ctx crc32_eth_pclmulqdq __rte_aligned(16);
+static struct crc_pclmulqdq_ctx crc16_ccitt_pclmulqdq __rte_aligned(16);
/**
* @brief Performs one folding round
*