diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2009-09-21 12:17:58 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-09-21 12:17:58 -0400 |
commit | f477f5b3316f39c841aa121a219b82b3a56e7da7 (patch) | |
tree | 392476186ece4084f85b3c5227853d92ecae79a6 /drivers/dma | |
parent | 1b6df6930994d5d027375b07ac9da63644eb5758 (diff) |
drivers/dma/ioat/dma_v2.c: fix warnings
drivers/dma/ioat/dma_v2.c: In function 'ioat2_dma_prep_memcpy_lock':
drivers/dma/ioat/dma_v2.c:680: warning: 'hw' may be used uninitialized in this function
drivers/dma/ioat/dma_v2.c:681: warning: 'desc' may be used uninitialized in this function
Cc: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/ioat/dma_v2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/dma/ioat/dma_v2.c b/drivers/dma/ioat/dma_v2.c index 8fd0b59f1902..96ffab7d37a7 100644 --- a/drivers/dma/ioat/dma_v2.c +++ b/drivers/dma/ioat/dma_v2.c | |||
@@ -692,7 +692,8 @@ ioat2_dma_prep_memcpy_lock(struct dma_chan *c, dma_addr_t dma_dest, | |||
692 | /* pass */; | 692 | /* pass */; |
693 | else | 693 | else |
694 | return NULL; | 694 | return NULL; |
695 | for (i = 0; i < num_descs; i++) { | 695 | i = 0; |
696 | do { | ||
696 | size_t copy = min_t(size_t, len, 1 << ioat->xfercap_log); | 697 | size_t copy = min_t(size_t, len, 1 << ioat->xfercap_log); |
697 | 698 | ||
698 | desc = ioat2_get_ring_ent(ioat, idx + i); | 699 | desc = ioat2_get_ring_ent(ioat, idx + i); |
@@ -707,7 +708,7 @@ ioat2_dma_prep_memcpy_lock(struct dma_chan *c, dma_addr_t dma_dest, | |||
707 | dst += copy; | 708 | dst += copy; |
708 | src += copy; | 709 | src += copy; |
709 | dump_desc_dbg(ioat, desc); | 710 | dump_desc_dbg(ioat, desc); |
710 | } | 711 | } while (++i < num_descs); |
711 | 712 | ||
712 | desc->txd.flags = flags; | 713 | desc->txd.flags = flags; |
713 | desc->len = total_len; | 714 | desc->len = total_len; |