staging: sm750fb: Removed unnecessary parentheses.
Subsystems (2)
PATCH 1/1 staging: sm750fb: Removed unnecessary parentheses.
Removed parentheses on the right hand side of assignment, as they are not required. The following coccinelle script was used to fix this issue:
@@
local idexpression id;
expression e;
@@
id =
-(
e
-)
--- drivers/staging/sm750fb/ddk750_chip.c | 2 +- drivers/staging/sm750fb/ddk750_hwi2c.c | 2 +- drivers/staging/sm750fb/sm750_accel.c | 2 +- drivers/staging/sm750fb/sm750_cursor.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/sm750fb/ddk750_chip.c +1 -1
@@ -352,7 +352,7 @@ unsigned int sm750_calc_pll_value(unsigned int request_orig, struct pll_value *pRN =N * request; quo =RN / input; rem =RN % input;/* rem always small than 14318181 */ - fl_quo = (rem *10000 / input); + fl_quo = rem *10000 / input;for (d = max_d; d >=0 ; d--) {X =BIT (d);
drivers/staging/sm750fb/ddk750_hwi2c.c +1 -1
@@ -217,7 +217,7 @@ unsigned char sm750_hw_i2c_read_reg(unsigned char reg ) { -unsigned char value = (0xFF ); +unsigned char value =0xFF ;if (hw_i2c_write_data (addr,1 , ®) ==1 )hw_i2c_read_data (addr,1 , &value);
drivers/staging/sm750fb/sm750_accel.c +1 -1
@@ -212,7 +212,7 @@ unsigned int rop2) /* ROP value */ sy += height -1 ; dx += width -1 ; dy += height -1 ; - opSign = (-1 ); + opSign =-1 ; }/*
drivers/staging/sm750fb/sm750_cursor.c +2 -2
@@ -70,8 +70,8 @@ void sm750_hw_cursor_setPos(struct lynx_cursor *cursor, {u32 reg; - reg = (((y <<HWC_LOCATION_Y_SHIFT ) &HWC_LOCATION_Y_MASK ) | - (x &HWC_LOCATION_X_MASK )); + reg = ((y <<HWC_LOCATION_Y_SHIFT ) &HWC_LOCATION_Y_MASK ) | + (x &HWC_LOCATION_X_MASK );poke32 (HWC_LOCATION , reg); } void sm750_hw_cursor_setColor(struct lynx_cursor *cursor,
Signature · 1 line
2.9.3
Quoted 66 lines · Varsha Rao
Removed parentheses on the right hand side of assignment, as they are not required. The following coccinelle script was used to fix this issue:
@@
local idexpression id;
expression e;
@@id =
-(
e
-)Signed-off-by Varsha Rao <[email protected]>--- drivers/staging/sm750fb/ddk750_chip.c | 2 +- drivers/staging/sm750fb/ddk750_hwi2c.c | 2 +- drivers/staging/sm750fb/sm750_accel.c | 2 +- drivers/staging/sm750fb/sm750_cursor.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-)drivers/staging/sm750fb/ddk750_chip.c +1
-1@@ -352,7 +352,7 @@ unsigned int sm750_calc_pll_value(unsigned int request_orig, struct pll_value *pRN =N * request; quo =RN / input; rem =RN % input;/* rem always small than 14318181 */ - fl_quo = (rem *10000 / input); + fl_quo = rem *10000 / input;for (d = max_d; d >=0 ; d--) {X =BIT (d);drivers/staging/sm750fb/ddk750_hwi2c.c +1
-1@@ -217,7 +217,7 @@ unsigned char sm750_hw_i2c_read_reg(unsigned char reg ) { -unsigned char value = (0xFF ); +unsigned char value =0xFF ;if (hw_i2c_write_data (addr,1 , ®) ==1 )hw_i2c_read_data (addr,1 , &value);drivers/staging/sm750fb/sm750_accel.c +1
-1@@ -212,7 +212,7 @@ unsigned int rop2) /* ROP value */ sy += height -1 ; dx += width -1 ; dy += height -1 ; - opSign = (-1 ); + opSign =-1 ; }/* drivers/staging/sm750fb/sm750_cursor.c +0
-0
drivers/staging/sm750fb/sm750_cursor.c void sm750_hw_cursor_setPos(struct lynx_cursor *cursor, · line 74
Quoted 7 lines
drivers/staging/sm750fb/sm750_cursor.c +2
-2@@ -70,8 +70,8 @@ void sm750_hw_cursor_setPos(struct lynx_cursor *cursor, {u32 reg; - reg = (((y <<HWC_LOCATION_Y_SHIFT ) &HWC_LOCATION_Y_MASK ) | - (x &HWC_LOCATION_X_MASK )); + reg = ((y <<HWC_LOCATION_Y_SHIFT ) &HWC_LOCATION_Y_MASK ) | + (x &HWC_LOCATION_X_MASK );
There should be one less space in front of the last line, to line the parnthesis to the left of x with the parenthesis immediately to the left of y. Otherwise,
Quoted 13 lines
drivers/staging/sm750fb/sm750_cursor.c +0
-1poke32 (HWC_LOCATION , reg); } void sm750_hw_cursor_setColor(struct lynx_cursor *cursor, --2.9.3
--
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/58b94a22.0910620a.79513.e66a%40mx.google.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 10 lines
drivers/staging/sm750fb/sm750_cursor.c void sm750_hw_cursor_setPos(struct lynx_cursor *cursor, · line 74
Quoted 5 lines
drivers/staging/sm750fb/sm750_cursor.c +2
-1- (x & HWC_LOCATION_X_MASK)); + reg = ((y <<HWC_LOCATION_Y_SHIFT ) &HWC_LOCATION_Y_MASK ) | + (x &HWC_LOCATION_X_MASK );There should be one less space in front of the last line, to line the parnthesis to the left of x with the parenthesis immediately to the left of y. Otherwise,
Yes, the alignment is not proper. I will send a new patch for this
issue.