diff options
author | Joe Perches <joe@perches.com> | 2013-03-14 09:07:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-15 08:56:58 -0400 |
commit | d0320f750093d012d3ed69fc1e8b385f654523d5 (patch) | |
tree | 1f9c25c892c33275fb85a993e9a274dc5618370b /drivers/net/ethernet/intel | |
parent | 68c45a2da34cb44962c6a48f8e474ec6b7853641 (diff) |
drivers:net: Remove dma_alloc_coherent OOM messages
I believe these error messages are already logged
on allocation failure by warn_alloc_failed and so
get a dump_stack on OOM.
Remove the unnecessary additional error logging.
Around these deletions:
o Alignment neatening.
o Remove unnecessary casts of dma_alloc_coherent.
o Hoist assigns from ifs.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r-- | drivers/net/ethernet/intel/e1000/e1000_main.c | 7 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/ixgb/ixgb_main.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 3 |
3 files changed, 0 insertions, 14 deletions
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c index 8502c625dbef..d98e1d0996d4 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_main.c +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c | |||
@@ -1516,8 +1516,6 @@ static int e1000_setup_tx_resources(struct e1000_adapter *adapter, | |||
1516 | if (!txdr->desc) { | 1516 | if (!txdr->desc) { |
1517 | setup_tx_desc_die: | 1517 | setup_tx_desc_die: |
1518 | vfree(txdr->buffer_info); | 1518 | vfree(txdr->buffer_info); |
1519 | e_err(probe, "Unable to allocate memory for the Tx descriptor " | ||
1520 | "ring\n"); | ||
1521 | return -ENOMEM; | 1519 | return -ENOMEM; |
1522 | } | 1520 | } |
1523 | 1521 | ||
@@ -1707,10 +1705,7 @@ static int e1000_setup_rx_resources(struct e1000_adapter *adapter, | |||
1707 | 1705 | ||
1708 | rxdr->desc = dma_alloc_coherent(&pdev->dev, rxdr->size, &rxdr->dma, | 1706 | rxdr->desc = dma_alloc_coherent(&pdev->dev, rxdr->size, &rxdr->dma, |
1709 | GFP_KERNEL); | 1707 | GFP_KERNEL); |
1710 | |||
1711 | if (!rxdr->desc) { | 1708 | if (!rxdr->desc) { |
1712 | e_err(probe, "Unable to allocate memory for the Rx descriptor " | ||
1713 | "ring\n"); | ||
1714 | setup_rx_desc_die: | 1709 | setup_rx_desc_die: |
1715 | vfree(rxdr->buffer_info); | 1710 | vfree(rxdr->buffer_info); |
1716 | return -ENOMEM; | 1711 | return -ENOMEM; |
@@ -1729,8 +1724,6 @@ setup_rx_desc_die: | |||
1729 | if (!rxdr->desc) { | 1724 | if (!rxdr->desc) { |
1730 | dma_free_coherent(&pdev->dev, rxdr->size, olddesc, | 1725 | dma_free_coherent(&pdev->dev, rxdr->size, olddesc, |
1731 | olddma); | 1726 | olddma); |
1732 | e_err(probe, "Unable to allocate memory for the Rx " | ||
1733 | "descriptor ring\n"); | ||
1734 | goto setup_rx_desc_die; | 1727 | goto setup_rx_desc_die; |
1735 | } | 1728 | } |
1736 | 1729 | ||
diff --git a/drivers/net/ethernet/intel/ixgb/ixgb_main.c b/drivers/net/ethernet/intel/ixgb/ixgb_main.c index ea4808373435..e23f0234cb27 100644 --- a/drivers/net/ethernet/intel/ixgb/ixgb_main.c +++ b/drivers/net/ethernet/intel/ixgb/ixgb_main.c | |||
@@ -720,8 +720,6 @@ ixgb_setup_tx_resources(struct ixgb_adapter *adapter) | |||
720 | GFP_KERNEL); | 720 | GFP_KERNEL); |
721 | if (!txdr->desc) { | 721 | if (!txdr->desc) { |
722 | vfree(txdr->buffer_info); | 722 | vfree(txdr->buffer_info); |
723 | netif_err(adapter, probe, adapter->netdev, | ||
724 | "Unable to allocate transmit descriptor memory\n"); | ||
725 | return -ENOMEM; | 723 | return -ENOMEM; |
726 | } | 724 | } |
727 | memset(txdr->desc, 0, txdr->size); | 725 | memset(txdr->desc, 0, txdr->size); |
@@ -807,8 +805,6 @@ ixgb_setup_rx_resources(struct ixgb_adapter *adapter) | |||
807 | 805 | ||
808 | if (!rxdr->desc) { | 806 | if (!rxdr->desc) { |
809 | vfree(rxdr->buffer_info); | 807 | vfree(rxdr->buffer_info); |
810 | netif_err(adapter, probe, adapter->netdev, | ||
811 | "Unable to allocate receive descriptors\n"); | ||
812 | return -ENOMEM; | 808 | return -ENOMEM; |
813 | } | 809 | } |
814 | memset(rxdr->desc, 0, rxdr->size); | 810 | memset(rxdr->desc, 0, rxdr->size); |
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index 2635b8303515..ac0c315659de 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | |||
@@ -2423,9 +2423,6 @@ int ixgbevf_setup_rx_resources(struct ixgbevf_adapter *adapter, | |||
2423 | &rx_ring->dma, GFP_KERNEL); | 2423 | &rx_ring->dma, GFP_KERNEL); |
2424 | 2424 | ||
2425 | if (!rx_ring->desc) { | 2425 | if (!rx_ring->desc) { |
2426 | hw_dbg(&adapter->hw, | ||
2427 | "Unable to allocate memory for " | ||
2428 | "the receive descriptor ring\n"); | ||
2429 | vfree(rx_ring->rx_buffer_info); | 2426 | vfree(rx_ring->rx_buffer_info); |
2430 | rx_ring->rx_buffer_info = NULL; | 2427 | rx_ring->rx_buffer_info = NULL; |
2431 | goto alloc_failed; | 2428 | goto alloc_failed; |