PCI/AER: Use explicit register sizes for struct members
authorBjorn Helgaas <bhelgaas@google.com>
Wed, 6 Dec 2023 22:42:31 +0000 (16:42 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 2 Jan 2024 22:51:39 +0000 (16:51 -0600)
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/20231206224231.732765-4-helgaas@kernel.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/pci/pcie/aer.c
include/linux/aer.h

index 412b00bdf918815601391c949e181791b14fb067..05fc30bb5134d9ae31e681375d843b0f49738c30 100644 (file)
@@ -41,8 +41,8 @@
 #define AER_MAX_TYPEOF_UNCOR_ERRS      27      /* as per PCI_ERR_UNCOR_STATUS*/
 
 struct aer_err_source {
-       unsigned int status;
-       unsigned int id;
+       u32 status;                     /* PCI_ERR_ROOT_STATUS */
+       u32 id;                         /* PCI_ERR_ROOT_ERR_SRC */
 };
 
 struct aer_rpc {
index f6ea2f57d8089688870aed9a962cc742ff44da58..ae0fae70d4bd2c15a7109ba89dcfd5974177a930 100644 (file)
 struct pci_dev;
 
 struct aer_header_log_regs {
-       unsigned int dw0;
-       unsigned int dw1;
-       unsigned int dw2;
-       unsigned int dw3;
+       u32 dw0;
+       u32 dw1;
+       u32 dw2;
+       u32 dw3;
 };
 
 struct aer_capability_regs {