Re: [PATCH 19/26] drm/i915: Consolidate dma mappings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 17, 2014 at 10:48:51PM -0700, Ben Widawsky wrote:
> With a little bit of macro magic, and the fact that every page
> table/dir/etc. we wish to map will have a page, and daddr member, we can
> greatly simplify and reduce code.
> 
> The patch introduces an i915_dma_map/unmap which has the same semantics
> as pci_map_page, but is 1 line, and doesn't require newlines, or local
> variables to make it fit cleanly.
> 
> Notice that even the page allocation shares this same attribute. For
> now, I am leaving that code untouched because the macro version would be
> a bit on the big side - but it's a nice cleanup as well (IMO)

Doesn't this make the error unwinding very fragile and likely to unmap a
pci_dma_mapping_error() cookie rather than the dma_addr_t?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux