[v2,11/16] bus/dpaa: cleanup unnecessary global variables
Checks
Commit Message
Changes originally in the patch
"drivers: cleanup unnecessary global variables" by Pavan.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
drivers/bus/dpaa/base/fman/netcfg_layer.c | 5 -----
drivers/bus/dpaa/base/qbman/bman_driver.c | 4 ++--
drivers/bus/dpaa/base/qbman/qman.c | 2 +-
drivers/bus/dpaa/base/qbman/qman_driver.c | 4 ++--
drivers/bus/dpaa/base/qbman/qman_priv.h | 1 -
drivers/bus/dpaa/dpaa_bus.c | 2 +-
6 files changed, 6 insertions(+), 12 deletions(-)
Comments
On Wednesday 04 July 2018 03:13 PM, Hemant Agrawal wrote:
> Changes originally in the patch
> "drivers: cleanup unnecessary global variables" by Pavan.
The commit message above is not required. It doesn't add much value to
the patch itself.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
[...]
@@ -18,11 +18,6 @@
#include <rte_dpaa_logs.h>
#include <netcfg.h>
-/* Structure contains information about all the interfaces given by user
- * on command line.
- */
-struct netcfg_interface *netcfg_interface;
-
/* This data structure contaings all configurations information
* related to usages of DPA devices.
*/
@@ -15,9 +15,9 @@
/*
* Global variables of the max portal/pool number this bman version supported
*/
-u16 bman_ip_rev;
+static u16 bman_ip_rev;
u16 bman_pool_max;
-void *bman_ccsr_map;
+static void *bman_ccsr_map;
/*****************/
/* Portal driver */
@@ -625,7 +625,7 @@ struct qman_portal *qman_create_portal(
#define MAX_GLOBAL_PORTALS 8
static struct qman_portal global_portals[MAX_GLOBAL_PORTALS];
-rte_atomic16_t global_portals_used[MAX_GLOBAL_PORTALS];
+static rte_atomic16_t global_portals_used[MAX_GLOBAL_PORTALS];
static struct qman_portal *
qman_alloc_global_portal(void)
@@ -20,9 +20,9 @@ u16 qm_channel_caam = QMAN_CHANNEL_CAAM;
u16 qm_channel_pme = QMAN_CHANNEL_PME;
/* Ccsr map address to access ccsrbased register */
-void *qman_ccsr_map;
+static void *qman_ccsr_map;
/* The qman clock frequency */
-u32 qman_clk;
+static u32 qman_clk;
static __thread int qmfd = -1;
static __thread struct qm_portal_config qpcfg;
@@ -139,7 +139,6 @@ struct qm_portal_config {
#define QMAN_REV31 0x0301
#define QMAN_REV32 0x0302
extern u16 qman_ip_rev; /* 0 if uninitialised, otherwise QMAN_REVx */
-extern u32 qman_clk;
int qm_set_wpm(int wpm);
int qm_get_wpm(int *wpm);
@@ -50,7 +50,7 @@ struct rte_dpaa_bus rte_dpaa_bus;
struct netcfg_info *dpaa_netcfg;
/* define a variable to hold the portal_key, once created.*/
-pthread_key_t dpaa_portal_key;
+static pthread_key_t dpaa_portal_key;
unsigned int dpaa_svr_family;