On Fri, Feb 14, 2014 at 07:48:18PM +0200, Imre Deak wrote:
> On Fri, 2014-02-14 at 17:35 +0000, Chris Wilson wrote:
> > @@ -382,18 +379,15 @@ void intel_detect_pch(struct drm_device *dev)
> >                             DRM_DEBUG_KMS("Found LynxPoint LP PCH\n");
> >                             WARN_ON(!IS_HASWELL(dev));
> >                             WARN_ON(!IS_ULT(dev));
> > -                   } else {
> > -                           goto check_next;
> > -                   }
> > +                   } else
> > +                           continue;
> > +
> >                     pci_dev_put(pch);
> >                     break;
> 
> Yep, looks better. I would also move the pci_dev_put out of the loop and
> remove the above continue. But it's fine for me either way.

I don't think you can drop the continue without adding breaks to every
branch; one continue won vs remembering to add a break every time.

pci_dev_put(NULL) is safe so you could put it outside the loop, I left
it inside as I felt it was cleaner to leave the debug msg by itself.
-Chris
 
> >             }
> > -check_next:
> > -           pch = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, curr);
> > -           pci_dev_put(curr);
> >     }
> >     if (!pch)
> > -           DRM_DEBUG_KMS("No PCH found?\n");
> > +           DRM_DEBUG_KMS("No PCH found.\n");
> >  }

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

Reply via email to