staging: xgifb: rewrite the right hand side of an assignment
authorAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Thu, 26 Feb 2015 09:27:44 +0000 (11:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Feb 2015 23:23:46 +0000 (15:23 -0800)
commit462833726c5461ba357ad75cf44625804b0671ba
tree3aa88c3efcb195215021327b970f082e35a00ce6
parent1cd0989e08a9764d311417fae825c302ffa45cb6
staging: xgifb: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

This issue was detected and resolved using the following
coccinelle script:

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/xgifb/vb_setmode.c