PCI/AER: Use explicit register size for PCI_ERR_CAP
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 6 Feb 2024 13:57:14 +0000 (15:57 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 8 Mar 2024 21:22:46 +0000 (15:22 -0600)
Use u32 for PCIe AER Capability register variable and name it "aercc"
(Advanced Error Capabilities and Control register, PCIe r6.1 sec 7.8.4.7)
instead of "temp".

Link: https://lore.kernel.org/r/20240206135717.8565-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
[bhelgaas: make subject more specific and match similar previous patches]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pcie/aer.c

index 05fc30bb5134d9ae31e681375d843b0f49738c30..e31e6a9a7773215e34107e8541845a008d140ecd 100644 (file)
@@ -1210,7 +1210,7 @@ int aer_get_device_error_info(struct pci_dev *dev, struct aer_err_info *info)
 {
        int type = pci_pcie_type(dev);
        int aer = dev->aer_cap;
-       int temp;
+       u32 aercc;
 
        /* Must reset in this function */
        info->status = 0;
@@ -1241,8 +1241,8 @@ int aer_get_device_error_info(struct pci_dev *dev, struct aer_err_info *info)
                        return 0;
 
                /* Get First Error Pointer */
-               pci_read_config_dword(dev, aer + PCI_ERR_CAP, &temp);
-               info->first_error = PCI_ERR_CAP_FEP(temp);
+               pci_read_config_dword(dev, aer + PCI_ERR_CAP, &aercc);
+               info->first_error = PCI_ERR_CAP_FEP(aercc);
 
                if (info->status & AER_LOG_TLP_MASKS) {
                        info->tlp_header_valid = 1;