Re: [PATCH v2 2/6] drm/i915: Cache last cmd descriptor when parsing

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

 



On Fri, Nov 20, 2015 at 05:08:06PM +0200, Ville Syrjälä wrote:
> On Fri, Nov 20, 2015 at 10:55:57AM +0000, Chris Wilson wrote:
> > +				desc = find_cmd_in_table(ring, *cmd);
> > +				if (desc) {
> > +					if (unlikely(desc->flags & CMD_DESC_REJECT)) {
> > +						DRM_DEBUG_DRIVER("CMD: Rejected command: 0x%08X\n", *cmd);
> > +						goto unmap;
> > +					}
> 
> Yikes. More indenttion. It's getting really deep here. Any sane way to
> reduce it?

Moving the parsing out to a helper and some of the state to an on-stack
struct and then let gcc fold it back in. I was being lazy, just letting
vim reindent the block is far easier!
-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