Commit 0dbffe07 authored by Aya Mahfouz's avatar Aya Mahfouz Committed by Greg Kroah-Hartman

staging: rtl8192e: 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: default avatarAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent be31fed4
...@@ -1527,7 +1527,7 @@ static void rtl8192_query_rxphystatus( ...@@ -1527,7 +1527,7 @@ static void rtl8192_query_rxphystatus(
priv->stats.numqry_phystatusCCK++; priv->stats.numqry_phystatusCCK++;
if (!reg824_bit9) { if (!reg824_bit9) {
report = pcck_buf->cck_agc_rpt & 0xc0; report = pcck_buf->cck_agc_rpt & 0xc0;
report = report>>6; report >>= 6;
switch (report) { switch (report) {
case 0x3: case 0x3:
rx_pwr_all = -35 - (pcck_buf->cck_agc_rpt & rx_pwr_all = -35 - (pcck_buf->cck_agc_rpt &
...@@ -1547,7 +1547,7 @@ static void rtl8192_query_rxphystatus( ...@@ -1547,7 +1547,7 @@ static void rtl8192_query_rxphystatus(
} }
} else { } else {
report = pcck_buf->cck_agc_rpt & 0x60; report = pcck_buf->cck_agc_rpt & 0x60;
report = report>>5; report >>= 5;
switch (report) { switch (report) {
case 0x3: case 0x3:
rx_pwr_all = -35 - rx_pwr_all = -35 -
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment