Re: [PATCH V3 2/2] PCI: vmd: Override ASPM on TGL/ADL VMD devices

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

 



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.



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux