Re: [PATCH] PCI: Disable PTM on Upstream Ports during suspend

From: Mika Westerberg
Date: Wed Aug 31 2022 - 05:53:01 EST


Hi Bjorn,

On Tue, Aug 30, 2022 at 10:52:24AM -0500, Bjorn Helgaas wrote:
> + type = pci_pcie_type(dev);
> + if (!(type == PCI_EXP_TYPE_ROOT_PORT ||
> + type == PCI_EXP_TYPE_UPSTREAM ||
> + type == PCI_EXP_TYPE_ENDPOINT))
> + return;

Perhaps switch () instead?

switch (pci_pcie_type(dev)) {
case PCI_EXP_TYPE_ROOT_PORT:
case PCI_EXP_TYPE_UPSTREAM:
case PCI_EXP_TYPE_ENDPOINT:
break;
default:
return;
}

Either way,

Reviewed-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>