Skip to contentSkip to conversation

mtd: ssfdc: Fix space before ( coding style

PATCH In review Mohammad Jamal 2 participants 2 messages Dec 19, 2014 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: ssfdc: Fix space before ( coding style

Patch solves the space before ( coding style issue of ssfdc.c

---
 drivers/mtd/ssfdc.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/mtd/ssfdc.c +9 -9
index daf82ba..d4a922c 100644
@@ -42,8 +42,8 @@ struct ssfdcr_record {
 #define MAX_LOGIC_BLK_PER_ZONE	1000
 #define MAX_PHYS_BLK_PER_ZONE	1024
 
-#define KiB(x)	( (x) * 1024L )
-#define MiB(x)	( KiB(x) * 1024L )
+#define KiB(x)	((x) * 1024L)
+#define MiB(x)	(KiB(x) * 1024L)
 
 /** CHS Table
 		1MiB	2MiB	4MiB	8MiB	16MiB	32MiB	64MiB	128MiB
@@ -63,13 +63,13 @@ typedef struct {
 
 /* Must be ordered by size */
 static const chs_entry_t chs_table[] = {
-	{ MiB(  1), 125,  4,  4 },
-	{ MiB(  2), 125,  4,  8 },
-	{ MiB(  4), 250,  4,  8 },
-	{ MiB(  8), 250,  4, 16 },
-	{ MiB( 16), 500,  4, 16 },
-	{ MiB( 32), 500,  8, 16 },
-	{ MiB( 64), 500,  8, 32 },
+	{ MiB(1), 125,  4,  4 },
+	{ MiB(2), 125,  4,  8 },
+	{ MiB(4), 250,  4,  8 },
+	{ MiB(8), 250,  4, 16 },
+	{ MiB(16), 500,  4, 16 },
+	{ MiB(32), 500,  8, 16 },
+	{ MiB(64), 500,  8, 32 },
 	{ MiB(128), 500, 16, 32 },
 	{ 0 },
 };
Signature · 1 line
1.7.9.5
#1 lore raw

Mohammad,

Quoted 12 lines · Mohammad Jamal

Patch solves the space before ( coding style issue of ssfdc.c

---
 drivers/mtd/ssfdc.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/mtd/ssfdc.c +0 -0
index daf82ba..d4a922c 100644

drivers/mtd/ssfdc.c struct ssfdcr_record { · line 46

Quoted 7 lines
drivers/mtd/ssfdc.c +2 -2
@@ -42,8 +42,8 @@ struct ssfdcr_record {
 #define MAX_LOGIC_BLK_PER_ZONE	1000
 #define MAX_PHYS_BLK_PER_ZONE	1024
 
-#define KiB(x)	( (x) * 1024L )
-#define MiB(x)	( KiB(x) * 1024L )
+#define KiB(x)	((x) * 1024L)
+#define MiB(x)	(KiB(x) * 1024L)

This looks better than before.

Quoted 14 lines
drivers/mtd/ssfdc.c +0 -7
 /** CHS Table
 		1MiB	2MiB	4MiB	8MiB	16MiB	32MiB	64MiB	128MiB
@@ -63,13 +63,13 @@ typedef struct {
 
 /* Must be ordered by size */
 static const chs_entry_t chs_table[] = {
-	{ MiB(  1), 125,  4,  4 },
-	{ MiB(  2), 125,  4,  8 },
-	{ MiB(  4), 250,  4,  8 },
-	{ MiB(  8), 250,  4, 16 },
-	{ MiB( 16), 500,  4, 16 },
-	{ MiB( 32), 500,  8, 16 },
-	{ MiB( 64), 500,  8, 32 },

drivers/mtd/ssfdc.c typedef struct { · line 75

Quoted 10 lines
drivers/mtd/ssfdc.c +7 -0
+	{ MiB(1), 125,  4,  4 },
+	{ MiB(2), 125,  4,  8 },
+	{ MiB(4), 250,  4,  8 },
+	{ MiB(8), 250,  4, 16 },
+	{ MiB(16), 500,  4, 16 },
+	{ MiB(32), 500,  8, 16 },
+	{ MiB(64), 500,  8, 32 },
 	{ MiB(128), 500, 16, 32 },
 	{ 0 },
 };

I like the original version better here. The columns were lined up nicely and it was easier to read.

Signature · 1 line
- Jeremiah Mahler