Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751918AbdHCUvp (ORCPT ); Thu, 3 Aug 2017 16:51:45 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34068 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751700AbdHCUvn (ORCPT ); Thu, 3 Aug 2017 16:51:43 -0400 From: Himanshu Jha To: johan@kernel.org Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Himanshu Jha Subject: [PATCH] Drivers: usb: serial: Replace unsigned to unsigned int and fix line over 80 characters Date: Fri, 4 Aug 2017 02:21:13 +0530 Message-Id: <1501793473-32107-1-git-send-email-himanshujha199640@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2826 Lines: 83 This patch fixes the following checkpatch.pl warnings: WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line WARNING: Prefer 'unsigned int' to bare use of 'unsigned' WARNING: Missing a blank line after declarations WARNING: line over 80 characters Signed-off-by: Himanshu Jha --- drivers/usb/serial/ch341.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index 351745a..f4ee53c 100644 --- a/drivers/usb/serial/ch341.c +++ b/drivers/usb/serial/ch341.c @@ -43,8 +43,10 @@ /* second interrupt byte */ #define CH341_MULT_STAT 0x04 /* multiple status since last interrupt event */ -/* status returned in third interrupt answer byte, inverted in data - from irq */ +/* + * status returned in third interrupt answer byte, inverted in data + * from irq + */ #define CH341_BIT_CTS 0x01 #define CH341_BIT_DSR 0x02 #define CH341_BIT_RI 0x04 @@ -92,7 +94,7 @@ MODULE_DEVICE_TABLE(usb, id_table); struct ch341_private { spinlock_t lock; /* access lock */ - unsigned baud_rate; /* set baud rate */ + unsigned int baud_rate; /* set baud rate */ u8 mcr; u8 msr; u8 lcr; @@ -121,7 +123,7 @@ static int ch341_control_out(struct usb_device *dev, u8 request, static int ch341_control_in(struct usb_device *dev, u8 request, u16 value, u16 index, - char *buf, unsigned bufsize) + char *buf, unsigned int bufsize) { int r; @@ -289,6 +291,7 @@ static int ch341_port_remove(struct usb_serial_port *port) static int ch341_carrier_raised(struct usb_serial_port *port) { struct ch341_private *priv = usb_get_serial_port_data(port); + if (priv->msr & CH341_BIT_DCD) return 1; return 0; @@ -358,7 +361,7 @@ static void ch341_set_termios(struct tty_struct *tty, struct usb_serial_port *port, struct ktermios *old_termios) { struct ch341_private *priv = usb_get_serial_port_data(port); - unsigned baud_rate; + unsigned int baud_rate; unsigned long flags; u8 lcr; int r; @@ -442,11 +445,13 @@ static void ch341_break_ctl(struct tty_struct *tty, int break_state) dev_dbg(&port->dev, "%s - initial ch341 break register contents - reg1: %x, reg2: %x\n", __func__, break_reg[0], break_reg[1]); if (break_state != 0) { - dev_dbg(&port->dev, "%s - Enter break state requested\n", __func__); + dev_dbg(&port->dev, "%s - Enter break state requested\n", + __func__); break_reg[0] &= ~CH341_NBREAK_BITS; break_reg[1] &= ~CH341_LCR_ENABLE_TX; } else { - dev_dbg(&port->dev, "%s - Leave break state requested\n", __func__); + dev_dbg(&port->dev, "%s - Leave break state requested\n", + __func__); break_reg[0] |= CH341_NBREAK_BITS; break_reg[1] |= CH341_LCR_ENABLE_TX; } -- 2.7.4