Skip to content

Commit a37e12b

Browse files
ij-intelbjorn-helgaas
authored andcommitted
PCI/AER: Use explicit register size for PCI_ERR_CAP
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/[email protected] Signed-off-by: Ilpo Järvinen <[email protected]> [bhelgaas: make subject more specific and match similar previous patches] Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent 002bf2f commit a37e12b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/pci/pcie/aer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,7 @@ int aer_get_device_error_info(struct pci_dev *dev, struct aer_err_info *info)
12101210
{
12111211
int type = pci_pcie_type(dev);
12121212
int aer = dev->aer_cap;
1213-
int temp;
1213+
u32 aercc;
12141214

12151215
/* Must reset in this function */
12161216
info->status = 0;
@@ -1241,8 +1241,8 @@ int aer_get_device_error_info(struct pci_dev *dev, struct aer_err_info *info)
12411241
return 0;
12421242

12431243
/* Get First Error Pointer */
1244-
pci_read_config_dword(dev, aer + PCI_ERR_CAP, &temp);
1245-
info->first_error = PCI_ERR_CAP_FEP(temp);
1244+
pci_read_config_dword(dev, aer + PCI_ERR_CAP, &aercc);
1245+
info->first_error = PCI_ERR_CAP_FEP(aercc);
12461246

12471247
if (info->status & AER_LOG_TLP_MASKS) {
12481248
info->tlp_header_valid = 1;

0 commit comments

Comments
 (0)