All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Imre Deak <imre.deak@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: fix pch pci device enumeration
Date: Fri, 14 Feb 2014 17:54:09 +0000	[thread overview]
Message-ID: <20140214175409.GL32602@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <1392400098.6017.3.camel@ideak-mobl>

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

  reply	other threads:[~2014-02-14 17:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14 17:23 [PATCH] drm/i915: fix pch pci device enumeration Imre Deak
2014-02-14 17:35 ` Chris Wilson
2014-02-14 17:48   ` Imre Deak
2014-02-14 17:54     ` Chris Wilson [this message]
2014-02-14 17:56     ` Imre Deak
2014-02-14 18:23 ` [PATCH v2] " Imre Deak
2014-02-14 18:36   ` Chris Wilson
2014-02-28 14:12     ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140214175409.GL32602@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.