mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@vger.kernel.org,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Vinod Koul <vinod.koul@intel.com>
Subject: Re: [PATCH 2/2] dmatest: check for dma mapping error
Date: Thu, 13 Dec 2012 15:34:37 -0800	[thread overview]
Message-ID: <20121213153437.b8b0198d.akpm@linux-foundation.org> (raw)
In-Reply-To: <1355139464-6855-2-git-send-email-andriy.shevchenko@linux.intel.com>

On Mon, 10 Dec 2012 13:37:44 +0200
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> We get a warning if CONFIG_DMA_API_DEBUG=y
> 
> [   28.150631] WARNING: at lib/dma-debug.c:933 check_unmap+0x5d6/0x6ac()
> [   28.157058] dw_dmac dw_dmac.0: DMA-API: device driver failed to check map error[device address=0x0000000035698305] [size=14365 bytes] [mapped as single]
> 
> ...
>
> --- a/drivers/dma/dmatest.c
> +++ b/drivers/dma/dmatest.c
> @@ -378,15 +378,35 @@ static int dmatest_func(void *data)
>  
>  			dma_srcs[i] = dma_map_single(dev->dev, buf, len,
>  						     DMA_TO_DEVICE);
> +			ret = dma_mapping_error(dev->dev, dma_srcs[i]);
> +			if (ret) {
> +				unmap_src(dev->dev, dma_srcs, len, i);
> +				pr_warn("%s: #%u: mapping error %d with "
> +					"src_off=0x%x len=0x%x\n",
> +					thread_name, total_tests - 1, ret,
> +					src_off, len);
> +				failed_tests++;
> +				continue;
> +			}

The changelog and the code don't match.  Which one is out of date?

  parent reply	other threads:[~2012-12-13 23:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-10 11:37 [PATCH 1/2] dmatest: implement two helpers to unmap dma memory Andy Shevchenko
2012-12-10 11:37 ` [PATCH 2/2] dmatest: check for dma mapping error Andy Shevchenko
2012-12-10 14:46   ` Viresh Kumar
2012-12-13 23:34   ` Andrew Morton [this message]
2012-12-14  7:06     ` Andy Shevchenko
2012-12-14  8:33       ` Andrew Morton
2012-12-14  9:19         ` Andy Shevchenko
2012-12-10 14:38 ` [PATCH 1/2] dmatest: implement two helpers to unmap dma memory Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121213153437.b8b0198d.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vinod.koul@intel.com \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome