public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "David E. Box" <david.e.box@linux.intel.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: nirmal.patel@linux.intel.com, jonathan.derrick@linux.dev,
	lorenzo.pieralisi@arm.com, robh@kernel.org, kw@linux.com,
	bhelgaas@google.com, michael.a.bottini@linux.intel.com,
	rafael@kernel.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, Adhitya Mohan <me@adhityamohan.in>
Subject: Re: [PATCH V3 2/2] PCI: vmd: Override ASPM on TGL/ADL VMD devices
Date: Tue, 14 Dec 2021 09:33:11 -0800	[thread overview]
Message-ID: <afc2e96167db7e1602a39f8b9aab42a860b0c654.camel@linux.intel.com> (raw)
In-Reply-To: <YbhOQx60Qz/tLUKU@infradead.org>

On Mon, 2021-12-13 at 23:56 -0800, Christoph Hellwig wrote:
> On Thu, Dec 09, 2021 at 12:12:35PM -0800, David E. Box wrote:
> > +static int vmd_enable_aspm(struct pci_dev *pdev, void *userdata)
> > +{
> > +	int features = *(int *)userdata;
> > +
> > +	if (features & VMD_FEAT_QUIRK_OVERRIDE_ASPM &&
> > +	    pdev->class == PCI_CLASS_STORAGE_EXPRESS) {
> > +		int pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_LTR);
> > +
> > +		if (pos) {
> > +			pci_write_config_word(pdev, pos + PCI_LTR_MAX_SNOOP_LAT,
> > 0x1003);
> > +			pci_write_config_word(pdev, pos +
> > PCI_LTR_MAX_NOSNOOP_LAT, 0x1003);
> > +			if (pcie_aspm_policy_override(pdev))
> > +				pci_info(pdev, "Unable of override ASPM
> > policy\n");
> > +		}
> 
> This is completely unredable due to the long lines.  Just return early on
> the two conditionals and it will all be fine.

Sure.

Thanks.


      reply	other threads:[~2021-12-14 17:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09 20:12 [PATCH V3 1/2] PCI/ASPM: Add ASPM BIOS override function David E. Box
2021-12-09 20:12 ` [PATCH V3 2/2] PCI: vmd: Override ASPM on TGL/ADL VMD devices David E. Box
2021-12-14  7:56   ` Christoph Hellwig
2021-12-14 17:33     ` David E. Box [this message]

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=afc2e96167db7e1602a39f8b9aab42a860b0c654.camel@linux.intel.com \
    --to=david.e.box@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=hch@infradead.org \
    --cc=jonathan.derrick@linux.dev \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=me@adhityamohan.in \
    --cc=michael.a.bottini@linux.intel.com \
    --cc=nirmal.patel@linux.intel.com \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox