@@ -54,8 +54,8 @@ struct aer_rpc {
5454 DECLARE_KFIFO (aer_fifo , struct aer_err_source , AER_ERROR_SOURCES_MAX );
5555};
5656
57- /* AER stats for the device */
58- struct aer_stats {
57+ /* AER info for the device */
58+ struct aer_info {
5959
6060 /*
6161 * Fields for all AER capable devices. They indicate the errors
@@ -377,7 +377,7 @@ void pci_aer_init(struct pci_dev *dev)
377377 if (!dev -> aer_cap )
378378 return ;
379379
380- dev -> aer_stats = kzalloc (sizeof (struct aer_stats ), GFP_KERNEL );
380+ dev -> aer_info = kzalloc (sizeof (* dev -> aer_info ), GFP_KERNEL );
381381
382382 /*
383383 * We save/restore PCI_ERR_UNCOR_MASK, PCI_ERR_UNCOR_SEVER,
@@ -398,8 +398,8 @@ void pci_aer_init(struct pci_dev *dev)
398398
399399void pci_aer_exit (struct pci_dev * dev )
400400{
401- kfree (dev -> aer_stats );
402- dev -> aer_stats = NULL ;
401+ kfree (dev -> aer_info );
402+ dev -> aer_info = NULL ;
403403}
404404
405405#define AER_AGENT_RECEIVER 0
@@ -537,10 +537,10 @@ static const char *aer_agent_string[] = {
537537{ \
538538 unsigned int i; \
539539 struct pci_dev *pdev = to_pci_dev(dev); \
540- u64 *stats = pdev->aer_stats ->stats_array; \
540+ u64 *stats = pdev->aer_info ->stats_array; \
541541 size_t len = 0; \
542542 \
543- for (i = 0; i < ARRAY_SIZE(pdev->aer_stats ->stats_array); i++) {\
543+ for (i = 0; i < ARRAY_SIZE(pdev->aer_info ->stats_array); i++) { \
544544 if (strings_array[i]) \
545545 len += sysfs_emit_at(buf, len, "%s %llu\n", \
546546 strings_array[i], \
@@ -551,7 +551,7 @@ static const char *aer_agent_string[] = {
551551 i, stats[i]); \
552552 } \
553553 len += sysfs_emit_at(buf, len, "TOTAL_%s %llu\n", total_string, \
554- pdev->aer_stats ->total_field); \
554+ pdev->aer_info ->total_field); \
555555 return len; \
556556} \
557557static DEVICE_ATTR_RO(name)
@@ -572,7 +572,7 @@ aer_stats_dev_attr(aer_dev_nonfatal, dev_nonfatal_errs,
572572 char *buf) \
573573{ \
574574 struct pci_dev *pdev = to_pci_dev(dev); \
575- return sysfs_emit(buf, "%llu\n", pdev->aer_stats ->field); \
575+ return sysfs_emit(buf, "%llu\n", pdev->aer_info ->field); \
576576} \
577577static DEVICE_ATTR_RO(name)
578578
@@ -599,7 +599,7 @@ static umode_t aer_stats_attrs_are_visible(struct kobject *kobj,
599599 struct device * dev = kobj_to_dev (kobj );
600600 struct pci_dev * pdev = to_pci_dev (dev );
601601
602- if (!pdev -> aer_stats )
602+ if (!pdev -> aer_info )
603603 return 0 ;
604604
605605 if ((a == & dev_attr_aer_rootport_total_err_cor .attr ||
@@ -623,25 +623,25 @@ static void pci_dev_aer_stats_incr(struct pci_dev *pdev,
623623 unsigned long status = info -> status & ~info -> mask ;
624624 int i , max = -1 ;
625625 u64 * counter = NULL ;
626- struct aer_stats * aer_stats = pdev -> aer_stats ;
626+ struct aer_info * aer_info = pdev -> aer_info ;
627627
628- if (!aer_stats )
628+ if (!aer_info )
629629 return ;
630630
631631 switch (info -> severity ) {
632632 case AER_CORRECTABLE :
633- aer_stats -> dev_total_cor_errs ++ ;
634- counter = & aer_stats -> dev_cor_errs [0 ];
633+ aer_info -> dev_total_cor_errs ++ ;
634+ counter = & aer_info -> dev_cor_errs [0 ];
635635 max = AER_MAX_TYPEOF_COR_ERRS ;
636636 break ;
637637 case AER_NONFATAL :
638- aer_stats -> dev_total_nonfatal_errs ++ ;
639- counter = & aer_stats -> dev_nonfatal_errs [0 ];
638+ aer_info -> dev_total_nonfatal_errs ++ ;
639+ counter = & aer_info -> dev_nonfatal_errs [0 ];
640640 max = AER_MAX_TYPEOF_UNCOR_ERRS ;
641641 break ;
642642 case AER_FATAL :
643- aer_stats -> dev_total_fatal_errs ++ ;
644- counter = & aer_stats -> dev_fatal_errs [0 ];
643+ aer_info -> dev_total_fatal_errs ++ ;
644+ counter = & aer_info -> dev_fatal_errs [0 ];
645645 max = AER_MAX_TYPEOF_UNCOR_ERRS ;
646646 break ;
647647 }
@@ -653,19 +653,19 @@ static void pci_dev_aer_stats_incr(struct pci_dev *pdev,
653653static void pci_rootport_aer_stats_incr (struct pci_dev * pdev ,
654654 struct aer_err_source * e_src )
655655{
656- struct aer_stats * aer_stats = pdev -> aer_stats ;
656+ struct aer_info * aer_info = pdev -> aer_info ;
657657
658- if (!aer_stats )
658+ if (!aer_info )
659659 return ;
660660
661661 if (e_src -> status & PCI_ERR_ROOT_COR_RCV )
662- aer_stats -> rootport_total_cor_errs ++ ;
662+ aer_info -> rootport_total_cor_errs ++ ;
663663
664664 if (e_src -> status & PCI_ERR_ROOT_UNCOR_RCV ) {
665665 if (e_src -> status & PCI_ERR_ROOT_FATAL_RCV )
666- aer_stats -> rootport_total_fatal_errs ++ ;
666+ aer_info -> rootport_total_fatal_errs ++ ;
667667 else
668- aer_stats -> rootport_total_nonfatal_errs ++ ;
668+ aer_info -> rootport_total_nonfatal_errs ++ ;
669669 }
670670}
671671
0 commit comments