linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-pci@vger.kernel.org,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Sagi Grimberg <sagi@grimberg.me>,
	Mario Limonciello <Mario.Limonciello@dell.com>,
	Keith Busch <keith.busch@intel.com>,
	Kai-Heng Feng <kai.heng.feng@canonical.com>,
	Rajat Jain <rajatja@google.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-nvme@lists.infradead.org
Subject: Re: [PATCH 1/1] PCI/ASPM: Remove pcie_aspm_enabled() unnecessary locking
Date: Thu, 10 Oct 2019 11:14:17 -0500	[thread overview]
Message-ID: <20191010161417.GA14520@google.com> (raw)
In-Reply-To: <20191010140121.GA31701@lst.de>

On Thu, Oct 10, 2019 at 04:01:21PM +0200, Christoph Hellwig wrote:
> On Thu, Oct 10, 2019 at 07:47:46AM -0500, Bjorn Helgaas wrote:
> > +	return bridge->link_state ? !!bridge->link_state->aspm_enabled : false;
> 
> Can we unobsfucated this while we're at it?
> 
> 	if (!bridge->link_state)
> 		return false;
> 	return bridge->link_state->aspm_enabled;

Yep, after some of the follow-up patches from Heiner, it looks like
this:

  bool pcie_aspm_enabled(struct pci_dev *pdev)
  {
	  struct pcie_link_state *link = pcie_aspm_get_link(pdev);

	  if (!link)
		  return false;

	  return link->aspm_enabled;
  }


  reply	other threads:[~2019-10-10 16:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 12:47 [PATCH 0/1] PCI/ASPM: Remove locking Bjorn Helgaas
2019-10-10 12:47 ` [PATCH 1/1] PCI/ASPM: Remove pcie_aspm_enabled() unnecessary locking Bjorn Helgaas
2019-10-10 14:01   ` Christoph Hellwig
2019-10-10 16:14     ` Bjorn Helgaas [this message]
2019-10-10 16:28   ` Rafael J. Wysocki

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=20191010161417.GA14520@google.com \
    --to=helgaas@kernel.org \
    --cc=Mario.Limonciello@dell.com \
    --cc=hch@lst.de \
    --cc=hkallweit1@gmail.com \
    --cc=kai.heng.feng@canonical.com \
    --cc=keith.busch@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rajatja@google.com \
    --cc=rjw@rjwysocki.net \
    --cc=sagi@grimberg.me \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).