@@ -54,8 +54,8 @@ struct aer_rpc {
54
54
DECLARE_KFIFO (aer_fifo , struct aer_err_source , AER_ERROR_SOURCES_MAX );
55
55
};
56
56
57
- /* AER stats for the device */
58
- struct aer_stats {
57
+ /* AER info for the device */
58
+ struct aer_info {
59
59
60
60
/*
61
61
* Fields for all AER capable devices. They indicate the errors
@@ -377,7 +377,7 @@ void pci_aer_init(struct pci_dev *dev)
377
377
if (!dev -> aer_cap )
378
378
return ;
379
379
380
- dev -> aer_stats = kzalloc (sizeof (struct aer_stats ), GFP_KERNEL );
380
+ dev -> aer_info = kzalloc (sizeof (* dev -> aer_info ), GFP_KERNEL );
381
381
382
382
/*
383
383
* We save/restore PCI_ERR_UNCOR_MASK, PCI_ERR_UNCOR_SEVER,
@@ -398,8 +398,8 @@ void pci_aer_init(struct pci_dev *dev)
398
398
399
399
void pci_aer_exit (struct pci_dev * dev )
400
400
{
401
- kfree (dev -> aer_stats );
402
- dev -> aer_stats = NULL ;
401
+ kfree (dev -> aer_info );
402
+ dev -> aer_info = NULL ;
403
403
}
404
404
405
405
#define AER_AGENT_RECEIVER 0
@@ -537,10 +537,10 @@ static const char *aer_agent_string[] = {
537
537
{ \
538
538
unsigned int i; \
539
539
struct pci_dev *pdev = to_pci_dev(dev); \
540
- u64 *stats = pdev->aer_stats ->stats_array; \
540
+ u64 *stats = pdev->aer_info ->stats_array; \
541
541
size_t len = 0; \
542
542
\
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++) { \
544
544
if (strings_array[i]) \
545
545
len += sysfs_emit_at(buf, len, "%s %llu\n", \
546
546
strings_array[i], \
@@ -551,7 +551,7 @@ static const char *aer_agent_string[] = {
551
551
i, stats[i]); \
552
552
} \
553
553
len += sysfs_emit_at(buf, len, "TOTAL_%s %llu\n", total_string, \
554
- pdev->aer_stats ->total_field); \
554
+ pdev->aer_info ->total_field); \
555
555
return len; \
556
556
} \
557
557
static DEVICE_ATTR_RO(name)
@@ -572,7 +572,7 @@ aer_stats_dev_attr(aer_dev_nonfatal, dev_nonfatal_errs,
572
572
char *buf) \
573
573
{ \
574
574
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); \
576
576
} \
577
577
static DEVICE_ATTR_RO(name)
578
578
@@ -599,7 +599,7 @@ static umode_t aer_stats_attrs_are_visible(struct kobject *kobj,
599
599
struct device * dev = kobj_to_dev (kobj );
600
600
struct pci_dev * pdev = to_pci_dev (dev );
601
601
602
- if (!pdev -> aer_stats )
602
+ if (!pdev -> aer_info )
603
603
return 0 ;
604
604
605
605
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,
623
623
unsigned long status = info -> status & ~info -> mask ;
624
624
int i , max = -1 ;
625
625
u64 * counter = NULL ;
626
- struct aer_stats * aer_stats = pdev -> aer_stats ;
626
+ struct aer_info * aer_info = pdev -> aer_info ;
627
627
628
- if (!aer_stats )
628
+ if (!aer_info )
629
629
return ;
630
630
631
631
switch (info -> severity ) {
632
632
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 ];
635
635
max = AER_MAX_TYPEOF_COR_ERRS ;
636
636
break ;
637
637
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 ];
640
640
max = AER_MAX_TYPEOF_UNCOR_ERRS ;
641
641
break ;
642
642
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 ];
645
645
max = AER_MAX_TYPEOF_UNCOR_ERRS ;
646
646
break ;
647
647
}
@@ -653,19 +653,19 @@ static void pci_dev_aer_stats_incr(struct pci_dev *pdev,
653
653
static void pci_rootport_aer_stats_incr (struct pci_dev * pdev ,
654
654
struct aer_err_source * e_src )
655
655
{
656
- struct aer_stats * aer_stats = pdev -> aer_stats ;
656
+ struct aer_info * aer_info = pdev -> aer_info ;
657
657
658
- if (!aer_stats )
658
+ if (!aer_info )
659
659
return ;
660
660
661
661
if (e_src -> status & PCI_ERR_ROOT_COR_RCV )
662
- aer_stats -> rootport_total_cor_errs ++ ;
662
+ aer_info -> rootport_total_cor_errs ++ ;
663
663
664
664
if (e_src -> status & PCI_ERR_ROOT_UNCOR_RCV ) {
665
665
if (e_src -> status & PCI_ERR_ROOT_FATAL_RCV )
666
- aer_stats -> rootport_total_fatal_errs ++ ;
666
+ aer_info -> rootport_total_fatal_errs ++ ;
667
667
else
668
- aer_stats -> rootport_total_nonfatal_errs ++ ;
668
+ aer_info -> rootport_total_nonfatal_errs ++ ;
669
669
}
670
670
}
671
671
0 commit comments