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/sun | |
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/sun')
-rw-r--r-- | drivers/net/ethernet/sun/sunbmac.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/sun/sunhme.c | 13 |
2 files changed, 5 insertions, 12 deletions
diff --git a/drivers/net/ethernet/sun/sunbmac.c b/drivers/net/ethernet/sun/sunbmac.c index 5fafca065305..054975939a18 100644 --- a/drivers/net/ethernet/sun/sunbmac.c +++ b/drivers/net/ethernet/sun/sunbmac.c | |||
@@ -1169,10 +1169,8 @@ static int bigmac_ether_init(struct platform_device *op, | |||
1169 | bp->bmac_block = dma_alloc_coherent(&bp->bigmac_op->dev, | 1169 | bp->bmac_block = dma_alloc_coherent(&bp->bigmac_op->dev, |
1170 | PAGE_SIZE, | 1170 | PAGE_SIZE, |
1171 | &bp->bblock_dvma, GFP_ATOMIC); | 1171 | &bp->bblock_dvma, GFP_ATOMIC); |
1172 | if (bp->bmac_block == NULL || bp->bblock_dvma == 0) { | 1172 | if (bp->bmac_block == NULL || bp->bblock_dvma == 0) |
1173 | printk(KERN_ERR "BIGMAC: Cannot allocate consistent DMA.\n"); | ||
1174 | goto fail_and_cleanup; | 1173 | goto fail_and_cleanup; |
1175 | } | ||
1176 | 1174 | ||
1177 | /* Get the board revision of this BigMAC. */ | 1175 | /* Get the board revision of this BigMAC. */ |
1178 | bp->board_rev = of_getintprop_default(bp->bigmac_op->dev.of_node, | 1176 | bp->board_rev = of_getintprop_default(bp->bigmac_op->dev.of_node, |
diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c index a1bff49a8155..436fa9d5a071 100644 --- a/drivers/net/ethernet/sun/sunhme.c +++ b/drivers/net/ethernet/sun/sunhme.c | |||
@@ -2752,10 +2752,8 @@ static int happy_meal_sbus_probe_one(struct platform_device *op, int is_qfe) | |||
2752 | &hp->hblock_dvma, | 2752 | &hp->hblock_dvma, |
2753 | GFP_ATOMIC); | 2753 | GFP_ATOMIC); |
2754 | err = -ENOMEM; | 2754 | err = -ENOMEM; |
2755 | if (!hp->happy_block) { | 2755 | if (!hp->happy_block) |
2756 | printk(KERN_ERR "happymeal: Cannot allocate descriptors.\n"); | ||
2757 | goto err_out_iounmap; | 2756 | goto err_out_iounmap; |
2758 | } | ||
2759 | 2757 | ||
2760 | /* Force check of the link first time we are brought up. */ | 2758 | /* Force check of the link first time we are brought up. */ |
2761 | hp->linkcheck = 0; | 2759 | hp->linkcheck = 0; |
@@ -3068,14 +3066,11 @@ static int happy_meal_pci_probe(struct pci_dev *pdev, | |||
3068 | hp->happy_bursts = DMA_BURSTBITS; | 3066 | hp->happy_bursts = DMA_BURSTBITS; |
3069 | #endif | 3067 | #endif |
3070 | 3068 | ||
3071 | hp->happy_block = (struct hmeal_init_block *) | 3069 | hp->happy_block = dma_alloc_coherent(&pdev->dev, PAGE_SIZE, |
3072 | dma_alloc_coherent(&pdev->dev, PAGE_SIZE, &hp->hblock_dvma, GFP_KERNEL); | 3070 | &hp->hblock_dvma, GFP_KERNEL); |
3073 | |||
3074 | err = -ENODEV; | 3071 | err = -ENODEV; |
3075 | if (!hp->happy_block) { | 3072 | if (!hp->happy_block) |
3076 | printk(KERN_ERR "happymeal(PCI): Cannot get hme init block.\n"); | ||
3077 | goto err_out_iounmap; | 3073 | goto err_out_iounmap; |
3078 | } | ||
3079 | 3074 | ||
3080 | hp->linkcheck = 0; | 3075 | hp->linkcheck = 0; |
3081 | hp->timer_state = asleep; | 3076 | hp->timer_state = asleep; |