[PATCH v2] PCI/AER: Only clear error bits in PCIe Device Status register

Lukas Wunner lukas at wunner.de
Wed Feb 11 23:34:27 AEDT 2026


On Wed, Feb 11, 2026 at 01:48:16PM +0800, Shuai Xue wrote:
> +++ b/drivers/pci/pci.c
> @@ -2243,10 +2243,11 @@ EXPORT_SYMBOL_GPL(pci_set_pcie_reset_state);
>  #ifdef CONFIG_PCIEAER
>  void pcie_clear_device_status(struct pci_dev *dev)
>  {
> -	u16 sta;
> -
> -	pcie_capability_read_word(dev, PCI_EXP_DEVSTA, &sta);
> -	pcie_capability_write_word(dev, PCI_EXP_DEVSTA, sta);
> +	pcie_capability_write_word(dev, PCI_EXP_DEVSTA,
> +				    PCI_EXP_DEVSTA_CED |
> +				    PCI_EXP_DEVSTA_NFED |
> +				    PCI_EXP_DEVSTA_FED |
> +				    PCI_EXP_DEVSTA_URD);

Isn't there one too many blanks before each of the PCI_EXP_DEVSTA_* macros?

The available space would be sufficient to accommodate two macros per line,
so just 2 instead of 4 lines for the macros.

Otherwise this is:
Reviewed-by: Lukas Wunner <lukas at wunner.de>


More information about the Linuxppc-dev mailing list