qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 5/7] usb-uvc: Add spaces around &


From: Brad Hards
Subject: [Qemu-devel] [PATCH 5/7] usb-uvc: Add spaces around &
Date: Thu, 2 Jun 2011 15:41:08 +1000

As requested by Blue Swirl (2010-06-10 17:46:16)

Signed-off-by: Brad Hards <address@hidden>
---
 hw/usb-uvc.c |   30 +++++++++++++++++++-----------
 1 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/hw/usb-uvc.c b/hw/usb-uvc.c
index 5437a13..661eb1a 100644
--- a/hw/usb-uvc.c
+++ b/hw/usb-uvc.c
@@ -507,7 +507,7 @@ static int usb_uvc_handle_control(USBDevice *dev, USBPacket 
*p, int request,
         if (((index & 0xFF) == 0x01) && (((value & 0xFF00) == 0x0100) ||
                                             ((value & 0xFF00) == 0x0200))) {
             DPRINTF("USB Request: Get video control minimum setting "
-                    "attribute for interface %d\n", index&0xFF);
+                    "attribute for interface %d\n", index & 0xFF);
 
             if (length != 26) {
                 DPRINTF("USB Request: Requested %d bytes, expected 26 "
@@ -542,7 +542,8 @@ static int usb_uvc_handle_control(USBDevice *dev, USBPacket 
*p, int request,
             data[24] = 0x00;
             data[25] = 0x00;
             ret = 26;
-        } else if ((index&0xFF00) == 0x0400 && (value&0xFF00) == 0x0100) {
+        } else if (((index & 0xFF00) == 0x0400) &&
+                   ((value & 0xFF00) == 0x0100)) {
             /* Setting input */
             DPRINTF("USB Request: Asking for minimum input\n");
             if (length != 1) {
@@ -553,7 +554,8 @@ static int usb_uvc_handle_control(USBDevice *dev, USBPacket 
*p, int request,
 
             data[0] = 0;
             ret = 1;
-        } else if ((index&0xFF00) == 0x0500 && (value&0xFF00) == 0x0200) {
+        } else if (((index & 0xFF00) == 0x0500) &&
+                   ((value & 0xFF00) == 0x0200)) {
             /* PU_BRIGHTNESS_CONTROL of PROCESSING_UNIT */
             DPRINTF("USB Request: Asking for minimum brightness\n");
             if (length != 2) {
@@ -571,7 +573,7 @@ static int usb_uvc_handle_control(USBDevice *dev, USBPacket 
*p, int request,
         break;
     case UVCGetVideoControl | USB_UVC_GET_MAX:
         if (((index & 0xFF) == 0x01) && (((value & 0xFF00) == 0x0100) ||
-                                            ((value & 0xFF00) == 0x0200))) {
+                                         ((value & 0xFF00) == 0x0200))) {
             DPRINTF("USB Request: Get video control maximum setting "
                     "attribute for interface %d\n", index & 0xFF);
 
@@ -620,7 +622,8 @@ static int usb_uvc_handle_control(USBDevice *dev, USBPacket 
*p, int request,
 
             data[0] = 1;
             ret = 1;
-        } else if ((index&0xFF00) == 0x0500 && (value&0xFF00) == 0x0200) {
+        } else if (((index & 0xFF00) == 0x0500) &&
+                   ((value & 0xFF00) == 0x0200)) {
             /* PU_BRIGHTNESS_CONTROL of PROCESSING_UNIT */
             DPRINTF("USB Request: Asking for maximum brightness\n");
             if (length != 2) {
@@ -640,7 +643,7 @@ static int usb_uvc_handle_control(USBDevice *dev, USBPacket 
*p, int request,
         if (((index & 0xFF) == 0x01) &&
             ((value & 0xFF00) == 0x0100 || (value & 0xFF00) == 0x0200)) {
             DPRINTF("USB Request: Get video control default setting "
-                    "attribute for interface %d\n", index&0xFF);
+                    "attribute for interface %d\n", index & 0xFF);
 
             if (length != 26) {
                 DPRINTF("USB Request: Requested %d bytes, expected 26 "
@@ -675,7 +678,8 @@ static int usb_uvc_handle_control(USBDevice *dev, USBPacket 
*p, int request,
             data[24] = 0x00;
             data[25] = 0x00;
             ret = 26;
-        } else if ((index&0xFF00) == 0x0400 && (value&0xFF00) == 0x0100) {
+        } else if (((index & 0xFF00) == 0x0400) &&
+                   ((value & 0xFF00) == 0x0100)) {
             /* Setting input */
             DPRINTF("USB Request: Asking for default input\n");
             if (length != 1) {
@@ -686,7 +690,8 @@ static int usb_uvc_handle_control(USBDevice *dev, USBPacket 
*p, int request,
 
             data[0] = 0;
             ret = 1;
-        } else if ((index&0xFF00) == 0x0500 && (value&0xFF00) == 0x0200) {
+        } else if (((index & 0xFF00) == 0x0500) &&
+                   ((value & 0xFF00) == 0x0200)) {
             /* PU_BRIGHTNESS_CONTROL of PROCESSING_UNIT */
             DPRINTF("USB Request: Asking for default brightness\n");
             if (length != 2) {
@@ -741,7 +746,8 @@ static int usb_uvc_handle_control(USBDevice *dev, USBPacket 
*p, int request,
             first_bulk_packet = 1;
 
             ret = 26;
-        } else if ((index&0xFF00) == 0x0400 && (value&0xFF00) == 0x0100) {
+        } else if (((index & 0xFF00) == 0x0400) && 
+                    ((value & 0xFF00) == 0x0100)) {
             /* Setting input */
             DPRINTF("Setting input to %d\n", data[0]);
             if (length != 1) {
@@ -752,7 +758,8 @@ static int usb_uvc_handle_control(USBDevice *dev, USBPacket 
*p, int request,
 
             s->current_input = data[0];
             ret = 1;
-        } else if ((index&0xFF00) == 0x0500 && (value&0xFF00) == 0x0200) {
+        } else if (((index & 0xFF00) == 0x0500) &&
+                   ((value & 0xFF00) == 0x0200)) {
             /* PU_BRIGHTNESS_CONTROL of PROCESSING_UNIT */
             DPRINTF("USB Request: Setting brightness, "
                     "value stays the same\n");
@@ -768,7 +775,8 @@ static int usb_uvc_handle_control(USBDevice *dev, USBPacket 
*p, int request,
         }
         break;
     case UVCGetVideoControl | USB_UVC_GET_RES:
-        if ((index&0xFF00) == 0x0500 && (value&0xFF00) == 0x0200) {
+        if (((index & 0xFF00) == 0x0500) &&
+            ((value & 0xFF00) == 0x0200)) {
             /* PU_BRIGHTNESS_CONTROL of PROCESSING_UNIT */
             DPRINTF("USB Request: Asking for brightness resolution\n");
             if (length != 2) {
-- 
1.7.4.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]