create_device() and get_device_id() are global symbols with no driver prefix, so they can clash with another driver when DPDK is linked statically. The rest of the low-level fmlib code already uses fm_.
Rename them to fm_create_device() and fm_get_device_id(). Signed-off-by: Hemant Agrawal <[email protected]> --- drivers/net/dpaa/dpaa_flow.c | 12 ++++++------ drivers/net/dpaa/dpaa_fmc.c | 2 +- drivers/net/dpaa/fmlib/fm_lib.c | 4 ++-- drivers/net/dpaa/fmlib/ncsw_ext.h | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/net/dpaa/dpaa_flow.c b/drivers/net/dpaa/dpaa_flow.c index f21950f64d..3a5ef7f41c 100644 --- a/drivers/net/dpaa/dpaa_flow.c +++ b/drivers/net/dpaa/dpaa_flow.c @@ -87,18 +87,18 @@ static void fm_prev_cleanup(void) } dpaa_intf.port_handle = fm_port_open(&fm_model.fm_port_params[devid]); - dpaa_intf.scheme_handle[0] = create_device(fm_info.pcd_handle, + dpaa_intf.scheme_handle[0] = fm_create_device(fm_info.pcd_handle, fm_model.scheme_devid[devid][0]); dpaa_intf.scheme_count = 1; if (fm_model.scheme_devid[devid][1]) { dpaa_intf.scheme_handle[1] = - create_device(fm_info.pcd_handle, + fm_create_device(fm_info.pcd_handle, fm_model.scheme_devid[devid][1]); if (dpaa_intf.scheme_handle[1]) dpaa_intf.scheme_count++; } - dpaa_intf.netenv_handle = create_device(fm_info.pcd_handle, + dpaa_intf.netenv_handle = fm_create_device(fm_info.pcd_handle, fm_model.netenv_devid[devid]); i++; if (!dpaa_intf.netenv_handle || @@ -598,7 +598,7 @@ static inline int set_default_scheme(struct dpaa_if *dpaa_intf) } fm_model.scheme_devid[dpaa_intf->ifid][idx] = - get_device_id(dpaa_intf->scheme_handle[idx]); + fm_get_device_id(dpaa_intf->scheme_handle[idx]); dpaa_intf->scheme_count++; return 0; } @@ -642,7 +642,7 @@ static inline int set_pcd_netenv_scheme(struct dpaa_if *dpaa_intf, } fm_model.scheme_devid[dpaa_intf->ifid][idx] = - get_device_id(dpaa_intf->scheme_handle[idx]); + fm_get_device_id(dpaa_intf->scheme_handle[idx]); dpaa_intf->scheme_count++; return 0; } @@ -714,7 +714,7 @@ static inline int set_fm_port_handle(struct dpaa_if *dpaa_intf, } fm_model.netenv_devid[dpaa_intf->ifid] = - get_device_id(dpaa_intf->netenv_handle); + fm_get_device_id(dpaa_intf->netenv_handle); return 0; } diff --git a/drivers/net/dpaa/dpaa_fmc.c b/drivers/net/dpaa/dpaa_fmc.c index 7dc42f6e23..e1cbc99c8e 100644 --- a/drivers/net/dpaa/dpaa_fmc.c +++ b/drivers/net/dpaa/dpaa_fmc.c @@ -202,7 +202,7 @@ struct fmc_model_t { (FMC_SCHEMES_NUM + FMC_CC_NODES_NUM)]; }; -struct fmc_model_t *g_fmc_model; +static struct fmc_model_t *g_fmc_model; static int dpaa_port_fmc_port_parse(struct fman_if *fif, diff --git a/drivers/net/dpaa/fmlib/fm_lib.c b/drivers/net/dpaa/fmlib/fm_lib.c index 65a818372e..1130ef3630 100644 --- a/drivers/net/dpaa/fmlib/fm_lib.c +++ b/drivers/net/dpaa/fmlib/fm_lib.c @@ -533,7 +533,7 @@ fm_port_delete_pcd(t_handle h_fm_port) } t_handle -create_device(t_handle h_user_priv, t_handle h_dev_id) +fm_create_device(t_handle h_user_priv, t_handle h_dev_id) { t_device *p_user_priv_dev = (t_device *)h_user_priv; t_device *p_dev = NULL; @@ -555,7 +555,7 @@ create_device(t_handle h_user_priv, t_handle h_dev_id) } t_handle -get_device_id(t_handle h_dev) +fm_get_device_id(t_handle h_dev) { t_device *p_dev = (t_device *)h_dev; diff --git a/drivers/net/dpaa/fmlib/ncsw_ext.h b/drivers/net/dpaa/fmlib/ncsw_ext.h index 1a6e337f49..e6b3145e82 100644 --- a/drivers/net/dpaa/fmlib/ncsw_ext.h +++ b/drivers/net/dpaa/fmlib/ncsw_ext.h @@ -152,7 +152,7 @@ typedef struct t_device { uint32_t owners; } t_device; -t_handle create_device(t_handle h_user_priv, t_handle h_dev_id); -t_handle get_device_id(t_handle h_dev); +t_handle fm_create_device(t_handle h_user_priv, t_handle h_dev_id); +t_handle fm_get_device_id(t_handle h_dev); #endif /* __NCSW_EXT_H */ -- 2.25.1

