aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2014-04-14 07:42:03 -0400
committerVinod Koul <vinod.koul@intel.com>2014-04-22 12:06:03 -0400
commitc594c8912bd6d0dfa45cc08b58a60dcbb8010ecb (patch)
tree28234c97bb0f27c7629c40f1dbb1466fd1f21212 /drivers/dma
parent2c88ee6b6b9a715f2caba87b7c993ca485f68c0d (diff)
dmaengine: edma: Prefix debug prints where the text were identical in prep callbacks
prep_slave_sg and prep_dma_cyclic callbacks have mostly same failure cases with the same texts printed in case we hit them. It helps when debugging if we know exactly which callback generated the errors. At the same time change the debug level for descriptor allocation failure from dbg to err since all other error cases are dev_err and this failure is similarly fatal as the other ones. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Joel Fernandes <joelf@ti.com> Reviewed-and-Tested-by: Joel Fernandes <joelf@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/edma.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index ce230f8f6d98..571f3b1ef2c2 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -438,14 +438,14 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg(
438 } 438 }
439 439
440 if (dev_width == DMA_SLAVE_BUSWIDTH_UNDEFINED) { 440 if (dev_width == DMA_SLAVE_BUSWIDTH_UNDEFINED) {
441 dev_err(dev, "Undefined slave buswidth\n"); 441 dev_err(dev, "%s: Undefined slave buswidth\n", __func__);
442 return NULL; 442 return NULL;
443 } 443 }
444 444
445 edesc = kzalloc(sizeof(*edesc) + sg_len * 445 edesc = kzalloc(sizeof(*edesc) + sg_len *
446 sizeof(edesc->pset[0]), GFP_ATOMIC); 446 sizeof(edesc->pset[0]), GFP_ATOMIC);
447 if (!edesc) { 447 if (!edesc) {
448 dev_dbg(dev, "Failed to allocate a descriptor\n"); 448 dev_err(dev, "%s: Failed to allocate a descriptor\n", __func__);
449 return NULL; 449 return NULL;
450 } 450 }
451 451
@@ -461,7 +461,8 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg(
461 EDMA_SLOT_ANY); 461 EDMA_SLOT_ANY);
462 if (echan->slot[i] < 0) { 462 if (echan->slot[i] < 0) {
463 kfree(edesc); 463 kfree(edesc);
464 dev_err(dev, "Failed to allocate slot\n"); 464 dev_err(dev, "%s: Failed to allocate slot\n",
465 __func__);
465 return NULL; 466 return NULL;
466 } 467 }
467 } 468 }
@@ -530,7 +531,7 @@ static struct dma_async_tx_descriptor *edma_prep_dma_cyclic(
530 } 531 }
531 532
532 if (dev_width == DMA_SLAVE_BUSWIDTH_UNDEFINED) { 533 if (dev_width == DMA_SLAVE_BUSWIDTH_UNDEFINED) {
533 dev_err(dev, "Undefined slave buswidth\n"); 534 dev_err(dev, "%s: Undefined slave buswidth\n", __func__);
534 return NULL; 535 return NULL;
535 } 536 }
536 537
@@ -555,7 +556,7 @@ static struct dma_async_tx_descriptor *edma_prep_dma_cyclic(
555 edesc = kzalloc(sizeof(*edesc) + nslots * 556 edesc = kzalloc(sizeof(*edesc) + nslots *
556 sizeof(edesc->pset[0]), GFP_ATOMIC); 557 sizeof(edesc->pset[0]), GFP_ATOMIC);
557 if (!edesc) { 558 if (!edesc) {
558 dev_dbg(dev, "Failed to allocate a descriptor\n"); 559 dev_err(dev, "%s: Failed to allocate a descriptor\n", __func__);
559 return NULL; 560 return NULL;
560 } 561 }
561 562
@@ -573,7 +574,8 @@ static struct dma_async_tx_descriptor *edma_prep_dma_cyclic(
573 EDMA_SLOT_ANY); 574 EDMA_SLOT_ANY);
574 if (echan->slot[i] < 0) { 575 if (echan->slot[i] < 0) {
575 kfree(edesc); 576 kfree(edesc);
576 dev_err(dev, "Failed to allocate slot\n"); 577 dev_err(dev, "%s: Failed to allocate slot\n",
578 __func__);
577 return NULL; 579 return NULL;
578 } 580 }
579 } 581 }