All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: linux-pci@vger.kernel.org
Cc: Mahesh J Salgaonkar <mahesh@linux.ibm.com>,
	Oliver O'Halloran <oohall@gmail.com>,
	Robert Richter <rrichter@amd.com>,
	Terry Bowman <terry.bowman@amd.com>,
	Kai-Heng Feng <kai.heng.feng@canonical.com>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	Bjorn Helgaas <bhelgaas@google.com>
Subject: [PATCH 3/3] PCI/AER: Use explicit register sizes for struct members
Date: Wed,  6 Dec 2023 16:42:31 -0600	[thread overview]
Message-ID: <20231206224231.732765-4-helgaas@kernel.org> (raw)
In-Reply-To: <20231206224231.732765-1-helgaas@kernel.org>

From: Bjorn Helgaas <bhelgaas@google.com>

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.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/pcie/aer.c | 4 ++--
 include/linux/aer.h    | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index 2ff6bac9979f..60f84414ec2a 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -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 {
diff --git a/include/linux/aer.h b/include/linux/aer.h
index f6ea2f57d808..ae0fae70d4bd 100644
--- a/include/linux/aer.h
+++ b/include/linux/aer.h
@@ -19,10 +19,10 @@
 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 {
-- 
2.34.1


WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Helgaas <helgaas@kernel.org>
To: linux-pci@vger.kernel.org
Cc: Robert Richter <rrichter@amd.com>,
	Terry Bowman <terry.bowman@amd.com>,
	Mahesh J Salgaonkar <mahesh@linux.ibm.com>,
	linux-kernel@vger.kernel.org,
	Kai-Heng Feng <kai.heng.feng@canonical.com>,
	Oliver O'Halloran <oohall@gmail.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 3/3] PCI/AER: Use explicit register sizes for struct members
Date: Wed,  6 Dec 2023 16:42:31 -0600	[thread overview]
Message-ID: <20231206224231.732765-4-helgaas@kernel.org> (raw)
In-Reply-To: <20231206224231.732765-1-helgaas@kernel.org>

From: Bjorn Helgaas <bhelgaas@google.com>

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.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/pcie/aer.c | 4 ++--
 include/linux/aer.h    | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index 2ff6bac9979f..60f84414ec2a 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -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 {
diff --git a/include/linux/aer.h b/include/linux/aer.h
index f6ea2f57d808..ae0fae70d4bd 100644
--- a/include/linux/aer.h
+++ b/include/linux/aer.h
@@ -19,10 +19,10 @@
 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 {
-- 
2.34.1


  parent reply	other threads:[~2023-12-06 22:42 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-06 22:42 [PATCH 0/3] PCI/AER: Clean up logging Bjorn Helgaas
2023-12-06 22:42 ` Bjorn Helgaas
2023-12-06 22:42 ` [PATCH 1/3] PCI/AER: Use 'Correctable' and 'Uncorrectable' spec terms for errors Bjorn Helgaas
2023-12-06 22:42   ` Bjorn Helgaas
2023-12-08 14:36   ` Jonathan Cameron
2023-12-08 14:36     ` Jonathan Cameron
2023-12-12 15:00   ` Terry Bowman
2023-12-12 15:00     ` Terry Bowman
2023-12-12 21:23     ` Bjorn Helgaas
2023-12-12 21:23       ` Bjorn Helgaas
2023-12-12 22:42       ` Bowman, Terry
2024-01-02 19:23   ` Kuppuswamy Sathyanarayanan
2024-01-02 19:23     ` Kuppuswamy Sathyanarayanan
2023-12-06 22:42 ` [PATCH 2/3] PCI/AER: Decode Requester ID when no error info found Bjorn Helgaas
2023-12-06 22:42   ` Bjorn Helgaas
2023-12-08 14:38   ` Jonathan Cameron
2023-12-08 14:38     ` Jonathan Cameron
2023-12-12 15:00   ` Terry Bowman
2023-12-12 15:00     ` Terry Bowman
2024-01-02 19:22   ` Kuppuswamy Sathyanarayanan
2024-01-02 19:22     ` Kuppuswamy Sathyanarayanan
2024-01-02 22:53     ` Bjorn Helgaas
2024-01-02 22:53       ` Bjorn Helgaas
2023-12-06 22:42 ` Bjorn Helgaas [this message]
2023-12-06 22:42   ` [PATCH 3/3] PCI/AER: Use explicit register sizes for struct members Bjorn Helgaas
2023-12-08 14:38   ` Jonathan Cameron
2023-12-08 14:38     ` Jonathan Cameron
2023-12-08 16:54 ` [PATCH 0/3] PCI/AER: Clean up logging Bjorn Helgaas
2023-12-08 16:54   ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231206224231.732765-4-helgaas@kernel.org \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=kai.heng.feng@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mahesh@linux.ibm.com \
    --cc=oohall@gmail.com \
    --cc=rrichter@amd.com \
    --cc=terry.bowman@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.