[PATCH 2/2] PCI/AER: Use bool for AER disable state tracking

Hans Zhang posted 2 patches 7 months, 1 week ago
[PATCH 2/2] PCI/AER: Use bool for AER disable state tracking
Posted by Hans Zhang 7 months, 1 week ago
From: Hans Zhang <hans.zhang@cixtech.com>

Change pcie_aer_disable variable to bool and update pci_no_aer()
to set it to true. Improves code readability and aligns with modern
kernel practices.

Signed-off-by: Hans Zhang <hans.zhang@cixtech.com>
---
 drivers/pci/pcie/aer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index a1cf8c7ef628..ade98c5a19b9 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -111,12 +111,12 @@ struct aer_stats {
 					PCI_ERR_ROOT_MULTI_COR_RCV |	\
 					PCI_ERR_ROOT_MULTI_UNCOR_RCV)
 
-static int pcie_aer_disable;
+static bool pcie_aer_disable;
 static pci_ers_result_t aer_root_reset(struct pci_dev *dev);
 
 void pci_no_aer(void)
 {
-	pcie_aer_disable = 1;
+	pcie_aer_disable = true;
 }
 
 bool pci_aer_available(void)
-- 
2.25.1
Re: [PATCH 2/2] PCI/AER: Use bool for AER disable state tracking
Posted by Manivannan Sadhasivam 6 months, 1 week ago
On Sat, May 17, 2025 at 12:52:23AM +0800, Hans Zhang wrote:
> From: Hans Zhang <hans.zhang@cixtech.com>
> 
> Change pcie_aer_disable variable to bool and update pci_no_aer()
> to set it to true. Improves code readability and aligns with modern
> kernel practices.
> 
> Signed-off-by: Hans Zhang <hans.zhang@cixtech.com>

Applied to pci/misc!

- Mani

> ---
>  drivers/pci/pcie/aer.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
> index a1cf8c7ef628..ade98c5a19b9 100644
> --- a/drivers/pci/pcie/aer.c
> +++ b/drivers/pci/pcie/aer.c
> @@ -111,12 +111,12 @@ struct aer_stats {
>  					PCI_ERR_ROOT_MULTI_COR_RCV |	\
>  					PCI_ERR_ROOT_MULTI_UNCOR_RCV)
>  
> -static int pcie_aer_disable;
> +static bool pcie_aer_disable;
>  static pci_ers_result_t aer_root_reset(struct pci_dev *dev);
>  
>  void pci_no_aer(void)
>  {
> -	pcie_aer_disable = 1;
> +	pcie_aer_disable = true;
>  }
>  
>  bool pci_aer_available(void)
> -- 
> 2.25.1
> 

-- 
மணிவண்ணன் சதாசிவம்