Re: [PATCH 09/17] drm/i915: init ring->id early

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

 



On Sat, Dec 14, 2013 at 05:42:42PM -0800, Ben Widawsky wrote:
> On Sat, Dec 14, 2013 at 09:45:34PM +0000, Chris Wilson wrote:
> > On Fri, Dec 13, 2013 at 08:15:57PM -0800, Ben Widawsky wrote:
> > > Having the ring id all set up will allow us to use some macro shortcuts
> > > during ringbuffer init. Admittedly it leaves the code a bit confusing,
> > > having the initialization of the id member in a separate place - but I
> > > think the savings is worth it.
> > 
> > This is not required since the macro could be written more simply as
> > ring[i]->id == i.
> > -Chris
> > 
> 
> It could be written as ring->id = i. Is that what you mean? I didn't
> quite follow the "not required" part.

Afaict this pre-init is only required because the macro you wrote
depends upon ring[n]->id, but the macro can be trivially written not to
use ring[n]->id but n.
-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