diff options
author | Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> | 2015-02-26 11:45:51 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-26 15:24:16 -0800 |
commit | 410c944eda7287a3c68e7e5886ad4280467b2a5b (patch) | |
tree | a3c39ae07e58e41d27c8567c77b4480b31081071 /drivers/staging/emxx_udc | |
parent | 1525ecfce19b56e8c26b52d15f7b4617c9f503ba (diff) | |
download | linux-410c944eda7287a3c68e7e5886ad4280467b2a5b.tar.gz linux-410c944eda7287a3c68e7e5886ad4280467b2a5b.tar.bz2 linux-410c944eda7287a3c68e7e5886ad4280467b2a5b.zip |
staging: emxx_udc: 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>
Diffstat (limited to 'drivers/staging/emxx_udc')
-rw-r--r-- | drivers/staging/emxx_udc/emxx_udc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c index 6c1de2770e6a..ee8f69f69eac 100644 --- a/drivers/staging/emxx_udc/emxx_udc.c +++ b/drivers/staging/emxx_udc/emxx_udc.c @@ -1454,7 +1454,7 @@ static int _nbu2ss_set_feature_device( break; case USB_DEVICE_TEST_MODE: - wIndex = wIndex >> 8; + wIndex >>= 8; if (wIndex <= MAX_TEST_MODE_NUM) result = 0; break; @@ -1671,7 +1671,7 @@ static int std_req_set_address(struct nbu2ss_udc *udc) if (wValue != (wValue & 0x007F)) return -EINVAL; - wValue = wValue << USB_ADRS_SHIFT; + wValue <<= USB_ADRS_SHIFT; _nbu2ss_writel(&udc->p_regs->USB_ADDRESS, wValue); _nbu2ss_create_ep0_packet(udc, udc->ep0_buf, 0); |