From: vinod.koul@intel.com (Vinod Koul)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] dma: xilinx-vdma: add some sanity checks
Date: Mon, 13 Jun 2016 22:32:29 +0530 [thread overview]
Message-ID: <20160613170229.GJ16910@localhost> (raw)
In-Reply-To: <1465830523-2484498-1-git-send-email-arnd@arndb.de>
On Mon, Jun 13, 2016 at 05:07:33PM +0200, Arnd Bergmann wrote:
> The newly added xilinx_dma_prep_dma_cyclic function sometimes causes
> a gcc warning about the use of the segment function in case
> we never run into the inner loop of the function:
>
> dma/xilinx/xilinx_vdma.c: In function 'xilinx_dma_prep_dma_cyclic':
> dma/xilinx/xilinx_vdma.c:1808:23: error: 'segment' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> segment->hw.control |= XILINX_DMA_BD_SOP;
>
> This can only happen if the period len is zero (which would cause other
> problems earlier), or if the buffer is shorter than a period. Neither
> of them should ever happen, but by adding an explicit check for these two
> cases, we can abort in a more controlled way, and the compiler is
> able to see that we never use uninitialized data.
Applied after fixing subsystem name
Thanks
--
~Vinod
WARNING: multiple messages have this Message-ID (diff)
From: Vinod Koul <vinod.koul@intel.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Dan Williams" <dan.j.williams@intel.com>,
"Michal Simek" <michal.simek@xilinx.com>,
"Sören Brinkmann" <soren.brinkmann@xilinx.com>,
"Kedareswara rao Appana" <appana.durga.rao@xilinx.com>,
"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dma: xilinx-vdma: add some sanity checks
Date: Mon, 13 Jun 2016 22:32:29 +0530 [thread overview]
Message-ID: <20160613170229.GJ16910@localhost> (raw)
In-Reply-To: <1465830523-2484498-1-git-send-email-arnd@arndb.de>
On Mon, Jun 13, 2016 at 05:07:33PM +0200, Arnd Bergmann wrote:
> The newly added xilinx_dma_prep_dma_cyclic function sometimes causes
> a gcc warning about the use of the segment function in case
> we never run into the inner loop of the function:
>
> dma/xilinx/xilinx_vdma.c: In function 'xilinx_dma_prep_dma_cyclic':
> dma/xilinx/xilinx_vdma.c:1808:23: error: 'segment' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> segment->hw.control |= XILINX_DMA_BD_SOP;
>
> This can only happen if the period len is zero (which would cause other
> problems earlier), or if the buffer is shorter than a period. Neither
> of them should ever happen, but by adding an explicit check for these two
> cases, we can abort in a more controlled way, and the compiler is
> able to see that we never use uninitialized data.
Applied after fixing subsystem name
Thanks
--
~Vinod
next prev parent reply other threads:[~2016-06-13 17:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-13 15:07 [PATCH] dma: xilinx-vdma: add some sanity checks Arnd Bergmann
2016-06-13 15:07 ` Arnd Bergmann
2016-06-13 17:02 ` Vinod Koul [this message]
2016-06-13 17:02 ` Vinod Koul
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=20160613170229.GJ16910@localhost \
--to=vinod.koul@intel.com \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.