Skip to content

Commit

Permalink
drivers/dma/ioat/dma_v2.c: fix warnings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Morton authored and Dan Williams committed Sep 21, 2009
1 parent 1b6df69 commit f477f5b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/dma/ioat/dma_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,8 @@ ioat2_dma_prep_memcpy_lock(struct dma_chan *c, dma_addr_t dma_dest,
/* pass */;
else
return NULL;
for (i = 0; i < num_descs; i++) {
i = 0;
do {
size_t copy = min_t(size_t, len, 1 << ioat->xfercap_log);

desc = ioat2_get_ring_ent(ioat, idx + i);
Expand All @@ -707,7 +708,7 @@ ioat2_dma_prep_memcpy_lock(struct dma_chan *c, dma_addr_t dma_dest,
dst += copy;
src += copy;
dump_desc_dbg(ioat, desc);
}
} while (++i < num_descs);

desc->txd.flags = flags;
desc->len = total_len;
Expand Down

0 comments on commit f477f5b

Please sign in to comment.