Skip to contentSkip to conversation

staging: sm750fb: Remove unnecessary parentheses

PATCH In review Rehas Sachdeva 2 participants 2 messages Sep 20, 2016

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

PATCH v2 1/1 staging: sm750fb: Remove unnecessary parentheses

Remove unnecessary parentheses from right side of an assignment. Issue detected by the following Coccinelle semantic patch:

@r@
identifier x;
expression e1, e2;
@@

- x = (e1 << e2);
+ x = e1 << e2;

---
Changes in v2:
- Change 'following' to 'the following'.
- Align PANEL_WINDOW_HEIGHT_HEIGHT_SHIFT to right side of the assignment.

 drivers/staging/sm750fb/sm750_hw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/sm750fb/sm750_hw.c +2 -2
index a376d17..bff7db5 100644
@@ -322,8 +322,8 @@ int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc,
 		reg |= (var->xoffset & PANEL_WINDOW_WIDTH_X_MASK);
 		POKE32(PANEL_WINDOW_WIDTH, reg);
 
-		reg = ((var->yres_virtual - 1) <<
-		       PANEL_WINDOW_HEIGHT_HEIGHT_SHIFT);
+		reg = (var->yres_virtual - 1) <<
+		      PANEL_WINDOW_HEIGHT_HEIGHT_SHIFT;
 		reg &= PANEL_WINDOW_HEIGHT_HEIGHT_MASK;
 		reg |= (var->yoffset & PANEL_WINDOW_HEIGHT_Y_MASK);
 		POKE32(PANEL_WINDOW_HEIGHT, reg);
Signature · 1 line
2.7.4
Acked-by on v2 1/1
#1 lore raw
Quoted 8 lines · Rehas Sachdeva

Remove unnecessary parentheses from right side of an assignment. Issue detected by the following Coccinelle semantic patch:

@r@
identifier x;
expression e1, e2;
@@

Quoted 4 lines

- x = (e1 << e2);
+ x = e1 << e2;

Quoted 33 lines

---
Changes in v2:
- Change 'following' to 'the following'.
- Align PANEL_WINDOW_HEIGHT_HEIGHT_SHIFT to right side of the assignment.

 drivers/staging/sm750fb/sm750_hw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/sm750fb/sm750_hw.c +2 -3
index a376d17..bff7db5 100644
@@ -322,8 +322,8 @@ int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc,
 		reg |= (var->xoffset & PANEL_WINDOW_WIDTH_X_MASK);
 		POKE32(PANEL_WINDOW_WIDTH, reg);
 
-		reg = ((var->yres_virtual - 1) <<
-		       PANEL_WINDOW_HEIGHT_HEIGHT_SHIFT);
+		reg = (var->yres_virtual - 1) <<
+		      PANEL_WINDOW_HEIGHT_HEIGHT_SHIFT;
 		reg &= PANEL_WINDOW_HEIGHT_HEIGHT_MASK;
 		reg |= (var->yoffset & PANEL_WINDOW_HEIGHT_Y_MASK);
 		POKE32(PANEL_WINDOW_HEIGHT, reg);
--

2.7.4

--
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/20160920131118.GA13758%40toblerone.
For more options, visit https://groups.google.com/d/optout.