Skip to contentSkip to conversation

sm750fb: Fix C99 comment and if-else braces

PATCH In review Amitoj Kaur Chawla 2 participants 2 messages Mar 20, 2015 – Mar 23, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sm750fb: Fix C99 comment and if-else braces

The edits have been made to fix C99 Comment and properly indent the if-else statements with the braces.

Also, to use tabs instead of spaces.

---
 drivers/staging/sm750fb/ddk750_chip.c | 35 ++++++++++++++---------------------
 1 file changed, 14 insertions(+), 21 deletions(-)
drivers/staging/sm750fb/ddk750_chip.c +14 -21
index 33add64..1e6b474 100644
@@ -17,38 +17,31 @@ logical_chip_type_t getChipType(void)
 	char physicalRev;
 	logical_chip_type_t chip;
 
-	physicalID = devId750;//either 0x718 or 0x750
+	physicalID = devId750; /* either 0x718 or 0x750 */
 	physicalRev = revId750;
 
-    if (physicalID == 0x718)
-    {
-        chip = SM718;
-    }
-    else if (physicalID == 0x750)
-    {
-        chip = SM750;
+	if (physicalID == 0x718) {
+		chip = SM718;
+	} else if (physicalID == 0x750) {
+		chip = SM750;
 		/* SM750 and SM750LE are different in their revision ID only. */
-		if (physicalRev == SM750LE_REVISION_ID){
+		if (physicalRev == SM750LE_REVISION_ID)
 			chip = SM750LE;
-		}
-    }
-    else
-    {
-        chip = SM_UNKNOWN;
-    }
+	} else {
+		chip = SM_UNKNOWN;
+	}
 
 	return chip;
 }
 
-
 inline unsigned int twoToPowerOfx(unsigned long x)
 {
-    unsigned long i;
-    unsigned long result = 1;
+	unsigned long i;
+	unsigned long result = 1;
 
-    for (i=1; i<=x; i++)
-        result *= 2;
-    return result;
+	for (i = 1; i <= x; i++)
+		result *= 2;
+	return result;
 }
 
 inline unsigned int calcPLL(pll_value_t *pPLL)
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 2 lines · Amitoj Kaur Chawla

The edits have been made to fix C99 Comment and properly indent the if-else statements with the braces.

i think you are doing multiple types of changes in one patch. better to send it in a series of two, one for the C99 and the other for the if-else. and there are few more places in that file where C99 is used, any reason why you have chosen only one?

scripts/checkpatch.pl --strict -f drivers/staging/sm750fb/ddk750_chip.c | grep C99 | wc -l 6

and, your patch is not applying, please refresh your patch against staging-testing.

regards
sudip

Quoted 1 line