[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20200713122247.10985-22-refactormyself@gmail.com>
Date: Mon, 13 Jul 2020 14:22:33 +0200
From: "Saheed O. Bolarinwa" <refactormyself@...il.com>
To: helgaas@...nel.org, Chas Williams <3chas3@...il.com>
Cc: "Saheed O. Bolarinwa" <refactormyself@...il.com>,
bjorn@...gaas.com, skhan@...uxfoundation.org,
linux-pci@...r.kernel.org,
linux-kernel-mentees@...ts.linuxfoundation.org,
linux-kernel@...r.kernel.org,
linux-atm-general@...ts.sourceforge.net, netdev@...r.kernel.org
Subject: [RFC PATCH 21/35] atm: Fix Style ERROR- assignment in if condition
Move assignment out of the if condition
Fix style issues in the for-loop
Signed-off-by: "Saheed O. Bolarinwa" <refactormyself@...il.com>
---
This patch depends on PATCH 20/35
drivers/atm/iphase.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index 2c75b82b4e7f..584d9be5fa73 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -2294,13 +2294,19 @@ static int reset_sar(struct atm_dev *dev)
unsigned int pci[64];
iadev = INPH_IA_DEV(dev);
- for(i=0; i<64; i++)
- if ((error = pci_read_config_dword(iadev->pci, i*4, &pci[i])))
+ for (i = 0; i < 64; i++) {
+ error = pci_read_config_dword(iadev->pci, i*4, &pci[i]);
+ if (error)
return error;
+ }
+
writel(0, iadev->reg+IPHASE5575_EXT_RESET);
- for(i=0; i<64; i++)
- if ((error = pci_write_config_dword(iadev->pci, i*4, pci[i])))
+ for (i = 0; i < 64; i++) {
+ error = pci_write_config_dword(iadev->pci, i*4, pci[i]);
+ if (error)
return error;
+ }
+
udelay(5);
return 0;
}
--
2.18.2
Powered by blists - more mailing lists