Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andrew Morton and committed by
Dan Williams
f477f5b3 1b6df693

+3 -2
+3 -2
drivers/dma/ioat/dma_v2.c
··· 692 692 /* pass */; 693 693 else 694 694 return NULL; 695 - for (i = 0; i < num_descs; i++) { 695 + i = 0; 696 + do { 696 697 size_t copy = min_t(size_t, len, 1 << ioat->xfercap_log); 697 698 698 699 desc = ioat2_get_ring_ent(ioat, idx + i); ··· 708 707 dst += copy; 709 708 src += copy; 710 709 dump_desc_dbg(ioat, desc); 711 - } 710 + } while (++i < num_descs); 712 711 713 712 desc->txd.flags = flags; 714 713 desc->len = total_len;