From: Vinod Koul <vinod.koul@intel.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Dan Williams <dan.j.williams@intel.com>,
Peter Ujfalusi <peter.ujfalusi@ti.com>,
Tony Lindgren <tony@atomide.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] edma: avoid uninitialized variable use
Date: Fri, 30 Sep 2016 23:17:18 +0530 [thread overview]
Message-ID: <20160930174718.GV2467@localhost> (raw)
In-Reply-To: <20160930161909.120176-1-arnd@arndb.de>
On Fri, Sep 30, 2016 at 06:19:01PM +0200, Arnd Bergmann wrote:
> If edma_read_slot() gets an invalid argument, it does not set a result,
> as found by "gcc -Wmaybe-uninitialized"
>
> drivers/dma/edma.c: In function 'dma_ccerr_handler':
> drivers/dma/edma.c:1499:21: error: 'p.a_b_cnt' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> drivers/dma/edma.c:1499:21: error: 'p.ccnt' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> if (p.a_b_cnt == 0 && p.ccnt == 0) {
>
> If we change the function to return an error in this case, we can handle
> the failure more gracefully and treat this the same way as a null slot
> that we already catch.
Applied. Fixes subsystem tag
Thanks
--
~Vinod
prev parent reply other threads:[~2016-09-30 17:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-30 16:19 [PATCH] edma: avoid uninitialized variable use Arnd Bergmann
2016-09-30 17:47 ` 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=20160930174718.GV2467@localhost \
--to=vinod.koul@intel.com \
--cc=arnd@arndb.de \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.ujfalusi@ti.com \
--cc=tony@atomide.com \
/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.