On Wed, 30 Jan 2019 at 20:03, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> wrote: > > Quoting Matthew Auld (2019-01-30 19:18:25) > > Break on NULL iter.sgp, rather than dmap == 0, on the off chance that we > > have some hypothetical selftest or similar in the future that considers > > dmap = 0 to be perfectly valid. > > 0 == DMA_MAPPING_ERROR Ah, I have DMA_MAPPING_ERROR (~(dma_addr_t)0), and I guess zero is also invalid... > > It wouldn't be a dma iterator at that point. > > for_each_sgt_device_addr, _daddr? Do you mean just rename it to say for_each_sgt_device_addr, or introduce a new helper with that name? So say in ggtt_insert_entries: if (something) for_each_sgt_device_addr() {} else for_each_sgt_dma() {} ? _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx