public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] drivers/usb/image/mdc800.c: Remove "typdef enum".
@ 2011-04-17 22:34 Thiago Farina
  2011-04-18  0:54 ` Wanlong Gao
  2011-04-18  4:28 ` Harry Wei
  0 siblings, 2 replies; 8+ messages in thread
From: Thiago Farina @ 2011-04-17 22:34 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, Arnd Bergmann, linux-usb, Thiago Farina

Instead use the keyword "enum" where we use it.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
---
 drivers/usb/image/mdc800.c |  111 +++++++++++++++++++++----------------------
 1 files changed, 54 insertions(+), 57 deletions(-)

diff --git a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c
index 575b56c..4b0a032 100644
--- a/drivers/usb/image/mdc800.c
+++ b/drivers/usb/image/mdc800.c
@@ -122,59 +122,57 @@
 /* Minor Number of the device (create with mknod /dev/mustek c 180 32) */
 #define MDC800_DEVICE_MINOR_BASE 32
 
+/*
+ * Data and structs.
+ */
 
-/**************************************************************************
-	Data and structs
-***************************************************************************/
-
-
-typedef enum {
+enum mdc800_state {
 	NOT_CONNECTED, READY, WORKING, DOWNLOAD
-} mdc800_state;
+};
 
 
-/* Data for the driver */
+/* Data for the driver. */
 struct mdc800_data
 {
-	struct usb_device *	dev;			// Device Data
-	mdc800_state 		state;
+	struct usb_device*      dev;                  /* Device Data. */
+	enum mdc800_state	state;
 
-	unsigned int		endpoint [4];
+	unsigned int		endpoint[4];
 
-	struct urb *		irq_urb;
+	struct urb*             irq_urb;
 	wait_queue_head_t	irq_wait;
 	int			irq_woken;
 	char*			irq_urb_buffer;
 
-	int			camera_busy;          // is camera busy ?
-	int 			camera_request_ready; // Status to synchronize with irq
-	char 			camera_response [8];  // last Bytes send after busy
+	int			camera_busy;          /* Is camera busy? */
+	int			camera_request_ready; /* Status to synchronize with irq. */
+	char			camera_response[8];   /* last Bytes send after busy. */
 
-	struct urb *   		write_urb;
+	struct urb*             write_urb;
 	char*			write_urb_buffer;
 	wait_queue_head_t	write_wait;
 	int			written;
 
 
-	struct urb *   		download_urb;
+	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 */
-	char			out [64];	// Answer Buffer
-	int 			out_ptr;	// Index to the first not readen byte
-	int			out_count;	// Bytes in the buffer
+	char			out[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 mutex		io_lock;	// IO -lock
+	int			open;		/* Camera device open. */
+	struct mutex		io_lock;	/* IO -lock. */
 
-	char 			in [8];		// Command Input Buffer
-	int  			in_count;
+	char			in [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;
 };
@@ -183,52 +181,51 @@ struct mdc800_data
 /* Specification of the Endpoints */
 static struct usb_endpoint_descriptor mdc800_ed [4] =
 {
-	{ 
-		.bLength = 		0,
+	{
+		.bLength =		0,
 		.bDescriptorType =	0,
 		.bEndpointAddress =	0x01,
-		.bmAttributes = 	0x02,
+		.bmAttributes =         0x02,
 		.wMaxPacketSize =	cpu_to_le16(8),
-		.bInterval = 		0,
-		.bRefresh = 		0,
-		.bSynchAddress = 	0,
+		.bInterval =		0,
+		.bRefresh =		0,
+		.bSynchAddress =	0,
 	},
 	{
-		.bLength = 		0,
-		.bDescriptorType = 	0,
-		.bEndpointAddress = 	0x82,
-		.bmAttributes = 	0x03,
-		.wMaxPacketSize = 	cpu_to_le16(8),
-		.bInterval = 		0,
-		.bRefresh = 		0,
-		.bSynchAddress = 	0,
+		.bLength =		0,
+		.bDescriptorType =	0,
+		.bEndpointAddress =	0x82,
+		.bmAttributes =         0x03,
+		.wMaxPacketSize =	cpu_to_le16(8),
+		.bInterval =		0,
+		.bRefresh =		0,
+		.bSynchAddress =	0,
 	},
 	{
-		.bLength = 		0,
-		.bDescriptorType = 	0,
-		.bEndpointAddress = 	0x03,
-		.bmAttributes = 	0x02,
-		.wMaxPacketSize = 	cpu_to_le16(64),
-		.bInterval = 		0,
-		.bRefresh = 		0,
-		.bSynchAddress = 	0,
+		.bLength =		0,
+		.bDescriptorType =	0,
+		.bEndpointAddress =	0x03,
+		.bmAttributes =         0x02,
+		.wMaxPacketSize =	cpu_to_le16(64),
+		.bInterval =		0,
+		.bRefresh =		0,
+		.bSynchAddress =	0,
 	},
 	{
-		.bLength = 		0,
-		.bDescriptorType = 	0,
-		.bEndpointAddress = 	0x84,
-		.bmAttributes = 	0x02,
-		.wMaxPacketSize = 	cpu_to_le16(64),
-		.bInterval = 		0,
-		.bRefresh = 		0,
-		.bSynchAddress = 	0,
+		.bLength =		0,
+		.bDescriptorType =	0,
+		.bEndpointAddress =     0x84,
+		.bmAttributes =         0x02,
+		.wMaxPacketSize =	cpu_to_le16(64),
+		.bInterval =		0,
+		.bRefresh =		0,
+		.bSynchAddress =	0,
 	},
 };
 
 /* The Variable used by the driver */
 static struct mdc800_data* mdc800;
 
-
 /***************************************************************************
 	The USB Part of the driver
 ****************************************************************************/
-- 
1.7.3.2.343.g7d43d


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] drivers/usb/image/mdc800.c: Remove "typdef enum".
  2011-04-17 22:34 [PATCH 1/1] drivers/usb/image/mdc800.c: Remove "typdef enum" Thiago Farina
@ 2011-04-18  0:54 ` Wanlong Gao
  2011-04-18  4:09   ` Thiago Farina
  2011-04-18  7:26   ` Oliver Neukum
  2011-04-18  4:28 ` Harry Wei
  1 sibling, 2 replies; 8+ messages in thread
From: Wanlong Gao @ 2011-04-18  0:54 UTC (permalink / raw)
  To: Thiago Farina; +Cc: linux-kernel, Greg Kroah-Hartman, Arnd Bergmann, linux-usb

On 4/18/11, Thiago Farina <tfransosi@gmail.com> wrote:
> Instead use the keyword "enum" where we use it.
>
> Signed-off-by: Thiago Farina <tfransosi@gmail.com>
> ---
>  drivers/usb/image/mdc800.c |  111
> +++++++++++++++++++++----------------------
>  1 files changed, 54 insertions(+), 57 deletions(-)
>
> diff --git a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c
> index 575b56c..4b0a032 100644
> --- a/drivers/usb/image/mdc800.c
> +++ b/drivers/usb/image/mdc800.c
> @@ -122,59 +122,57 @@
>  /* Minor Number of the device (create with mknod /dev/mustek c 180 32) */
>  #define MDC800_DEVICE_MINOR_BASE 32
>
> +/*
> + * Data and structs.
> + */
>
> -/**************************************************************************
> -	Data and structs
> -***************************************************************************/
> -
> -
> -typedef enum {
> +enum mdc800_state {
>  	NOT_CONNECTED, READY, WORKING, DOWNLOAD
> -} mdc800_state;
> +};
>
>
> -/* Data for the driver */
> +/* Data for the driver. */
>  struct mdc800_data
>  {
> -	struct usb_device *	dev;			// Device Data
> -	mdc800_state 		state;
> +	struct usb_device*      dev;                  /* Device Data. */
> +	enum mdc800_state	state;
>
> -	unsigned int		endpoint [4];
> +	unsigned int		endpoint[4];
>
> -	struct urb *		irq_urb;
> +	struct urb*             irq_urb;
>  	wait_queue_head_t	irq_wait;
>  	int			irq_woken;
>  	char*			irq_urb_buffer;
>
> -	int			camera_busy;          // is camera busy ?
> -	int 			camera_request_ready; // Status to synchronize with irq
> -	char 			camera_response [8];  // last Bytes send after busy
> +	int			camera_busy;          /* Is camera busy? */
> +	int			camera_request_ready; /* Status to synchronize with irq. */
> +	char			camera_response[8];   /* last Bytes send after busy. */
>
> -	struct urb *   		write_urb;
> +	struct urb*             write_urb;
>  	char*			write_urb_buffer;
>  	wait_queue_head_t	write_wait;
>  	int			written;
>
>
> -	struct urb *   		download_urb;
> +	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 */
> -	char			out [64];	// Answer Buffer
> -	int 			out_ptr;	// Index to the first not readen byte
> -	int			out_count;	// Bytes in the buffer
> +	char			out[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 mutex		io_lock;	// IO -lock
> +	int			open;		/* Camera device open. */
> +	struct mutex		io_lock;	/* IO -lock. */
>
> -	char 			in [8];		// Command Input Buffer
> -	int  			in_count;
> +	char			in [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;
>  };
> @@ -183,52 +181,51 @@ struct mdc800_data
>  /* Specification of the Endpoints */
>  static struct usb_endpoint_descriptor mdc800_ed [4] =
>  {
> -	{
> -		.bLength = 		0,
> +	{
> +		.bLength =		0,
>  		.bDescriptorType =	0,
>  		.bEndpointAddress =	0x01,
> -		.bmAttributes = 	0x02,
> +		.bmAttributes =         0x02,
>  		.wMaxPacketSize =	cpu_to_le16(8),
> -		.bInterval = 		0,
> -		.bRefresh = 		0,
> -		.bSynchAddress = 	0,
> +		.bInterval =		0,
> +		.bRefresh =		0,
> +		.bSynchAddress =	0,
>  	},
>  	{
> -		.bLength = 		0,
> -		.bDescriptorType = 	0,
> -		.bEndpointAddress = 	0x82,
> -		.bmAttributes = 	0x03,
> -		.wMaxPacketSize = 	cpu_to_le16(8),
> -		.bInterval = 		0,
> -		.bRefresh = 		0,
> -		.bSynchAddress = 	0,
> +		.bLength =		0,
> +		.bDescriptorType =	0,
> +		.bEndpointAddress =	0x82,
> +		.bmAttributes =         0x03,
> +		.wMaxPacketSize =	cpu_to_le16(8),
> +		.bInterval =		0,
> +		.bRefresh =		0,
> +		.bSynchAddress =	0,
>  	},
>  	{
> -		.bLength = 		0,
> -		.bDescriptorType = 	0,
> -		.bEndpointAddress = 	0x03,
> -		.bmAttributes = 	0x02,
> -		.wMaxPacketSize = 	cpu_to_le16(64),
> -		.bInterval = 		0,
> -		.bRefresh = 		0,
> -		.bSynchAddress = 	0,
> +		.bLength =		0,
> +		.bDescriptorType =	0,
> +		.bEndpointAddress =	0x03,
> +		.bmAttributes =         0x02,
> +		.wMaxPacketSize =	cpu_to_le16(64),
> +		.bInterval =		0,
> +		.bRefresh =		0,
> +		.bSynchAddress =	0,
>  	},
>  	{
> -		.bLength = 		0,
> -		.bDescriptorType = 	0,
> -		.bEndpointAddress = 	0x84,
> -		.bmAttributes = 	0x02,
> -		.wMaxPacketSize = 	cpu_to_le16(64),
> -		.bInterval = 		0,
> -		.bRefresh = 		0,
> -		.bSynchAddress = 	0,
> +		.bLength =		0,
> +		.bDescriptorType =	0,
> +		.bEndpointAddress =     0x84,
> +		.bmAttributes =         0x02,
> +		.wMaxPacketSize =	cpu_to_le16(64),
> +		.bInterval =		0,
> +		.bRefresh =		0,
> +		.bSynchAddress =	0,
>  	},
>  };
>
>  /* The Variable used by the driver */
>  static struct mdc800_data* mdc800;
>
> -
> /***************************************************************************
>  	The USB Part of the driver
> ****************************************************************************/
> --
> 1.7.3.2.343.g7d43d
>
Why did you change it ? and why change so many lines ?
It had some thing wrong ?
Thanks
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] drivers/usb/image/mdc800.c: Remove "typdef enum".
  2011-04-18  0:54 ` Wanlong Gao
@ 2011-04-18  4:09   ` Thiago Farina
  2011-04-18  4:22     ` Arnd Bergmann
  2011-04-18  7:26   ` Oliver Neukum
  1 sibling, 1 reply; 8+ messages in thread
From: Thiago Farina @ 2011-04-18  4:09 UTC (permalink / raw)
  To: wanlong.gao; +Cc: linux-kernel, Greg Kroah-Hartman, Arnd Bergmann, linux-usb

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 9179 bytes --]

On Sun, Apr 17, 2011 at 9:54 PM, Wanlong Gao <wanlong.gao@gmail.com> wrote:
> On 4/18/11, Thiago Farina <tfransosi@gmail.com> wrote:
>> Instead use the keyword "enum" where we use it.
>>
>> Signed-off-by: Thiago Farina <tfransosi@gmail.com>
>> ---
>>  drivers/usb/image/mdc800.c |  111
>> +++++++++++++++++++++----------------------
>>  1 files changed, 54 insertions(+), 57 deletions(-)
>>
>> diff --git a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c
>> index 575b56c..4b0a032 100644
>> --- a/drivers/usb/image/mdc800.c
>> +++ b/drivers/usb/image/mdc800.c
>> @@ -122,59 +122,57 @@
>>  /* Minor Number of the device (create with mknod /dev/mustek c 180 32) */
>>  #define MDC800_DEVICE_MINOR_BASE 32
>>
>> +/*
>> + * Data and structs.
>> + */
>>
>> -/**************************************************************************
>> -     Data and structs
>> -***************************************************************************/
>> -
>> -
>> -typedef enum {
>> +enum mdc800_state {
>>       NOT_CONNECTED, READY, WORKING, DOWNLOAD
>> -} mdc800_state;
>> +};
>>
>>
>> -/* Data for the driver */
>> +/* Data for the driver. */
>>  struct mdc800_data
>>  {
>> -     struct usb_device *     dev;                    // Device Data
>> -     mdc800_state            state;
>> +     struct usb_device*      dev;                  /* Device Data. */
>> +     enum mdc800_state       state;
>>
>> -     unsigned int            endpoint [4];
>> +     unsigned int            endpoint[4];
>>
>> -     struct urb *            irq_urb;
>> +     struct urb*             irq_urb;
>>       wait_queue_head_t       irq_wait;
>>       int                     irq_woken;
>>       char*                   irq_urb_buffer;
>>
>> -     int                     camera_busy;          // is camera busy ?
>> -     int                     camera_request_ready; // Status to synchronize with irq
>> -     char                    camera_response [8];  // last Bytes send after busy
>> +     int                     camera_busy;          /* Is camera busy? */
>> +     int                     camera_request_ready; /* Status to synchronize with irq. */
>> +     char                    camera_response[8];   /* last Bytes send after busy. */
>>
>> -     struct urb *            write_urb;
>> +     struct urb*             write_urb;
>>       char*                   write_urb_buffer;
>>       wait_queue_head_t       write_wait;
>>       int                     written;
>>
>>
>> -     struct urb *            download_urb;
>> +     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 */
>> -     char                    out [64];       // Answer Buffer
>> -     int                     out_ptr;        // Index to the first not readen byte
>> -     int                     out_count;      // Bytes in the buffer
>> +     char                    out[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 mutex            io_lock;        // IO -lock
>> +     int                     open;           /* Camera device open. */
>> +     struct mutex            io_lock;        /* IO -lock. */
>>
>> -     char                    in [8];         // Command Input Buffer
>> -     int                     in_count;
>> +     char                    in [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;
>>  };
>> @@ -183,52 +181,51 @@ struct mdc800_data
>>  /* Specification of the Endpoints */
>>  static struct usb_endpoint_descriptor mdc800_ed [4] =
>>  {
>> -     {
>> -             .bLength =              0,
>> +     {
>> +             .bLength =              0,
>>               .bDescriptorType =      0,
>>               .bEndpointAddress =     0x01,
>> -             .bmAttributes =         0x02,
>> +             .bmAttributes =         0x02,
>>               .wMaxPacketSize =       cpu_to_le16(8),
>> -             .bInterval =            0,
>> -             .bRefresh =             0,
>> -             .bSynchAddress =        0,
>> +             .bInterval =            0,
>> +             .bRefresh =             0,
>> +             .bSynchAddress =        0,
>>       },
>>       {
>> -             .bLength =              0,
>> -             .bDescriptorType =      0,
>> -             .bEndpointAddress =     0x82,
>> -             .bmAttributes =         0x03,
>> -             .wMaxPacketSize =       cpu_to_le16(8),
>> -             .bInterval =            0,
>> -             .bRefresh =             0,
>> -             .bSynchAddress =        0,
>> +             .bLength =              0,
>> +             .bDescriptorType =      0,
>> +             .bEndpointAddress =     0x82,
>> +             .bmAttributes =         0x03,
>> +             .wMaxPacketSize =       cpu_to_le16(8),
>> +             .bInterval =            0,
>> +             .bRefresh =             0,
>> +             .bSynchAddress =        0,
>>       },
>>       {
>> -             .bLength =              0,
>> -             .bDescriptorType =      0,
>> -             .bEndpointAddress =     0x03,
>> -             .bmAttributes =         0x02,
>> -             .wMaxPacketSize =       cpu_to_le16(64),
>> -             .bInterval =            0,
>> -             .bRefresh =             0,
>> -             .bSynchAddress =        0,
>> +             .bLength =              0,
>> +             .bDescriptorType =      0,
>> +             .bEndpointAddress =     0x03,
>> +             .bmAttributes =         0x02,
>> +             .wMaxPacketSize =       cpu_to_le16(64),
>> +             .bInterval =            0,
>> +             .bRefresh =             0,
>> +             .bSynchAddress =        0,
>>       },
>>       {
>> -             .bLength =              0,
>> -             .bDescriptorType =      0,
>> -             .bEndpointAddress =     0x84,
>> -             .bmAttributes =         0x02,
>> -             .wMaxPacketSize =       cpu_to_le16(64),
>> -             .bInterval =            0,
>> -             .bRefresh =             0,
>> -             .bSynchAddress =        0,
>> +             .bLength =              0,
>> +             .bDescriptorType =      0,
>> +             .bEndpointAddress =     0x84,
>> +             .bmAttributes =         0x02,
>> +             .wMaxPacketSize =       cpu_to_le16(64),
>> +             .bInterval =            0,
>> +             .bRefresh =             0,
>> +             .bSynchAddress =        0,
>>       },
>>  };
>>
>>  /* The Variable used by the driver */
>>  static struct mdc800_data* mdc800;
>>
>> -
>> /***************************************************************************
>>       The USB Part of the driver
>> ****************************************************************************/
>> --
>> 1.7.3.2.343.g7d43d
>>
> Why did you change it ?

To get rid of the typedef?

> and why change so many lines ?

Removed whitespaces, and converted // to /* */

> It had some thing wrong ?

Hum?
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] drivers/usb/image/mdc800.c: Remove "typdef enum".
  2011-04-18  4:09   ` Thiago Farina
@ 2011-04-18  4:22     ` Arnd Bergmann
  0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2011-04-18  4:22 UTC (permalink / raw)
  To: Thiago Farina; +Cc: wanlong.gao, linux-kernel, Greg Kroah-Hartman, linux-usb

On Monday 18 April 2011, Thiago Farina wrote:

> > and why change so many lines ?
> 
> Removed whitespaces, and converted // to /* */

You forgot to list these in the changelog.

	Arnd

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] drivers/usb/image/mdc800.c: Remove "typdef enum".
  2011-04-17 22:34 [PATCH 1/1] drivers/usb/image/mdc800.c: Remove "typdef enum" Thiago Farina
  2011-04-18  0:54 ` Wanlong Gao
@ 2011-04-18  4:28 ` Harry Wei
  1 sibling, 0 replies; 8+ messages in thread
From: Harry Wei @ 2011-04-18  4:28 UTC (permalink / raw)
  To: Thiago Farina; +Cc: linux-kernel, wanlong.gao

On Sun, Apr 17, 2011 at 07:34:14PM -0300, Thiago Farina wrote:
> Instead use the keyword "enum" where we use it.
> 
> Signed-off-by: Thiago Farina <tfransosi@gmail.com>
> ---
>  drivers/usb/image/mdc800.c |  111 +++++++++++++++++++++----------------------
This is well for me.
>  	NOT_CONNECTED, READY, WORKING, DOWNLOAD
> -} mdc800_state;
> +};
>  
>  
> -/* Data for the driver */
> +/* Data for the driver. */
>  struct mdc800_data
>  {
> -	struct usb_device *	dev;			// Device Data
> -	mdc800_state 		state;
> +	struct usb_device*      dev;                  /* Device Data. */
This should be 'struct usb_device	*dev'. The same as
following. See Documentation/CodingStyle for details.
> +	enum mdc800_state	state;
>  
> -	unsigned int		endpoint [4];
> +	unsigned int		endpoint[4];
>  
> -	struct urb *		irq_urb;
> +	struct urb*             irq_urb;
>  	wait_queue_head_t	irq_wait;

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] drivers/usb/image/mdc800.c: Remove "typdef enum".
  2011-04-18  0:54 ` Wanlong Gao
  2011-04-18  4:09   ` Thiago Farina
@ 2011-04-18  7:26   ` Oliver Neukum
  2011-04-18 17:27     ` Wanlong Gao
  1 sibling, 1 reply; 8+ messages in thread
From: Oliver Neukum @ 2011-04-18  7:26 UTC (permalink / raw)
  To: wanlong.gao
  Cc: Thiago Farina, linux-kernel, Greg Kroah-Hartman, Arnd Bergmann,
	linux-usb

Am Montag, 18. April 2011, 02:54:16 schrieb Wanlong Gao:
> > -
> > /***************************************************************************
> >       The USB Part of the driver
> > ****************************************************************************/
> > --
> > 1.7.3.2.343.g7d43d
> >
> Why did you change it ? and why change so many lines ?
> It had some thing wrong ?

Exactly. This is a driver for legacy hardware. Could you leave it alone
unless you fix a real, as in makes a difference to code generation, bug?

	Regards
		Oliver

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] drivers/usb/image/mdc800.c: Remove "typdef enum".
  2011-04-18  7:26   ` Oliver Neukum
@ 2011-04-18 17:27     ` Wanlong Gao
  2011-04-19  7:09       ` Oliver Neukum
  0 siblings, 1 reply; 8+ messages in thread
From: Wanlong Gao @ 2011-04-18 17:27 UTC (permalink / raw)
  To: Oliver Neukum
  Cc: Thiago Farina, linux-kernel, Greg Kroah-Hartman, Arnd Bergmann,
	linux-usb

2011-4-18 15:26, Oliver Neukum wroted:
> Am Montag, 18. April 2011, 02:54:16 schrieb Wanlong Gao:
>>> -
>>> /***************************************************************************
>>>        The USB Part of the driver
>>> ****************************************************************************/
>>> --
>>> 1.7.3.2.343.g7d43d
>>>
>> Why did you change it ? and why change so many lines ?
>> It had some thing wrong ?
>
> Exactly. This is a driver for legacy hardware. Could you leave it alone
> unless you fix a real, as in makes a difference to code generation, bug?
>
> 	Regards
> 		Oliver
Hmm..Maybe he just want to make to code nice . and didn't think as more 
about this as you .

Thanks
Regards

	Wanlong Gao

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] drivers/usb/image/mdc800.c: Remove "typdef enum".
  2011-04-18 17:27     ` Wanlong Gao
@ 2011-04-19  7:09       ` Oliver Neukum
  0 siblings, 0 replies; 8+ messages in thread
From: Oliver Neukum @ 2011-04-19  7:09 UTC (permalink / raw)
  To: Wanlong Gao
  Cc: Thiago Farina, linux-kernel, Greg Kroah-Hartman, Arnd Bergmann,
	linux-usb

Am Montag, 18. April 2011, 19:27:35 schrieb Wanlong Gao:
> 2011-4-18 15:26, Oliver Neukum wroted:
> > Am Montag, 18. April 2011, 02:54:16 schrieb Wanlong Gao:
> >>> -
> >>> /***************************************************************************
> >>>        The USB Part of the driver
> >>> ****************************************************************************/
> >>> --
> >>> 1.7.3.2.343.g7d43d
> >>>
> >> Why did you change it ? and why change so many lines ?
> >> It had some thing wrong ?
> >
> > Exactly. This is a driver for legacy hardware. Could you leave it alone
> > unless you fix a real, as in makes a difference to code generation, bug?
> >
> > 	Regards
> > 		Oliver
> Hmm..Maybe he just want to make to code nice . and didn't think as more 
> about this as you .

Yes, I appreciate that, but the number of testers for these devices is low,
but there are still users.

	Regards
		Oliver

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-04-19  7:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-17 22:34 [PATCH 1/1] drivers/usb/image/mdc800.c: Remove "typdef enum" Thiago Farina
2011-04-18  0:54 ` Wanlong Gao
2011-04-18  4:09   ` Thiago Farina
2011-04-18  4:22     ` Arnd Bergmann
2011-04-18  7:26   ` Oliver Neukum
2011-04-18 17:27     ` Wanlong Gao
2011-04-19  7:09       ` Oliver Neukum
2011-04-18  4:28 ` Harry Wei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox