From: Vinod Koul <vinod.koul@intel.com>
To: Matthias Kaehlcke <mka@chromium.org>
Cc: Dan Williams <dan.j.williams@intel.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
Grant Grundler <grundler@chromium.org>
Subject: Re: [PATCH] dma-engine: Fix array index out of bounds warning in __get_unmap_pool()
Date: Tue, 14 Mar 2017 10:13:20 +0530 [thread overview]
Message-ID: <20170314044320.GF2843@localhost> (raw)
In-Reply-To: <20170313213029.98374-1-mka@chromium.org>
On Mon, Mar 13, 2017 at 02:30:29PM -0700, Matthias Kaehlcke wrote:
> This fixes the following warning when building with clang and
> CONFIG_DMA_ENGINE_RAID=n :
>
> drivers/dma/dmaengine.c:1102:11: error: array index 2 is past the end of the array (which contains 1 element) [-Werror,-Warray-bounds]
> return &unmap_pool[2];
> ^ ~
> drivers/dma/dmaengine.c:1083:1: note: array 'unmap_pool' declared here
> static struct dmaengine_unmap_pool unmap_pool[] = {
> ^
> drivers/dma/dmaengine.c:1104:11: error: array index 3 is past the end of the array (which contains 1 element) [-Werror,-Warray-bounds]
> return &unmap_pool[3];
> ^ ~
> drivers/dma/dmaengine.c:1083:1: note: array 'unmap_pool' declared here
> static struct dmaengine_unmap_pool unmap_pool[] = {
Applied, thanks
--
~Vinod
prev parent reply other threads:[~2017-03-14 4:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 21:30 [PATCH] dma-engine: Fix array index out of bounds warning in __get_unmap_pool() Matthias Kaehlcke
2017-03-13 21:52 ` Dan Williams
2017-03-14 4:43 ` Vinod Koul [this message]
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=20170314044320.GF2843@localhost \
--to=vinod.koul@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=grundler@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mka@chromium.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;
as well as URLs for NNTP newsgroup(s).