[PATCH 2/2] Staging: arlan: fixed coding style issues in arlan-proc.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Andre Silva <andre.beat@xxxxxxxxx>

This is a patch to the arlan-proc.c file that fixes up multiple coding style
errors and warnings found by the checkpatch.pl.
I fixed some issues from my last patch as requested by Joe Perches.

Signed-off-by: Andre Silva <andre.beat@xxxxxxxxx>
---
 drivers/staging/arlan/arlan-proc.c |   30 ++++++++++++++++--------------
 1 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/arlan/arlan-proc.c b/drivers/staging/arlan/arlan-proc.c
index 62cd1d0..ee8dbab 100644
--- a/drivers/staging/arlan/arlan-proc.c
+++ b/drivers/staging/arlan/arlan-proc.c
@@ -9,21 +9,23 @@
 
 
 
-#define ARLAN_STR_SIZE 0x2ff0
-#define DEV_ARLAN_INFO 1
-#define DEV_ARLAN 1
-#define SARLG(type, var) {\
-	pos += sprintf(arlan_drive_info+pos, "%s\t=\t0x%x\n", #var,\
-		READSHMB(priva->card->var));\
-	}
+#define ARLAN_STR_SIZE	0x2ff0
+#define DEV_ARLAN_INFO	1
+#define DEV_ARLAN	1
+#define SARLG(type, var)\
+	do {\
+	pos += sprintf(arlan_drive_info+pos, "%s\t=\t0x%x\n", \
+			#var, READSHMB(priva->card->var));\
+	} while (0)
 
-#define SARLBN(type, var, nn) {\
-	pos += sprintf(arlan_drive_info+pos, "%s\t=\t0x", #var);\
-	for (i = 0; i < nn; i++)\
-		pos += sprintf(arlan_drive_info+pos, "%02x",\
-			READSHMB(priva->card->var[i]));\
+#define SARLBN(type, var, nn)\
+	do {\
+		SARLG(type, var);\
+		for (i = 0; i < nn; i++)\
+			pos += sprintf(arlan_drive_info + pos, "%02x",\
+				READSHMB(priva->card->var[i]));\
 		pos += sprintf(arlan_drive_info+pos, "\n");\
-	}
+	} while (0)
 
 #define SARLBNpln(type, var, nn) {\
 	for (i = 0; i < nn; i++)\
-- 
1.7.0.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux