diff mbox

[PATCHv2,1/2] dmaengine: dw: Make error prints unique. Part #1

Message ID 1425980244-22005-1-git-send-email-jarkko.nikula@linux.intel.com (mailing list archive)
State Accepted
Headers show

Commit Message

Jarkko Nikula March 10, 2015, 9:37 a.m. UTC
The same error message is printed from different functions. Add a function
name to error message in order to make it easier to grep error from sources.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
 drivers/dma/dw/core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Viresh Kumar March 10, 2015, 9:45 a.m. UTC | #1
This Part #1/2 stuff was awkward, you don't need it :)

On Tue, Mar 10, 2015 at 3:07 PM, Jarkko Nikula
<jarkko.nikula@linux.intel.com> wrote:
> The same error message is printed from different functions. Add a function
> name to error message in order to make it easier to grep error from sources.
>
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> ---
>  drivers/dma/dw/core.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c
> index a8ad05291b27..29cbd8989c95 100644
> --- a/drivers/dma/dw/core.c
> +++ b/drivers/dma/dw/core.c
> @@ -230,7 +230,8 @@ static void dwc_dostart(struct dw_dma_chan *dwc, struct dw_desc *first)
>         /* ASSERT:  channel is idle */
>         if (dma_readl(dw, CH_EN) & dwc->mask) {
>                 dev_err(chan2dev(&dwc->chan),
> -                       "BUG: Attempted to start non-idle channel\n");
> +                       "%s: BUG: Attempted to start non-idle channel\n",
> +                       __func__);
>                 dwc_dump_chan_regs(dwc);
>
>                 /* The tasklet will hopefully advance the queue... */
> @@ -1261,7 +1262,8 @@ int dw_dma_cyclic_start(struct dma_chan *chan)
>         /* Assert channel is idle */
>         if (dma_readl(dw, CH_EN) & dwc->mask) {
>                 dev_err(chan2dev(&dwc->chan),
> -                       "BUG: Attempted to start non-idle channel\n");
> +                       "%s: BUG: Attempted to start non-idle channel\n",
> +                       __func__);
>                 dwc_dump_chan_regs(dwc);
>                 spin_unlock_irqrestore(&dwc->lock, flags);
>                 return -EBUSY;

For both patches,

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vinod Koul March 16, 2015, 4:41 p.m. UTC | #2
On Tue, Mar 10, 2015 at 11:37:23AM +0200, Jarkko Nikula wrote:
> The same error message is printed from different functions. Add a function
> name to error message in order to make it easier to grep error from sources.
> 
Applied, both

Thanks
diff mbox

Patch

diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c
index a8ad05291b27..29cbd8989c95 100644
--- a/drivers/dma/dw/core.c
+++ b/drivers/dma/dw/core.c
@@ -230,7 +230,8 @@  static void dwc_dostart(struct dw_dma_chan *dwc, struct dw_desc *first)
 	/* ASSERT:  channel is idle */
 	if (dma_readl(dw, CH_EN) & dwc->mask) {
 		dev_err(chan2dev(&dwc->chan),
-			"BUG: Attempted to start non-idle channel\n");
+			"%s: BUG: Attempted to start non-idle channel\n",
+			__func__);
 		dwc_dump_chan_regs(dwc);
 
 		/* The tasklet will hopefully advance the queue... */
@@ -1261,7 +1262,8 @@  int dw_dma_cyclic_start(struct dma_chan *chan)
 	/* Assert channel is idle */
 	if (dma_readl(dw, CH_EN) & dwc->mask) {
 		dev_err(chan2dev(&dwc->chan),
-			"BUG: Attempted to start non-idle channel\n");
+			"%s: BUG: Attempted to start non-idle channel\n",
+			__func__);
 		dwc_dump_chan_regs(dwc);
 		spin_unlock_irqrestore(&dwc->lock, flags);
 		return -EBUSY;