Skip to content

Commit db02e17

Browse files
committed
PCI/AER: Use explicit register sizes for struct members
aer_irq() reads the AER Root Error Status and Error Source Identification (PCI_ERR_ROOT_STATUS and PCI_ERR_ROOT_ERR_SRC) registers directly into struct aer_err_source. Both registers are 32 bits, so declare the members explicitly as "u32" instead of "unsigned int". Similarly, aer_get_device_error_info() reads the AER Header Log (PCI_ERR_HEADER_LOG) registers, which are also 32 bits, into struct aer_header_log_regs. Declare those members as "u32" as well. No functional changes intended. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]>
1 parent 1291b71 commit db02e17

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

drivers/pci/pcie/aer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
#define AER_MAX_TYPEOF_UNCOR_ERRS 27 /* as per PCI_ERR_UNCOR_STATUS*/
4242

4343
struct aer_err_source {
44-
unsigned int status;
45-
unsigned int id;
44+
u32 status; /* PCI_ERR_ROOT_STATUS */
45+
u32 id; /* PCI_ERR_ROOT_ERR_SRC */
4646
};
4747

4848
struct aer_rpc {

include/linux/aer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
struct pci_dev;
2020

2121
struct aer_header_log_regs {
22-
unsigned int dw0;
23-
unsigned int dw1;
24-
unsigned int dw2;
25-
unsigned int dw3;
22+
u32 dw0;
23+
u32 dw1;
24+
u32 dw2;
25+
u32 dw3;
2626
};
2727

2828
struct aer_capability_regs {

0 commit comments

Comments
 (0)