staging: sm750fb: Remove unnecessary parentheses
Subsystems (2)
PATCH 1/1 staging: sm750fb: Remove unnecessary parentheses
Remove unnecessary parentheses from right side of an assignment. Issue detected by following Coccinelle semantic patch:
@r@
identifier x;
expression e1, e2;
@@
- x = (e1 << e2);
+ x = e1 << e2;
--- 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 2 lines · Rehas Sachdeva
Remove unnecessary parentheses from right side of an assignment. Issue detected by following Coccinelle semantic patch:
following -> the following
Quoted 19 lines
@r@
identifier x;
expression e1, e2;
@@- x = (e1 << e2);
+ x = e1 << e2;Signed-off-by Rehas Sachdeva <[email protected]>--- drivers/staging/sm750fb/sm750_hw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/sm750fb/sm750_hw.c +0
-0
drivers/staging/sm750fb/sm750_hw.c int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc, · line 326
Quoted 7 lines
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 ;
Actually, PANEL_WINDOW_HEIGHT_HEIGHT_SHIFT should be moved over one space to left, to line up with the first part of the right hand side of the assignment.
julia
Quoted 13 lines
drivers/staging/sm750fb/sm750_hw.c +0
-1reg &=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/20160920122024.GA12086%40toblerone.
For more options, visit https://groups.google.com/d/optout.