Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754785AbbLPQtl (ORCPT ); Wed, 16 Dec 2015 11:49:41 -0500 Received: from mail-pf0-f174.google.com ([209.85.192.174]:33143 "EHLO mail-pf0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754765AbbLPQti (ORCPT ); Wed, 16 Dec 2015 11:49:38 -0500 Subject: Re: [PATCH 02/11] tty: serial: 8250: Fix indentation warnings To: Anton Wuerfel References: <1450280177-4460-1-git-send-email-anton.wuerfel@fau.de> <1450280177-4460-3-git-send-email-anton.wuerfel@fau.de> Cc: linux-serial@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , "James E.J. Bottomley" , Helge Deller , Heikki Krogerus , Andy Shevchenko , Qipeng Zha , Desmond Liu , Wang Long , Matt Redfearn , Paul Burton , Ralf Baechle , Krzysztof Kozlowski , Peter Hung , Soeren Grunewald , Adam Lee , "Maciej S. Szmigiero" , Mans Rullgard , linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, linux-kernel@i4.cs.fau.de, Phillip Raffeck From: Peter Hurley Message-ID: <5671961F.2080304@hurleysoftware.com> Date: Wed, 16 Dec 2015 08:49:35 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <1450280177-4460-3-git-send-email-anton.wuerfel@fau.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5929 Lines: 160 Hi Anton, On 12/16/2015 07:36 AM, Anton Wuerfel wrote: > Checkpatch complains about incorrect indentation of switch/case statements. > This patch fixes the corresponding warnings. Additionally some indentation > is changed to match the correct format specified in the Linux Kernel > Coding Style. This patch needs split; separate the "leading spaces instead of tabs" from the "GNU-style indent level". Personally, I don't think it's worth changing existing code to meet the GNU indent style unless it's being rewritten for some other reason. But Greg's the maintainer, so it's his choice. Regards, Peter Hurley > Signed-off-by: Anton Würfel > Signed-off-by: Phillip Raffeck > CC: linux-kernel@i4.cs.fau.de > --- > drivers/tty/serial/8250/8250_pci.c | 31 +++++++++++++++---------------- > drivers/tty/serial/8250/8250_pnp.c | 4 ++-- > drivers/tty/serial/8250/8250_port.c | 14 +++++++------- > 3 files changed, 24 insertions(+), 25 deletions(-) > > diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c > index ed99fdf..41508a5 100644 > --- a/drivers/tty/serial/8250/8250_pci.c > +++ b/drivers/tty/serial/8250/8250_pci.c > @@ -722,7 +722,7 @@ static int pci_ni8430_init(struct pci_dev *dev) > */ > pcibios_resource_to_bus(dev->bus, ®ion, &dev->resource[bar]); > device_window = ((region.start + MITE_IOWBSR1_WIN_OFFSET) & 0xffffff00) > - | MITE_IOWBSR1_WENAB | MITE_IOWBSR1_WSIZE; > + | MITE_IOWBSR1_WENAB | MITE_IOWBSR1_WSIZE; > writel(device_window, p + MITE_IOWBSR1); > > /* Set window access to go to RAMSEL IO address space */ > @@ -843,17 +843,16 @@ static int pci_netmos_init(struct pci_dev *dev) > return 0; > > switch (dev->device) { /* FALLTHROUGH on all */ > - case PCI_DEVICE_ID_NETMOS_9904: > - case PCI_DEVICE_ID_NETMOS_9912: > - case PCI_DEVICE_ID_NETMOS_9922: > - case PCI_DEVICE_ID_NETMOS_9900: > - num_serial = pci_netmos_9900_numports(dev); > - break; > + case PCI_DEVICE_ID_NETMOS_9904: > + case PCI_DEVICE_ID_NETMOS_9912: > + case PCI_DEVICE_ID_NETMOS_9922: > + case PCI_DEVICE_ID_NETMOS_9900: > + num_serial = pci_netmos_9900_numports(dev); > + break; > > - default: > - if (num_serial == 0 ) { > - moan_device("unknown NetMos/Mostech device", dev); > - } > + default: > + if (num_serial == 0) > + moan_device("unknown NetMos/Mostech device", dev); > } > > if (num_serial == 0) > @@ -1766,7 +1765,7 @@ xr17v35x_has_slave(struct serial_private *priv) > const int dev_id = priv->dev->device; > > return ((dev_id == PCI_DEVICE_ID_EXAR_XR17V4358) || > - (dev_id == PCI_DEVICE_ID_EXAR_XR17V8358)); > + (dev_id == PCI_DEVICE_ID_EXAR_XR17V8358)); > } > > static int > @@ -1866,8 +1865,8 @@ pci_fastcom335_setup(struct serial_private *priv, > > static int > pci_wch_ch353_setup(struct serial_private *priv, > - const struct pciserial_board *board, > - struct uart_8250_port *port, int idx) > + const struct pciserial_board *board, > + struct uart_8250_port *port, int idx) > { > port->port.flags |= UPF_FIXED_TYPE; > port->port.type = PORT_16550A; > @@ -1876,8 +1875,8 @@ pci_wch_ch353_setup(struct serial_private *priv, > > static int > pci_wch_ch38x_setup(struct serial_private *priv, > - const struct pciserial_board *board, > - struct uart_8250_port *port, int idx) > + const struct pciserial_board *board, > + struct uart_8250_port *port, int idx) > { > port->port.flags |= UPF_FIXED_TYPE; > port->port.type = PORT_16850; > diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/8250/8250_pnp.c > index 658b392..1f18065 100644 > --- a/drivers/tty/serial/8250/8250_pnp.c > +++ b/drivers/tty/serial/8250/8250_pnp.c > @@ -425,8 +425,8 @@ static int check_resources(struct pnp_dev *dev) > static int serial_pnp_guess_board(struct pnp_dev *dev) > { > if (!(check_name(pnp_dev_name(dev)) || > - (dev->card && check_name(dev->card->name)))) > - return -ENODEV; > + (dev->card && check_name(dev->card->name)))) > + return -ENODEV; > > if (check_resources(dev)) > return 0; > diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c > index ae8f993..57ad0f2 100644 > --- a/drivers/tty/serial/8250/8250_port.c > +++ b/drivers/tty/serial/8250/8250_port.c > @@ -52,7 +52,7 @@ > #define DEBUG_AUTOCONF(fmt...) do { } while (0) > #endif > > -#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) > +#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) > > /* > * Here we define the default xmit fifo size used for each type of UART. > @@ -2236,9 +2236,9 @@ static void serial8250_set_divisor(struct uart_port *port, unsigned int baud, > serial_port_out(port, 0x2, quot_frac); > } > > -static unsigned int > -serial8250_get_baud_rate(struct uart_port *port, struct ktermios *termios, > - struct ktermios *old) > +static unsigned int serial8250_get_baud_rate(struct uart_port *port, > + struct ktermios *termios, > + struct ktermios *old) > { > unsigned int tolerance = port->uartclk / 100; > > @@ -2253,9 +2253,9 @@ serial8250_get_baud_rate(struct uart_port *port, struct ktermios *termios, > (port->uartclk + tolerance) / 16); > } > > -void > -serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, > - struct ktermios *old) > +void serial8250_do_set_termios(struct uart_port *port, > + struct ktermios *termios, > + struct ktermios *old) > { > struct uart_8250_port *up = up_to_u8250p(port); > unsigned char cval; > -- 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/