Re: [PATCH] usb: image: mdc800: fixed various style issues

2015-04-28 Thread Greg KH
On Thu, Apr 23, 2015 at 05:59:01PM -0600, Jason Eastman wrote:
> Fixed several style issues with: comments, function perenthesis,
> indentation, and conditional braces
> 
> Signed-off-by: Jason Eastman 
> ---
>  drivers/usb/image/mdc800.c |  769 
> +++-
>  1 file changed, 336 insertions(+), 433 deletions(-)

That's a lot to fix all at "once", please break this up in to different
patches, each one only doing one thing at a time.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] usb: image: mdc800: fixed various style issues

2015-04-24 Thread Varka Bhadram
On 04/24/2015 05:29 AM, Jason Eastman wrote:
> Fixed several style issues with: comments, function perenthesis,
> indentation, and conditional braces
>
> Signed-off-by: Jason Eastman 
> ---
>  drivers/usb/image/mdc800.c |  769 
> +++-
>  1 file changed, 336 insertions(+), 433 deletions(-)
>
> diff --git a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c
> index 5cf2633..c9b9ec0 100644
> --- a/drivers/usb/image/mdc800.c
> +++ b/drivers/usb/image/mdc800.c
> @@ -29,19 +29,19 @@
>   * mknod /dev/mustek c 180 32
>   *
>   * The driver supports only one camera.
> - * 
> + *
>   * Fix: mdc800 used sleep_on and slept with io_lock held.
>   * Converted sleep_on to waitqueues with schedule_timeout and made io_lock
>   * a semaphore from a spinlock.
>   * by Oliver Neukum 
>   * (02/12/2001)
> - * 
> + *
>   * Identify version on module load.
>   * (08/04/2001) gb
>   *
>   * version 0.7.5
>   * Fixed potential SMP races with Spinlocks.
> - * Thanks to Oliver Neukum  who 
> + * Thanks to Oliver Neukum  who
>   * noticed the race conditions.
>   * (30/10/2000)
>   *
> @@ -108,7 +108,7 @@
>  #define DRIVER_DESC "USB Driver for Mustek MDC800 Digital Camera"
>  
>  /* Vendor and Product Information */
> -#define MDC800_VENDOR_ID 0x055f
> +#define MDC800_VENDOR_ID 0x055f
>  #define MDC800_PRODUCT_ID0xa800
>  
>  /* Timeouts (msec) */
> @@ -116,7 +116,7 @@
>  #define TO_DOWNLOAD_GET_BUSY 1500
>  #define TO_WRITE_GET_READY   1000
>  #define TO_DEFAULT_COMMAND   5000
> -#define TO_READ_FROM_IRQ TO_DEFAULT_COMMAND
> +#define TO_READ_FROM_IRQ TO_DEFAULT_COMMAND
>  #define TO_GET_READY TO_DEFAULT_COMMAND
>  
>  /* Minor Number of the device (create with mknod /dev/mustek c 180 32) */
> @@ -134,124 +134,119 @@ typedef enum {
>  
>  
>  /* Data for the driver */
> -struct mdc800_data
> -{
> - struct usb_device * dev;// Device Data
> - mdc800_statestate;
> +struct mdc800_data {
> + struct usb_device   *dev;   /* Device Data */
> + mdc800_statestate;
>  
>   unsigned intendpoint [4];
>  
> - struct urb *irq_urb;
> + struct urb  *irq_urb;
>   wait_queue_head_t   irq_wait;
>   int irq_woken;
> - char*   irq_urb_buffer;
> + char*irq_urb_buffer;
>  
> - int camera_busy;  // is camera busy ?
> - int camera_request_ready; // Status to synchronize 
> with irq
> - charcamera_response [8];  // last Bytes send after 
> busy
> + int camera_busy;  /* is camera busy ? */
> + int camera_request_ready; /* Status to synchronize 
> with irq */
> + charcamera_response[8];  /* last Bytes send after 
> busy */
>  
> - struct urb *write_urb;
> - char*   write_urb_buffer;
> + struct urb  *write_urb;
> + char*write_urb_buffer;
>   wait_queue_head_t   write_wait;
>   int written;
>  
>  
> - struct urb *download_urb;
> - char*   download_urb_buffer;
> + struct urb  *download_urb;
> + char*download_urb_buffer;
>   wait_queue_head_t   download_wait;
>   int downloaded;
> - int download_left;  // Bytes left to 
> download ?
> + int download_left;  /* Bytes left to 
> download ? */
>  
>  
>   /* Device Data */
> - charout [64];   // Answer Buffer
> - int out_ptr;// Index to the first not 
> readen byte
> - int out_count;  // Bytes in the buffer
> + charout[64];/* Answer Buffer */
> + int out_ptr;/* Index to the first not 
> readen byte */
> + int out_count;  /* Bytes in the buffer */
>  
> - int open;   // Camera device open ?
> - struct mutexio_lock;// IO -lock
> + int open;   /* Camera device open ? */
> + struct mutexio_lock;/* IO -lock */
>  
> - charin [8]; // Command Input Buffer
> - int in_count;
> + charin[8];  /* Command Input Buffer */
> + int in_count;
>  
> - int pic_index;  // Cache for the Imagesize (-1 
> for nothing cached )
> + int pic_index;  /* Cache for the Imagesize (-1 
> for nothing cached ) */
>   int   

[PATCH] usb: image: mdc800: fixed various style issues

2015-04-23 Thread Jason Eastman
Fixed several style issues with: comments, function perenthesis,
indentation, and conditional braces

Signed-off-by: Jason Eastman 
---
 drivers/usb/image/mdc800.c |  769 +++-
 1 file changed, 336 insertions(+), 433 deletions(-)

diff --git a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c
index 5cf2633..c9b9ec0 100644
--- a/drivers/usb/image/mdc800.c
+++ b/drivers/usb/image/mdc800.c
@@ -29,19 +29,19 @@
  * mknod /dev/mustek c 180 32
  *
  * The driver supports only one camera.
- * 
+ *
  * Fix: mdc800 used sleep_on and slept with io_lock held.
  * Converted sleep_on to waitqueues with schedule_timeout and made io_lock
  * a semaphore from a spinlock.
  * by Oliver Neukum 
  * (02/12/2001)
- * 
+ *
  * Identify version on module load.
  * (08/04/2001) gb
  *
  * version 0.7.5
  * Fixed potential SMP races with Spinlocks.
- * Thanks to Oliver Neukum  who 
+ * Thanks to Oliver Neukum  who
  * noticed the race conditions.
  * (30/10/2000)
  *
@@ -108,7 +108,7 @@
 #define DRIVER_DESC "USB Driver for Mustek MDC800 Digital Camera"
 
 /* Vendor and Product Information */
-#define MDC800_VENDOR_ID   0x055f
+#define MDC800_VENDOR_ID   0x055f
 #define MDC800_PRODUCT_ID  0xa800
 
 /* Timeouts (msec) */
@@ -116,7 +116,7 @@
 #define TO_DOWNLOAD_GET_BUSY   1500
 #define TO_WRITE_GET_READY 1000
 #define TO_DEFAULT_COMMAND 5000
-#define TO_READ_FROM_IRQ   TO_DEFAULT_COMMAND
+#define TO_READ_FROM_IRQ   TO_DEFAULT_COMMAND
 #define TO_GET_READY   TO_DEFAULT_COMMAND
 
 /* Minor Number of the device (create with mknod /dev/mustek c 180 32) */
@@ -134,124 +134,119 @@ typedef enum {
 
 
 /* Data for the driver */
-struct mdc800_data
-{
-   struct usb_device * dev;// Device Data
-   mdc800_statestate;
+struct mdc800_data {
+   struct usb_device   *dev;   /* Device Data */
+   mdc800_statestate;
 
unsigned intendpoint [4];
 
-   struct urb *irq_urb;
+   struct urb  *irq_urb;
wait_queue_head_t   irq_wait;
int irq_woken;
-   char*   irq_urb_buffer;
+   char*irq_urb_buffer;
 
-   int camera_busy;  // is camera busy ?
-   int camera_request_ready; // Status to synchronize 
with irq
-   charcamera_response [8];  // last Bytes send after 
busy
+   int camera_busy;  /* is camera busy ? */
+   int camera_request_ready; /* Status to synchronize 
with irq */
+   charcamera_response[8];  /* last Bytes send after 
busy */
 
-   struct urb *write_urb;
-   char*   write_urb_buffer;
+   struct urb  *write_urb;
+   char*write_urb_buffer;
wait_queue_head_t   write_wait;
int written;
 
 
-   struct urb *download_urb;
-   char*   download_urb_buffer;
+   struct urb  *download_urb;
+   char*download_urb_buffer;
wait_queue_head_t   download_wait;
int downloaded;
-   int download_left;  // Bytes left to 
download ?
+   int download_left;  /* Bytes left to 
download ? */
 
 
/* Device Data */
-   charout [64];   // Answer Buffer
-   int out_ptr;// Index to the first not 
readen byte
-   int out_count;  // Bytes in the buffer
+   charout[64];/* Answer Buffer */
+   int out_ptr;/* Index to the first not 
readen byte */
+   int out_count;  /* Bytes in the buffer */
 
-   int open;   // Camera device open ?
-   struct mutexio_lock;// IO -lock
+   int open;   /* Camera device open ? */
+   struct mutexio_lock;/* IO -lock */
 
-   charin [8]; // Command Input Buffer
-   int in_count;
+   charin[8];  /* Command Input Buffer */
+   int in_count;
 
-   int pic_index;  // Cache for the Imagesize (-1 
for nothing cached )
+   int pic_index;  /* Cache for the Imagesize (-1 
for nothing cached ) */
int pic_len;
int minor;
 };
 
 
 /* Specification of the Endpoints */
-static struct usb_endpoint_descriptor mdc800_ed [4] =
-{
-   { 
-   .bLength