On Thu, Feb 16, 2017 at 10:18:00AM +0800, Cao jin wrote: > Hi peter > > On 02/14/2017 03:51 PM, Peter Xu wrote: > > When we add PCIe extended capabilities, we should be following the rule > > that we add the head extended cap (at offset 0x100) first, then the rest > > of them. Meanwhile, we are always adding new capability bits at the end > > of the list. Here the "next" looks meaningless in all cases since it > > should always be zero (along with the "header"). > > > > Simplify the function a bit, and it looks more readable now. > > > > See if this suggestion could be incorporated into your patch:) > http://lists.nongnu.org/archive/html/qemu-devel/2017-01/msg01418.html
Sure. But imho that's really trivial and as long as the assertions are working correctly (no matter in which order) I can live with both. :) Anyway, thanks for the pointer! -- peterx