@@ -766,7 +766,10 @@ void pci_print_aer(struct pci_dev *dev, int aer_severity,
766
766
{
767
767
int layer , agent , tlp_header_valid = 0 ;
768
768
u32 status , mask ;
769
- struct aer_err_info info ;
769
+ struct aer_err_info info = {
770
+ .severity = aer_severity ,
771
+ .first_error = PCI_ERR_CAP_FEP (aer -> cap_control ),
772
+ };
770
773
771
774
if (aer_severity == AER_CORRECTABLE ) {
772
775
status = aer -> cor_status ;
@@ -777,14 +780,11 @@ void pci_print_aer(struct pci_dev *dev, int aer_severity,
777
780
tlp_header_valid = status & AER_LOG_TLP_MASKS ;
778
781
}
779
782
780
- layer = AER_GET_LAYER_ERROR (aer_severity , status );
781
- agent = AER_GET_AGENT (aer_severity , status );
782
-
783
- memset (& info , 0 , sizeof (info ));
784
- info .severity = aer_severity ;
785
783
info .status = status ;
786
784
info .mask = mask ;
787
- info .first_error = PCI_ERR_CAP_FEP (aer -> cap_control );
785
+
786
+ layer = AER_GET_LAYER_ERROR (aer_severity , status );
787
+ agent = AER_GET_AGENT (aer_severity , status );
788
788
789
789
pci_err (dev , "aer_status: 0x%08x, aer_mask: 0x%08x\n" , status , mask );
790
790
__aer_print_error (dev , & info );
@@ -798,7 +798,7 @@ void pci_print_aer(struct pci_dev *dev, int aer_severity,
798
798
if (tlp_header_valid )
799
799
pcie_print_tlp_log (dev , & aer -> header_log , dev_fmt (" " ));
800
800
801
- trace_aer_event (dev_name ( & dev -> dev ), (status & ~mask ),
801
+ trace_aer_event (pci_name ( dev ), (status & ~mask ),
802
802
aer_severity , tlp_header_valid , & aer -> header_log );
803
803
}
804
804
EXPORT_SYMBOL_NS_GPL (pci_print_aer , "CXL" );
0 commit comments