Skip to contentSkip to conversation

staging: sm750fb: remove parantheses from return statements

PATCH In review Supriya Karanth 2 participants 2 messages Mar 14, 2015

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

PATCH 1/1 staging: sm750fb: remove parantheses from return statements

found by checkpatch.pl :ERROR: return is not a function, parentheses are not required

changes made using coccinelle script:

@@
expression e,e1;
@@
(
return (e / e1);
|
return
-(
e
-)
;
)

---
 drivers/staging/sm750fb/ddk750_chip.c  | 2 +-
 drivers/staging/sm750fb/ddk750_swi2c.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/sm750fb/ddk750_chip.c +1 -1
index 3c77207..33add64 100644
@@ -633,7 +633,7 @@ unsigned int formatPllReg(pll_value_t *pPLL)
       | FIELD_VALUE(0, PANEL_PLL_CTRL, N,      pPLL->N)
       | FIELD_VALUE(0, PANEL_PLL_CTRL, M,      pPLL->M);
 
-    return(ulPllReg);
+    return ulPllReg;
 }
 
 
drivers/staging/sm750fb/ddk750_swi2c.c +3 -3
index 1249759..8557cce 100644
@@ -304,7 +304,7 @@ long swI2CWriteByte(unsigned char data)
     if (i<0xff)
         return 0;
     else
-        return (-1);
+        return -1;
 }
 
 /*
@@ -408,10 +408,10 @@ long swI2CInit(
 
     /* Return 0 if the GPIO pins to be used is out of range. The range is only from [0..63] */
     if ((i2cClkGPIO > 31) || (i2cDataGPIO > 31))
-        return (-1);
+        return -1;
 
     if (getChipType() == SM750LE)
-        return( swI2CInit_SM750LE(i2cClkGPIO, i2cDataGPIO) );
+        return swI2CInit_SM750LE(i2cClkGPIO, i2cDataGPIO);
 
     /* Initialize the GPIO pin for the i2c Clock Register */
     g_i2cClkGPIOMuxReg = GPIO_MUX;
Signature · 1 line
2.1.0
Acked-by on v1 1/1
#1 lore raw
Quoted 73 lines · Supriya Karanth

found by checkpatch.pl :ERROR: return is not a function, parentheses are not required

changes made using coccinelle script:

@@
expression e,e1;
@@
(
return (e / e1);
|
return
-(
e
-)
;
)

---
 drivers/staging/sm750fb/ddk750_chip.c  | 2 +-
 drivers/staging/sm750fb/ddk750_swi2c.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/sm750fb/ddk750_chip.c +1 -1
index 3c77207..33add64 100644
@@ -633,7 +633,7 @@ unsigned int formatPllReg(pll_value_t *pPLL)
       | FIELD_VALUE(0, PANEL_PLL_CTRL, N,      pPLL->N)
       | FIELD_VALUE(0, PANEL_PLL_CTRL, M,      pPLL->M);
 
-    return(ulPllReg);
+    return ulPllReg;
 }
 
 
drivers/staging/sm750fb/ddk750_swi2c.c +3 -4
index 1249759..8557cce 100644
@@ -304,7 +304,7 @@ long swI2CWriteByte(unsigned char data)
     if (i<0xff)
         return 0;
     else
-        return (-1);
+        return -1;
 }
 
 /*
@@ -408,10 +408,10 @@ long swI2CInit(
 
     /* Return 0 if the GPIO pins to be used is out of range. The range is only from [0..63] */
     if ((i2cClkGPIO > 31) || (i2cDataGPIO > 31))
-        return (-1);
+        return -1;
 
     if (getChipType() == SM750LE)
-        return( swI2CInit_SM750LE(i2cClkGPIO, i2cDataGPIO) );
+        return swI2CInit_SM750LE(i2cClkGPIO, i2cDataGPIO);
 
     /* Initialize the GPIO pin for the i2c Clock Register */
     g_i2cClkGPIOMuxReg = GPIO_MUX;
--

2.1.0

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1426337711-32548-1-git-send-email-iskaranth%40gmail.com.
For more options, visit https://groups.google.com/d/optout.