Re: [PATCH v2 10/14] USB: ch341: fix coding style
From: Joe Perches
Date: Sat Apr 02 2016 - 13:31:07 EST
On Sat, 2016-04-02 at 19:07 +0200, Grigori Goronzy wrote:
> No functional change. The following adjustments were made to be more in
> line with official coding style and to be more consistent.
>
> Stop mixing tabs and spaces for alignment. Align continuations in
> function prototypes correctly. Be more consistent with indentation of
> statements broken into multiple lines. Break some long lines properly.
> Stop putting labels and statements into the same line. Use braces
> consistently for a single statement.
Most of the whitespace only changes are undesired.
Multi-line statements here are using alignment to
open parenthesis which for some is the preferred
style.
> > diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c
[]
> @@ -108,11 +108,11 @@ static int ch341_control_out(struct usb_device *dev, u8 request,
> int r;
>
> dev_dbg(&dev->dev, "ch341_control_out(%02x,%02x,%04x,%04x)\n",
> - USB_DIR_OUT|0x40, (int)request, (int)value, (int)index);
> + USB_DIR_OUT|0x40, (int)request, (int)value, (int)index);
>
> r = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), request,
> - USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
> - value, index, NULL, 0, DEFAULT_TIMEOUT);
> + USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
> + value, index, NULL, 0, DEFAULT_TIMEOUT);
The original code is fine.
etc.