staging: sm750fb: Remove unnecessary parentheses
Subsystems (2)
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
@@ -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
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;Signed-off-by Rehas Sachdeva <[email protected]>
Quoted 33 lines
---
Changes in v2:
- Change 'following' to 'the following'.
- AlignPANEL_WINDOW_HEIGHT_HEIGHT_SHIFTto 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@@ -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.