diff options
author | Bogdan Hamciuc <bogdan.hamciuc@freescale.com> | 2013-04-05 08:34:58 (GMT) |
---|---|---|
committer | Fleming Andrew-AFLEMING <AFLEMING@freescale.com> | 2013-04-08 23:25:14 (GMT) |
commit | b82fa0cdf48483b3a7182fa2c1f0ef569d442163 (patch) | |
tree | a4e31b7c7a715d8892a78eac974e23a5c48d8b3d /drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c | |
parent | 536b2f172a871f260eeaba0715c9ac9dbc49f9dd (diff) | |
download | linux-fsl-qoriq-b82fa0cdf48483b3a7182fa2c1f0ef569d442163.tar.xz |
dpaa_eth: Use standard printing API
Replace dpaa_eth_*() and cpu_**() macros with standard printing calls.
Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com>
(cherry picked from commit 1dc1a7386b52b0249d6a5396e547119f1a83151f)
Conflicts:
drivers/net/ethernet/freescale/dpa/dpa-ethtool.c
Change-Id: I5fc6cd3532c2fd39e72ac0531a85fdef028bb967
Reviewed-on: http://git.am.freescale.net:8181/1059
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c')
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c index 1acf303..d183503 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c @@ -30,6 +30,10 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#define pr_fmt(fmt) \ + KBUILD_MODNAME ": %s:%hu:%s() " fmt, \ + KBUILD_BASENAME".c", __LINE__, __func__ + #include <linux/init.h> #include <linux/skbuff.h> #include <linux/highmem.h> @@ -76,7 +80,7 @@ static void dpa_bp_add_page(struct dpa_bp *dpa_bp, unsigned long vaddr) addr = dma_map_single(dpa_bp->dev, (void *)vaddr, dpa_bp->size, DMA_BIDIRECTIONAL); if (unlikely(dma_mapping_error(dpa_bp->dev, addr))) { - dpaa_eth_err(dpa_bp->dev, "DMA mapping failed"); + dev_err(dpa_bp->dev, "DMA mapping failed"); return; } @@ -459,7 +463,7 @@ void __hot _dpa_rx(struct net_device *net_dev, if (unlikely(fd_status & FM_FD_STAT_ERRORS) != 0) { if (netif_msg_hw(priv) && net_ratelimit()) - cpu_netdev_warn(net_dev, "FD status = 0x%08x\n", + netdev_warn(net_dev, "FD status = 0x%08x\n", fd_status & FM_FD_STAT_ERRORS); percpu_stats->rx_errors++; @@ -475,7 +479,7 @@ void __hot _dpa_rx(struct net_device *net_dev, DPA_COPIED_HEADERS_SIZE); if (unlikely(skb == NULL)) { if (netif_msg_rx_err(priv) && net_ratelimit()) - cpu_netdev_err(net_dev, + netdev_err(net_dev, "Could not alloc skb\n"); percpu_stats->rx_dropped++; goto _release_frame; @@ -581,7 +585,7 @@ static int __hot skb_to_contig_fd(struct dpa_priv_s *priv, ((char *)skbh) + DPA_TX_PRIV_DATA_SIZE); if (unlikely(err < 0)) { if (netif_msg_tx_err(priv) && net_ratelimit()) - cpu_netdev_err(net_dev, "HW csum error: %d\n", err); + netdev_err(net_dev, "HW csum error: %d\n", err); return err; } @@ -593,7 +597,7 @@ static int __hot skb_to_contig_fd(struct dpa_priv_s *priv, addr = dma_map_single(dpa_bp->dev, skbh, dpa_bp->size, DMA_TO_DEVICE); if (unlikely(dma_mapping_error(dpa_bp->dev, addr))) { if (netif_msg_tx_err(priv) && net_ratelimit()) - cpu_netdev_err(net_dev, "dma_map_single() failed\n"); + netdev_err(net_dev, "dma_map_single() failed\n"); return -EINVAL; } fd->addr_hi = upper_32_bits(addr); @@ -623,7 +627,7 @@ static int __hot skb_to_sg_fd(struct dpa_priv_s *priv, /* get a new page to store the SGTable */ sgt_page = __get_free_page(GFP_ATOMIC); if (unlikely(!sgt_page)) { - dpaa_eth_err(dpa_bp->dev, "__get_free_page() failed\n"); + dev_err(dpa_bp->dev, "__get_free_page() failed\n"); return -ENOMEM; } @@ -637,7 +641,7 @@ static int __hot skb_to_sg_fd(struct dpa_priv_s *priv, (void *)sgt_page + DPA_TX_PRIV_DATA_SIZE); if (unlikely(err < 0)) { if (netif_msg_tx_err(priv) && net_ratelimit()) - cpu_netdev_err(net_dev, "HW csum error: %d\n", err); + netdev_err(net_dev, "HW csum error: %d\n", err); goto csum_failed; } @@ -649,7 +653,7 @@ static int __hot skb_to_sg_fd(struct dpa_priv_s *priv, sgt[0].final = 0; addr = dma_map_single(dpa_bp->dev, skb->data, sgt[0].length, dma_dir); if (unlikely(dma_mapping_error(dpa_bp->dev, addr))) { - dpaa_eth_err(dpa_bp->dev, "DMA mapping failed"); + dev_err(dpa_bp->dev, "DMA mapping failed"); err = -EINVAL; goto sg0_map_failed; @@ -673,7 +677,7 @@ static int __hot skb_to_sg_fd(struct dpa_priv_s *priv, frag->page_offset, dpa_bp->size, dma_dir); if (unlikely(dma_mapping_error(dpa_bp->dev, addr))) { - dpaa_eth_err(dpa_bp->dev, "DMA mapping failed"); + dev_err(dpa_bp->dev, "DMA mapping failed"); err = -EINVAL; goto sg_map_failed; } @@ -694,7 +698,7 @@ static int __hot skb_to_sg_fd(struct dpa_priv_s *priv, addr = dma_map_single(dpa_bp->dev, buffer_start, dpa_bp->size, dma_dir); if (unlikely(dma_mapping_error(dpa_bp->dev, addr))) { - dpaa_eth_err(dpa_bp->dev, "DMA mapping failed"); + dev_err(dpa_bp->dev, "DMA mapping failed"); err = -EINVAL; goto sgt_map_failed; } |