From ac4faf6b8e25308efd3027ff258e9d522709b79f Mon Sep 17 00:00:00 2001 From: Madalin Bucur Date: Thu, 1 Aug 2013 17:22:04 +0300 Subject: dpa_eth: fix function type The wrong return type of dpa_bp_priv_seed() caused a crash on the termination optimized driver flavor. Signed-off-by: Madalin Bucur Change-Id: I22cec61c063a901a4d8fd40653fb4fe2cba31435 Reviewed-on: http://git.am.freescale.net:8181/3696 Reviewed-by: Sovaiala Cristian-Constantin-B39531 Tested-by: Review Code-CDREVIEW Reviewed-by: Radulescu Ruxandra Ioana-B05472 Reviewed-by: Hamciuc Bogdan-BHAMCIU1 Reviewed-by: Rivera Jose-B46482 Reviewed-on: http://git.am.freescale.net:8181/4457 Reviewed-by: Rivera Jose-B46482 diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth.h b/drivers/net/ethernet/freescale/dpa/dpaa_eth.h index 4f743c3..a677af2 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth.h +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth.h @@ -475,7 +475,7 @@ struct fm_port_fqs { }; /* functions with different implementation for SG and non-SG: */ -void dpa_bp_priv_seed(struct dpa_bp *dpa_bp); +int dpa_bp_priv_seed(struct dpa_bp *dpa_bp); int dpaa_eth_refill_bpools(struct dpa_percpu_priv_s *percpu_priv); void __hot _dpa_rx(struct net_device *net_dev, const struct dpa_priv_s *priv, diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_non_sg.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_non_sg.c index 428553a..3bcb5b3 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_non_sg.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_non_sg.c @@ -132,7 +132,7 @@ uint32_t dpa_bp_default_buf_size_get(void) return default_buf_size; } -void dpa_bp_priv_seed(struct dpa_bp *dpa_bp) +int dpa_bp_priv_seed(struct dpa_bp *dpa_bp) { int i; dpa_bp->size = default_buf_size; @@ -144,6 +144,7 @@ void dpa_bp_priv_seed(struct dpa_bp *dpa_bp) for (j = 0; j < dpa_bp->target_count; j += 8) dpa_bp_add_8(dpa_bp, i); } + return 0; } void dpa_bp_priv_non_sg_seed(struct dpa_bp *dpa_bp) diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c index a593882..1114940 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c @@ -132,7 +132,7 @@ void dpa_bp_add_8_bufs(const struct dpa_bp *dpa_bp, int cpu) *count_ptr += _dpa_bp_add_8_bufs(dpa_bp); } -void dpa_bp_priv_seed(struct dpa_bp *dpa_bp) +int dpa_bp_priv_seed(struct dpa_bp *dpa_bp) { int i; @@ -147,6 +147,7 @@ void dpa_bp_priv_seed(struct dpa_bp *dpa_bp) for (j = 0; j < dpa_bp->config_count; j += 8) dpa_bp_add_8_bufs(dpa_bp, i); } + return 0; } /* -- cgit v0.10.2