All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings
@ 2016-01-14 15:08 Anton Wuerfel
  2016-01-14 15:08   ` Anton Wuerfel
                   ` (15 more replies)
  0 siblings, 16 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

This patch set fixes several checkpatch warnings in tty/serial/8250.

Patch 1/15:  Adds missing spaces (mainly to function/macro headers)
Patch 2/15:  Replace spaces with tabs wherever possible
Patch 3/15:  Slight patch which moves an opening curly brace
Patch 4/15:  Fixes multiline comment style
Patch 5/15:  Removes else blocks after return statements
Patch 6/15:  Slight patch which moves EXPORT_SYMBOL macro to correct
position
Patch 7/15:  Slight patch which removes an unneccessary line continuation
Patch 8/15:  Slight patch which adds parentheses to a macro definition
Patch 9/15:  Merges user-visible multiline strings to a single line
Patch 10/15: Replace printk by dev_* or pr_* where appropriate
Patch 11/15: Remove orphaned debug macro
Patch 12/15: Fix warnings in dev_dbg by adding two casts
Patch 13/15: Refactor a switch/case statement
Patch 14/15: Fixes code indentation
Patch 15/15: Add a generic port macro

Remaining checkpatch warnings after applying this patch series:

-line over 80 characters
	This error mostly occurs in serial_cs.c, which contains long-lined
	macro calls. However, splitting these calls into multiple lines would
	not increase readability.

-externs should be avoided in .c files
	This occurs in 8250_hp300.c. There is no corresponding header file
	the extern statement could be moved to. It could be moved to 8250.h
	but this would affect other .c files.

-Use #include <linux/*.h> instead of <asm/*.h>
	This warning has been left open for more experienced kernel hackers.
	This patch series is about style issues. We do not intend to alter
	the code behavior.
-struct uart_ops should normally be const
	This warning only occurs in 8250_core.c. The corresponding struct
	cannot be declared as const because it is altered in
	serial8250_isa_init_ports(). Maybe a checkpatch exception should
	be added for this particular warning.

-quoted string split across lines
	These strings were ignored because they otherwise would exceed
	80 characters in a single line. These particular strings use
	format specifiers, which break the ability to grep for them anyway.

Anton Wuerfel (15):
Phillip Raffeck (15):
  tty: serial: 8250: Fix whitespace errors
  tty: serial: 8250: Replace spaces with tabs
  tty: serial: 8250: Fix braces after struct
  tty: serial: 8250: Fix multiline comment style
  tty: serial: 8250: Remove else after return
  tty: serial: 8250: Move EXPORT_SYMBOL to function
  tty: serial: 8250: Fix line continuation warning
  tty: serial: 8250: Add parentheses to macro
  tty: serial: 8250: Fix multi-line strings
  tty: serial: 8250: Correct conversion specifiers
  tty: serial: 8250: Merge duplicate conditions
  tty: serial: 8250: Fix indentation warnings
  tty: serial: 8250: Add generic port init macro
  tty: serial: 8250: Suitably replace printk
  tty: serial: 8250: Remove SERIAL_DEBUG_PNP macro

 drivers/tty/serial/8250/8250.h               | 12 ++++
 drivers/tty/serial/8250/8250_accent.c        | 13 +---
 drivers/tty/serial/8250/8250_acorn.c         |  2 +-
 drivers/tty/serial/8250/8250_boca.c          | 41 ++++++-------
 drivers/tty/serial/8250/8250_core.c          | 15 ++---
 drivers/tty/serial/8250/8250_exar_st16c554.c | 17 ++----
 drivers/tty/serial/8250/8250_fourport.c      | 28 ++++-----
 drivers/tty/serial/8250/8250_gsc.c           |  7 ++-
 drivers/tty/serial/8250/8250_hp300.c         | 27 +++++----
 drivers/tty/serial/8250/8250_hub6.c          |  2 +-
 drivers/tty/serial/8250/8250_ingenic.c       | 12 ++--
 drivers/tty/serial/8250/8250_pci.c           | 60 ++++++++++---------
 drivers/tty/serial/8250/8250_pnp.c           | 28 +++++----
 drivers/tty/serial/8250/8250_port.c          | 47 ++++++++-------
 drivers/tty/serial/8250/serial_cs.c          | 90 +++++++++++++++-------------
 15 files changed, 203 insertions(+), 198 deletions(-)

-- 
1.9.1

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

* [PATCH v7 01/15] tty: serial: 8250: Fix whitespace errors
  2016-01-14 15:08 [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
@ 2016-01-14 15:08   ` Anton Wuerfel
  2016-01-14 15:08   ` Anton Wuerfel
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

This patch fixes whitespace errors reported by checkpatch to increase
readability. Main focus is on missing spaces after commas in
function headers and macros (like foo,bar edited to foo, bar).

Signed-off-by: Anton W=C3=BCrfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_acorn.c |  2 +-
 drivers/tty/serial/8250/8250_hub6.c  |  2 +-
 drivers/tty/serial/8250/8250_pci.c   |  8 +++--
 drivers/tty/serial/8250/8250_port.c  |  2 ++
 drivers/tty/serial/8250/serial_cs.c  | 60 ++++++++++++++++++----------=
--------
 5 files changed, 39 insertions(+), 35 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_acorn.c b/drivers/tty/serial/=
8250/8250_acorn.c
index 549aa07..402dfdd 100644
--- a/drivers/tty/serial/8250/8250_acorn.c
+++ b/drivers/tty/serial/8250/8250_acorn.c
@@ -70,7 +70,7 @@ serial_card_probe(struct expansion_card *ec, const st=
ruct ecard_id *id)
 	uart.port.regshift	=3D 2;
 	uart.port.dev	=3D &ec->dev;
=20
-	for (i =3D 0; i < info->num_ports; i ++) {
+	for (i =3D 0; i < info->num_ports; i++) {
 		uart.port.membase =3D info->vaddr + type->offset[i];
 		uart.port.mapbase =3D bus_addr + type->offset[i];
=20
diff --git a/drivers/tty/serial/8250/8250_hub6.c b/drivers/tty/serial/8=
250/8250_hub6.c
index a5c778e..27124e2 100644
--- a/drivers/tty/serial/8250/8250_hub6.c
+++ b/drivers/tty/serial/8250/8250_hub6.c
@@ -10,7 +10,7 @@
 #include <linux/init.h>
 #include <linux/serial_8250.h>
=20
-#define HUB6(card,port)							\
+#define HUB6(card, port)						\
 	{								\
 		.iobase		=3D 0x302,				\
 		.irq		=3D 3,					\
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/82=
50/8250_pci.c
index 4097f3f..ecd5a32 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -1198,8 +1198,9 @@ static int pci_quatech_has_qmcr(struct uart_8250_=
port *port)
=20
 static int pci_quatech_test(struct uart_8250_port *port)
 {
-	u8 reg;
-	u8 qopr =3D pci_quatech_rqopr(port);
+	u8 reg, qopr;
+
+	qopr =3D pci_quatech_rqopr(port);
 	pci_quatech_wqopr(port, qopr & QPCR_TEST_FOR1);
 	reg =3D pci_quatech_rqopr(port) & 0xC0;
 	if (reg !=3D QPCR_TEST_GET1)
@@ -1286,6 +1287,7 @@ static int pci_quatech_init(struct pci_dev *dev)
 		unsigned long base =3D pci_resource_start(dev, 0);
 		if (base) {
 			u32 tmp;
+
 			outl(inl(base + 0x38) | 0x00002000, base + 0x38);
 			tmp =3D inl(base + 0x3c);
 			outl(tmp | 0x01000000, base + 0x3c);
@@ -4502,7 +4504,7 @@ static struct pci_device_id serial_pci_tbl[] =3D =
{
 		PCI_ANY_ID, PCI_ANY_ID, 0, 0,
 		pbn_b0_bt_2_921600 },
 	{	PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI958,
-		PCI_ANY_ID , PCI_ANY_ID, 0, 0,
+		PCI_ANY_ID, PCI_ANY_ID, 0, 0,
 		pbn_b2_8_1152000 },
=20
 	/*
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8=
250/8250_port.c
index 52d82d2..7f3bd7b 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -1327,6 +1327,7 @@ static void serial8250_start_tx(struct uart_port =
*port)
=20
 		if (up->bugs & UART_BUG_TXEN) {
 			unsigned char lsr;
+
 			lsr =3D serial_in(up, UART_LSR);
 			up->lsr_saved_flags |=3D lsr & LSR_SAVE_FLAGS;
 			if (lsr & UART_LSR_THRE)
@@ -1734,6 +1735,7 @@ static void wait_for_xmitr(struct uart_8250_port =
*up, int bits)
 	/* Wait up to 1s for flow control if necessary */
 	if (up->port.flags & UPF_CONS_FLOW) {
 		unsigned int tmout;
+
 		for (tmout =3D 1000000; tmout; tmout--) {
 			unsigned int msr =3D serial_in(up, UART_MSR);
 			up->msr_saved_flags |=3D msr & MSR_SAVE_FLAGS;
diff --git a/drivers/tty/serial/8250/serial_cs.c b/drivers/tty/serial/8=
250/serial_cs.c
index 4d180c9..6d7a801 100644
--- a/drivers/tty/serial/8250/serial_cs.c
+++ b/drivers/tty/serial/8250/serial_cs.c
@@ -28,7 +28,7 @@
     and other provisions required by the GPL.  If you do not delete
     the provisions above, a recipient may use your version of this
     file under either the MPL or the GPL.
-   =20
+
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
=20
 #include <linux/module.h>
@@ -257,7 +257,7 @@ static const struct serial_quirk quirks[] =3D {
 };
=20
=20
-static int serial_config(struct pcmcia_device * link);
+static int serial_config(struct pcmcia_device *link);
=20
=20
 static void serial_remove(struct pcmcia_device *link)
@@ -309,7 +309,7 @@ static int serial_probe(struct pcmcia_device *link)
 	dev_dbg(&link->dev, "serial_attach()\n");
=20
 	/* Create new serial device */
-	info =3D kzalloc(sizeof (*info), GFP_KERNEL);
+	info =3D kzalloc(sizeof(*info), GFP_KERNEL);
 	if (!info)
 		return -ENOMEM;
 	info->p_dev =3D link;
@@ -339,7 +339,7 @@ static void serial_detach(struct pcmcia_device *lin=
k)
=20
 /*=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D*/
=20
-static int setup_serial(struct pcmcia_device *handle, struct serial_in=
fo * info,
+static int setup_serial(struct pcmcia_device *handle, struct serial_in=
fo *info,
 			unsigned int iobase, int irq)
 {
 	struct uart_8250_port uart;
@@ -600,7 +600,7 @@ static int serial_check_for_multi(struct pcmcia_dev=
ice *p_dev,  void *priv_data)
 }
=20
=20
-static int serial_config(struct pcmcia_device * link)
+static int serial_config(struct pcmcia_device *link)
 {
 	struct serial_info *info =3D link->priv;
 	int i;
@@ -701,7 +701,7 @@ static const struct pcmcia_device_id serial_ids[] =3D=
 {
 	PCMCIA_PFC_DEVICE_PROD_ID12(1, "LINKSYS", "PCMLM336", 0xf7cb0b07, 0x7=
a821b58),
 	PCMCIA_PFC_DEVICE_PROD_ID12(1, "MEGAHERTZ", "XJEM1144/CCEM1144", 0xf5=
10db04, 0x52d21e1e),
 	PCMCIA_PFC_DEVICE_PROD_ID12(1, "MICRO RESEARCH", "COMBO-L/M-336", 0xb=
2ced065, 0x3ced0555),
-	PCMCIA_PFC_DEVICE_PROD_ID12(1, "NEC", "PK-UG-J001" ,0x18df0ba0 ,0x831=
b1064),
+	PCMCIA_PFC_DEVICE_PROD_ID12(1, "NEC", "PK-UG-J001", 0x18df0ba0, 0x831=
b1064),
 	PCMCIA_PFC_DEVICE_PROD_ID12(1, "Ositech", "Trumpcard:Jack of Diamonds=
 Modem+Ethernet", 0xc2f80cd, 0x656947b9),
 	PCMCIA_PFC_DEVICE_PROD_ID12(1, "Ositech", "Trumpcard:Jack of Hearts M=
odem+Ethernet", 0xc2f80cd, 0xdc9ba5ed),
 	PCMCIA_PFC_DEVICE_PROD_ID12(1, "PCMCIAs", "ComboCard", 0xdcfe12d3, 0x=
cd8906cc),
@@ -797,30 +797,30 @@ static const struct pcmcia_device_id serial_ids[]=
 =3D {
 	PCMCIA_DEVICE_CIS_PROD_ID123("ADVANTECH", "COMpad-32/85", "1.0", 0x96=
913a85, 0x8fbe92ae, 0x0877b627, "cis/COMpad2.cis"),
 	PCMCIA_DEVICE_CIS_PROD_ID2("RS-COM 2P", 0xad20b156, "cis/RS-COM-2P.ci=
s"),
 	PCMCIA_DEVICE_CIS_MANF_CARD(0x0013, 0x0000, "cis/GLOBETROTTER.cis"),
-	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c1997.","SERIAL CA=
RD: SL100  1.00.",0x19ca78af,0xf964f42b),
-	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c1997.","SERIAL CA=
RD: SL100",0x19ca78af,0x71d98e83),
-	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c1997.","SERIAL CA=
RD: SL232  1.00.",0x19ca78af,0x69fb7490),
-	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c1997.","SERIAL CA=
RD: SL232",0x19ca78af,0xb6bc0235),
-	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c2000.","SERIAL CA=
RD: CF232",0x63f2e0bd,0xb9e175d3),
-	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c2000.","SERIAL CA=
RD: CF232-5",0x63f2e0bd,0xfce33442),
-	PCMCIA_DEVICE_PROD_ID12("Elan","Serial Port: CF232",0x3beb8cf2,0x171e=
7190),
-	PCMCIA_DEVICE_PROD_ID12("Elan","Serial Port: CF232-5",0x3beb8cf2,0x20=
da4262),
-	PCMCIA_DEVICE_PROD_ID12("Elan","Serial Port: CF428",0x3beb8cf2,0xea5d=
d57d),
-	PCMCIA_DEVICE_PROD_ID12("Elan","Serial Port: CF500",0x3beb8cf2,0xd772=
55fa),
-	PCMCIA_DEVICE_PROD_ID12("Elan","Serial Port: IC232",0x3beb8cf2,0x6a70=
9903),
-	PCMCIA_DEVICE_PROD_ID12("Elan","Serial Port: SL232",0x3beb8cf2,0x1843=
0676),
-	PCMCIA_DEVICE_PROD_ID12("Elan","Serial Port: XL232",0x3beb8cf2,0x6f93=
3767),
-	PCMCIA_MFC_DEVICE_PROD_ID12(0,"Elan","Serial Port: CF332",0x3beb8cf2,=
0x16dc1ba7),
-	PCMCIA_MFC_DEVICE_PROD_ID12(0,"Elan","Serial Port: SL332",0x3beb8cf2,=
0x19816c41),
-	PCMCIA_MFC_DEVICE_PROD_ID12(0,"Elan","Serial Port: SL385",0x3beb8cf2,=
0x64112029),
-	PCMCIA_MFC_DEVICE_PROD_ID12(0,"Elan","Serial Port: SL432",0x3beb8cf2,=
0x1cce7ac4),
-	PCMCIA_MFC_DEVICE_PROD_ID12(0,"Elan","Serial+Parallel Port: SP230",0x=
3beb8cf2,0xdb9e58bc),
-	PCMCIA_MFC_DEVICE_PROD_ID12(1,"Elan","Serial Port: CF332",0x3beb8cf2,=
0x16dc1ba7),
-	PCMCIA_MFC_DEVICE_PROD_ID12(1,"Elan","Serial Port: SL332",0x3beb8cf2,=
0x19816c41),
-	PCMCIA_MFC_DEVICE_PROD_ID12(1,"Elan","Serial Port: SL385",0x3beb8cf2,=
0x64112029),
-	PCMCIA_MFC_DEVICE_PROD_ID12(1,"Elan","Serial Port: SL432",0x3beb8cf2,=
0x1cce7ac4),
-	PCMCIA_MFC_DEVICE_PROD_ID12(2,"Elan","Serial Port: SL432",0x3beb8cf2,=
0x1cce7ac4),
-	PCMCIA_MFC_DEVICE_PROD_ID12(3,"Elan","Serial Port: SL432",0x3beb8cf2,=
0x1cce7ac4),
+	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c1997.", "SERIAL C=
ARD: SL100  1.00.", 0x19ca78af, 0xf964f42b),
+	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c1997.", "SERIAL C=
ARD: SL100", 0x19ca78af, 0x71d98e83),
+	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c1997.", "SERIAL C=
ARD: SL232  1.00.", 0x19ca78af, 0x69fb7490),
+	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c1997.", "SERIAL C=
ARD: SL232", 0x19ca78af, 0xb6bc0235),
+	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c2000.", "SERIAL C=
ARD: CF232", 0x63f2e0bd, 0xb9e175d3),
+	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c2000.", "SERIAL C=
ARD: CF232-5", 0x63f2e0bd, 0xfce33442),
+	PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: CF232", 0x3beb8cf2, 0x1=
71e7190),
+	PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: CF232-5", 0x3beb8cf2, 0=
x20da4262),
+	PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: CF428", 0x3beb8cf2, 0xe=
a5dd57d),
+	PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: CF500", 0x3beb8cf2, 0xd=
77255fa),
+	PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: IC232", 0x3beb8cf2, 0x6=
a709903),
+	PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: SL232", 0x3beb8cf2, 0x1=
8430676),
+	PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: XL232", 0x3beb8cf2, 0x6=
f933767),
+	PCMCIA_MFC_DEVICE_PROD_ID12(0, "Elan", "Serial Port: CF332", 0x3beb8c=
f2, 0x16dc1ba7),
+	PCMCIA_MFC_DEVICE_PROD_ID12(0, "Elan", "Serial Port: SL332", 0x3beb8c=
f2, 0x19816c41),
+	PCMCIA_MFC_DEVICE_PROD_ID12(0, "Elan", "Serial Port: SL385", 0x3beb8c=
f2, 0x64112029),
+	PCMCIA_MFC_DEVICE_PROD_ID12(0, "Elan", "Serial Port: SL432", 0x3beb8c=
f2, 0x1cce7ac4),
+	PCMCIA_MFC_DEVICE_PROD_ID12(0, "Elan", "Serial+Parallel Port: SP230",=
 0x3beb8cf2, 0xdb9e58bc),
+	PCMCIA_MFC_DEVICE_PROD_ID12(1, "Elan", "Serial Port: CF332", 0x3beb8c=
f2, 0x16dc1ba7),
+	PCMCIA_MFC_DEVICE_PROD_ID12(1, "Elan", "Serial Port: SL332", 0x3beb8c=
f2, 0x19816c41),
+	PCMCIA_MFC_DEVICE_PROD_ID12(1, "Elan", "Serial Port: SL385", 0x3beb8c=
f2, 0x64112029),
+	PCMCIA_MFC_DEVICE_PROD_ID12(1, "Elan", "Serial Port: SL432", 0x3beb8c=
f2, 0x1cce7ac4),
+	PCMCIA_MFC_DEVICE_PROD_ID12(2, "Elan", "Serial Port: SL432", 0x3beb8c=
f2, 0x1cce7ac4),
+	PCMCIA_MFC_DEVICE_PROD_ID12(3, "Elan", "Serial Port: SL432", 0x3beb8c=
f2, 0x1cce7ac4),
 	PCMCIA_DEVICE_MANF_CARD(0x0279, 0x950b),
 	/* too generic */
 	/* PCMCIA_MFC_DEVICE_MANF_CARD(0, 0x0160, 0x0002), */
--=20
1.9.1

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

* [PATCH v7 01/15] tty: serial: 8250: Fix whitespace errors
@ 2016-01-14 15:08   ` Anton Wuerfel
  0 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

This patch fixes whitespace errors reported by checkpatch to increase
readability. Main focus is on missing spaces after commas in
function headers and macros (like foo,bar edited to foo, bar).

Signed-off-by: Anton Würfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_acorn.c |  2 +-
 drivers/tty/serial/8250/8250_hub6.c  |  2 +-
 drivers/tty/serial/8250/8250_pci.c   |  8 +++--
 drivers/tty/serial/8250/8250_port.c  |  2 ++
 drivers/tty/serial/8250/serial_cs.c  | 60 ++++++++++++++++++------------------
 5 files changed, 39 insertions(+), 35 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_acorn.c b/drivers/tty/serial/8250/8250_acorn.c
index 549aa07..402dfdd 100644
--- a/drivers/tty/serial/8250/8250_acorn.c
+++ b/drivers/tty/serial/8250/8250_acorn.c
@@ -70,7 +70,7 @@ serial_card_probe(struct expansion_card *ec, const struct ecard_id *id)
 	uart.port.regshift	= 2;
 	uart.port.dev	= &ec->dev;
 
-	for (i = 0; i < info->num_ports; i ++) {
+	for (i = 0; i < info->num_ports; i++) {
 		uart.port.membase = info->vaddr + type->offset[i];
 		uart.port.mapbase = bus_addr + type->offset[i];
 
diff --git a/drivers/tty/serial/8250/8250_hub6.c b/drivers/tty/serial/8250/8250_hub6.c
index a5c778e..27124e2 100644
--- a/drivers/tty/serial/8250/8250_hub6.c
+++ b/drivers/tty/serial/8250/8250_hub6.c
@@ -10,7 +10,7 @@
 #include <linux/init.h>
 #include <linux/serial_8250.h>
 
-#define HUB6(card,port)							\
+#define HUB6(card, port)						\
 	{								\
 		.iobase		= 0x302,				\
 		.irq		= 3,					\
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index 4097f3f..ecd5a32 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -1198,8 +1198,9 @@ static int pci_quatech_has_qmcr(struct uart_8250_port *port)
 
 static int pci_quatech_test(struct uart_8250_port *port)
 {
-	u8 reg;
-	u8 qopr = pci_quatech_rqopr(port);
+	u8 reg, qopr;
+
+	qopr = pci_quatech_rqopr(port);
 	pci_quatech_wqopr(port, qopr & QPCR_TEST_FOR1);
 	reg = pci_quatech_rqopr(port) & 0xC0;
 	if (reg != QPCR_TEST_GET1)
@@ -1286,6 +1287,7 @@ static int pci_quatech_init(struct pci_dev *dev)
 		unsigned long base = pci_resource_start(dev, 0);
 		if (base) {
 			u32 tmp;
+
 			outl(inl(base + 0x38) | 0x00002000, base + 0x38);
 			tmp = inl(base + 0x3c);
 			outl(tmp | 0x01000000, base + 0x3c);
@@ -4502,7 +4504,7 @@ static struct pci_device_id serial_pci_tbl[] = {
 		PCI_ANY_ID, PCI_ANY_ID, 0, 0,
 		pbn_b0_bt_2_921600 },
 	{	PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI958,
-		PCI_ANY_ID , PCI_ANY_ID, 0, 0,
+		PCI_ANY_ID, PCI_ANY_ID, 0, 0,
 		pbn_b2_8_1152000 },
 
 	/*
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 52d82d2..7f3bd7b 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -1327,6 +1327,7 @@ static void serial8250_start_tx(struct uart_port *port)
 
 		if (up->bugs & UART_BUG_TXEN) {
 			unsigned char lsr;
+
 			lsr = serial_in(up, UART_LSR);
 			up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS;
 			if (lsr & UART_LSR_THRE)
@@ -1734,6 +1735,7 @@ static void wait_for_xmitr(struct uart_8250_port *up, int bits)
 	/* Wait up to 1s for flow control if necessary */
 	if (up->port.flags & UPF_CONS_FLOW) {
 		unsigned int tmout;
+
 		for (tmout = 1000000; tmout; tmout--) {
 			unsigned int msr = serial_in(up, UART_MSR);
 			up->msr_saved_flags |= msr & MSR_SAVE_FLAGS;
diff --git a/drivers/tty/serial/8250/serial_cs.c b/drivers/tty/serial/8250/serial_cs.c
index 4d180c9..6d7a801 100644
--- a/drivers/tty/serial/8250/serial_cs.c
+++ b/drivers/tty/serial/8250/serial_cs.c
@@ -28,7 +28,7 @@
     and other provisions required by the GPL.  If you do not delete
     the provisions above, a recipient may use your version of this
     file under either the MPL or the GPL.
-    
+
 ======================================================================*/
 
 #include <linux/module.h>
@@ -257,7 +257,7 @@ static const struct serial_quirk quirks[] = {
 };
 
 
-static int serial_config(struct pcmcia_device * link);
+static int serial_config(struct pcmcia_device *link);
 
 
 static void serial_remove(struct pcmcia_device *link)
@@ -309,7 +309,7 @@ static int serial_probe(struct pcmcia_device *link)
 	dev_dbg(&link->dev, "serial_attach()\n");
 
 	/* Create new serial device */
-	info = kzalloc(sizeof (*info), GFP_KERNEL);
+	info = kzalloc(sizeof(*info), GFP_KERNEL);
 	if (!info)
 		return -ENOMEM;
 	info->p_dev = link;
@@ -339,7 +339,7 @@ static void serial_detach(struct pcmcia_device *link)
 
 /*====================================================================*/
 
-static int setup_serial(struct pcmcia_device *handle, struct serial_info * info,
+static int setup_serial(struct pcmcia_device *handle, struct serial_info *info,
 			unsigned int iobase, int irq)
 {
 	struct uart_8250_port uart;
@@ -600,7 +600,7 @@ static int serial_check_for_multi(struct pcmcia_device *p_dev,  void *priv_data)
 }
 
 
-static int serial_config(struct pcmcia_device * link)
+static int serial_config(struct pcmcia_device *link)
 {
 	struct serial_info *info = link->priv;
 	int i;
@@ -701,7 +701,7 @@ static const struct pcmcia_device_id serial_ids[] = {
 	PCMCIA_PFC_DEVICE_PROD_ID12(1, "LINKSYS", "PCMLM336", 0xf7cb0b07, 0x7a821b58),
 	PCMCIA_PFC_DEVICE_PROD_ID12(1, "MEGAHERTZ", "XJEM1144/CCEM1144", 0xf510db04, 0x52d21e1e),
 	PCMCIA_PFC_DEVICE_PROD_ID12(1, "MICRO RESEARCH", "COMBO-L/M-336", 0xb2ced065, 0x3ced0555),
-	PCMCIA_PFC_DEVICE_PROD_ID12(1, "NEC", "PK-UG-J001" ,0x18df0ba0 ,0x831b1064),
+	PCMCIA_PFC_DEVICE_PROD_ID12(1, "NEC", "PK-UG-J001", 0x18df0ba0, 0x831b1064),
 	PCMCIA_PFC_DEVICE_PROD_ID12(1, "Ositech", "Trumpcard:Jack of Diamonds Modem+Ethernet", 0xc2f80cd, 0x656947b9),
 	PCMCIA_PFC_DEVICE_PROD_ID12(1, "Ositech", "Trumpcard:Jack of Hearts Modem+Ethernet", 0xc2f80cd, 0xdc9ba5ed),
 	PCMCIA_PFC_DEVICE_PROD_ID12(1, "PCMCIAs", "ComboCard", 0xdcfe12d3, 0xcd8906cc),
@@ -797,30 +797,30 @@ static const struct pcmcia_device_id serial_ids[] = {
 	PCMCIA_DEVICE_CIS_PROD_ID123("ADVANTECH", "COMpad-32/85", "1.0", 0x96913a85, 0x8fbe92ae, 0x0877b627, "cis/COMpad2.cis"),
 	PCMCIA_DEVICE_CIS_PROD_ID2("RS-COM 2P", 0xad20b156, "cis/RS-COM-2P.cis"),
 	PCMCIA_DEVICE_CIS_MANF_CARD(0x0013, 0x0000, "cis/GLOBETROTTER.cis"),
-	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c1997.","SERIAL CARD: SL100  1.00.",0x19ca78af,0xf964f42b),
-	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c1997.","SERIAL CARD: SL100",0x19ca78af,0x71d98e83),
-	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c1997.","SERIAL CARD: SL232  1.00.",0x19ca78af,0x69fb7490),
-	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c1997.","SERIAL CARD: SL232",0x19ca78af,0xb6bc0235),
-	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c2000.","SERIAL CARD: CF232",0x63f2e0bd,0xb9e175d3),
-	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c2000.","SERIAL CARD: CF232-5",0x63f2e0bd,0xfce33442),
-	PCMCIA_DEVICE_PROD_ID12("Elan","Serial Port: CF232",0x3beb8cf2,0x171e7190),
-	PCMCIA_DEVICE_PROD_ID12("Elan","Serial Port: CF232-5",0x3beb8cf2,0x20da4262),
-	PCMCIA_DEVICE_PROD_ID12("Elan","Serial Port: CF428",0x3beb8cf2,0xea5dd57d),
-	PCMCIA_DEVICE_PROD_ID12("Elan","Serial Port: CF500",0x3beb8cf2,0xd77255fa),
-	PCMCIA_DEVICE_PROD_ID12("Elan","Serial Port: IC232",0x3beb8cf2,0x6a709903),
-	PCMCIA_DEVICE_PROD_ID12("Elan","Serial Port: SL232",0x3beb8cf2,0x18430676),
-	PCMCIA_DEVICE_PROD_ID12("Elan","Serial Port: XL232",0x3beb8cf2,0x6f933767),
-	PCMCIA_MFC_DEVICE_PROD_ID12(0,"Elan","Serial Port: CF332",0x3beb8cf2,0x16dc1ba7),
-	PCMCIA_MFC_DEVICE_PROD_ID12(0,"Elan","Serial Port: SL332",0x3beb8cf2,0x19816c41),
-	PCMCIA_MFC_DEVICE_PROD_ID12(0,"Elan","Serial Port: SL385",0x3beb8cf2,0x64112029),
-	PCMCIA_MFC_DEVICE_PROD_ID12(0,"Elan","Serial Port: SL432",0x3beb8cf2,0x1cce7ac4),
-	PCMCIA_MFC_DEVICE_PROD_ID12(0,"Elan","Serial+Parallel Port: SP230",0x3beb8cf2,0xdb9e58bc),
-	PCMCIA_MFC_DEVICE_PROD_ID12(1,"Elan","Serial Port: CF332",0x3beb8cf2,0x16dc1ba7),
-	PCMCIA_MFC_DEVICE_PROD_ID12(1,"Elan","Serial Port: SL332",0x3beb8cf2,0x19816c41),
-	PCMCIA_MFC_DEVICE_PROD_ID12(1,"Elan","Serial Port: SL385",0x3beb8cf2,0x64112029),
-	PCMCIA_MFC_DEVICE_PROD_ID12(1,"Elan","Serial Port: SL432",0x3beb8cf2,0x1cce7ac4),
-	PCMCIA_MFC_DEVICE_PROD_ID12(2,"Elan","Serial Port: SL432",0x3beb8cf2,0x1cce7ac4),
-	PCMCIA_MFC_DEVICE_PROD_ID12(3,"Elan","Serial Port: SL432",0x3beb8cf2,0x1cce7ac4),
+	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c1997.", "SERIAL CARD: SL100  1.00.", 0x19ca78af, 0xf964f42b),
+	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c1997.", "SERIAL CARD: SL100", 0x19ca78af, 0x71d98e83),
+	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c1997.", "SERIAL CARD: SL232  1.00.", 0x19ca78af, 0x69fb7490),
+	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c1997.", "SERIAL CARD: SL232", 0x19ca78af, 0xb6bc0235),
+	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c2000.", "SERIAL CARD: CF232", 0x63f2e0bd, 0xb9e175d3),
+	PCMCIA_DEVICE_PROD_ID12("ELAN DIGITAL SYSTEMS LTD, c2000.", "SERIAL CARD: CF232-5", 0x63f2e0bd, 0xfce33442),
+	PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: CF232", 0x3beb8cf2, 0x171e7190),
+	PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: CF232-5", 0x3beb8cf2, 0x20da4262),
+	PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: CF428", 0x3beb8cf2, 0xea5dd57d),
+	PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: CF500", 0x3beb8cf2, 0xd77255fa),
+	PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: IC232", 0x3beb8cf2, 0x6a709903),
+	PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: SL232", 0x3beb8cf2, 0x18430676),
+	PCMCIA_DEVICE_PROD_ID12("Elan", "Serial Port: XL232", 0x3beb8cf2, 0x6f933767),
+	PCMCIA_MFC_DEVICE_PROD_ID12(0, "Elan", "Serial Port: CF332", 0x3beb8cf2, 0x16dc1ba7),
+	PCMCIA_MFC_DEVICE_PROD_ID12(0, "Elan", "Serial Port: SL332", 0x3beb8cf2, 0x19816c41),
+	PCMCIA_MFC_DEVICE_PROD_ID12(0, "Elan", "Serial Port: SL385", 0x3beb8cf2, 0x64112029),
+	PCMCIA_MFC_DEVICE_PROD_ID12(0, "Elan", "Serial Port: SL432", 0x3beb8cf2, 0x1cce7ac4),
+	PCMCIA_MFC_DEVICE_PROD_ID12(0, "Elan", "Serial+Parallel Port: SP230", 0x3beb8cf2, 0xdb9e58bc),
+	PCMCIA_MFC_DEVICE_PROD_ID12(1, "Elan", "Serial Port: CF332", 0x3beb8cf2, 0x16dc1ba7),
+	PCMCIA_MFC_DEVICE_PROD_ID12(1, "Elan", "Serial Port: SL332", 0x3beb8cf2, 0x19816c41),
+	PCMCIA_MFC_DEVICE_PROD_ID12(1, "Elan", "Serial Port: SL385", 0x3beb8cf2, 0x64112029),
+	PCMCIA_MFC_DEVICE_PROD_ID12(1, "Elan", "Serial Port: SL432", 0x3beb8cf2, 0x1cce7ac4),
+	PCMCIA_MFC_DEVICE_PROD_ID12(2, "Elan", "Serial Port: SL432", 0x3beb8cf2, 0x1cce7ac4),
+	PCMCIA_MFC_DEVICE_PROD_ID12(3, "Elan", "Serial Port: SL432", 0x3beb8cf2, 0x1cce7ac4),
 	PCMCIA_DEVICE_MANF_CARD(0x0279, 0x950b),
 	/* too generic */
 	/* PCMCIA_MFC_DEVICE_MANF_CARD(0, 0x0160, 0x0002), */
-- 
1.9.1

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

* [PATCH v7 02/15] tty: serial: 8250: Replace spaces with tabs
  2016-01-14 15:08 [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
@ 2016-01-14 15:08   ` Anton Wuerfel
  2016-01-14 15:08   ` Anton Wuerfel
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

Indentation is changed to match the correct format of using tabs instea=
d
of spaces wherever possible.

Signed-off-by: Anton W=C3=BCrfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_pci.c  | 12 ++++++------
 drivers/tty/serial/8250/8250_port.c |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/82=
50/8250_pci.c
index ecd5a32..534ca18 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -721,7 +721,7 @@ static int pci_ni8430_init(struct pci_dev *dev)
 	 */
 	pcibios_resource_to_bus(dev->bus, &region, &dev->resource[bar]);
 	device_window =3D ((region.start + MITE_IOWBSR1_WIN_OFFSET) & 0xfffff=
f00)
-	                | MITE_IOWBSR1_WENAB | MITE_IOWBSR1_WSIZE;
+			| MITE_IOWBSR1_WENAB | MITE_IOWBSR1_WSIZE;
 	writel(device_window, p + MITE_IOWBSR1);
=20
 	/* Set window access to go to RAMSEL IO address space */
@@ -1763,7 +1763,7 @@ xr17v35x_has_slave(struct serial_private *priv)
 	const int dev_id =3D priv->dev->device;
=20
 	return ((dev_id =3D=3D PCI_DEVICE_ID_EXAR_XR17V4358) ||
-	        (dev_id =3D=3D PCI_DEVICE_ID_EXAR_XR17V8358));
+		(dev_id =3D=3D PCI_DEVICE_ID_EXAR_XR17V8358));
 }
=20
 static int
@@ -1863,8 +1863,8 @@ pci_fastcom335_setup(struct serial_private *priv,
=20
 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 |=3D UPF_FIXED_TYPE;
 	port->port.type =3D PORT_16550A;
@@ -1873,8 +1873,8 @@ pci_wch_ch353_setup(struct serial_private *priv,
=20
 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 |=3D UPF_FIXED_TYPE;
 	port->port.type =3D PORT_16850;
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8=
250/8250_port.c
index 7f3bd7b..f2e588e 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
=20
-#define BOTH_EMPTY 	(UART_LSR_TEMT | UART_LSR_THRE)
+#define BOTH_EMPTY	(UART_LSR_TEMT | UART_LSR_THRE)
=20
 /*
  * Here we define the default xmit fifo size used for each type of UAR=
T.
@@ -2254,7 +2254,7 @@ serial8250_get_baud_rate(struct uart_port *port, =
struct ktermios *termios,
=20
 void
 serial8250_do_set_termios(struct uart_port *port, struct ktermios *ter=
mios,
-		          struct ktermios *old)
+			  struct ktermios *old)
 {
 	struct uart_8250_port *up =3D up_to_u8250p(port);
 	unsigned char cval;
--=20
1.9.1

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

* [PATCH v7 02/15] tty: serial: 8250: Replace spaces with tabs
@ 2016-01-14 15:08   ` Anton Wuerfel
  0 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

Indentation is changed to match the correct format of using tabs instead
of spaces wherever possible.

Signed-off-by: Anton Würfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_pci.c  | 12 ++++++------
 drivers/tty/serial/8250/8250_port.c |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index ecd5a32..534ca18 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -721,7 +721,7 @@ static int pci_ni8430_init(struct pci_dev *dev)
 	 */
 	pcibios_resource_to_bus(dev->bus, &region, &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 */
@@ -1763,7 +1763,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
@@ -1863,8 +1863,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;
@@ -1873,8 +1873,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_port.c b/drivers/tty/serial/8250/8250_port.c
index 7f3bd7b..f2e588e 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.
@@ -2254,7 +2254,7 @@ serial8250_get_baud_rate(struct uart_port *port, struct ktermios *termios,
 
 void
 serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios,
-		          struct ktermios *old)
+			  struct ktermios *old)
 {
 	struct uart_8250_port *up = up_to_u8250p(port);
 	unsigned char cval;
-- 
1.9.1

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

* [PATCH v7 03/15] tty: serial: 8250: Fix braces after struct
  2016-01-14 15:08 [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
@ 2016-01-14 15:08   ` Anton Wuerfel
  2016-01-14 15:08   ` Anton Wuerfel
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

This patch fixes a checkpatch warning by moving an opening curly brace
to its correct position.

Signed-off-by: Anton W=C3=BCrfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_hp300.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_hp300.c b/drivers/tty/serial/=
8250/8250_hp300.c
index 2891958..5e1b464 100644
--- a/drivers/tty/serial/8250/8250_hp300.c
+++ b/drivers/tty/serial/8250/8250_hp300.c
@@ -24,8 +24,7 @@
 #endif
=20
 #ifdef CONFIG_HPAPCI
-struct hp300_port
-{
+struct hp300_port {
 	struct hp300_port *next;	/* next port */
 	int line;			/* line (tty) number */
 };
--=20
1.9.1

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

* [PATCH v7 03/15] tty: serial: 8250: Fix braces after struct
@ 2016-01-14 15:08   ` Anton Wuerfel
  0 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

This patch fixes a checkpatch warning by moving an opening curly brace
to its correct position.

Signed-off-by: Anton Würfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_hp300.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_hp300.c b/drivers/tty/serial/8250/8250_hp300.c
index 2891958..5e1b464 100644
--- a/drivers/tty/serial/8250/8250_hp300.c
+++ b/drivers/tty/serial/8250/8250_hp300.c
@@ -24,8 +24,7 @@
 #endif
 
 #ifdef CONFIG_HPAPCI
-struct hp300_port
-{
+struct hp300_port {
 	struct hp300_port *next;	/* next port */
 	int line;			/* line (tty) number */
 };
-- 
1.9.1

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

* [PATCH v7 04/15] tty: serial: 8250: Fix multiline comment style
  2016-01-14 15:08 [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
@ 2016-01-14 15:08   ` Anton Wuerfel
  2016-01-14 15:08   ` Anton Wuerfel
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

Checkpatch outputs some warnings about incorrect comment style,
which is fixed by this patch.

Signed-off-by: Anton W=C3=BCrfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_ingenic.c | 12 ++++++++----
 drivers/tty/serial/8250/8250_pnp.c     | 14 ++++++++------
 drivers/tty/serial/8250/8250_port.c    | 32 +++++++++++++++++---------=
------
 drivers/tty/serial/8250/serial_cs.c    | 26 +++++++++++++++++---------
 4 files changed, 50 insertions(+), 34 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_ingenic.c b/drivers/tty/seria=
l/8250/8250_ingenic.c
index 49394b4..4d9dc10 100644
--- a/drivers/tty/serial/8250/8250_ingenic.c
+++ b/drivers/tty/serial/8250/8250_ingenic.c
@@ -152,14 +152,18 @@ static void ingenic_uart_serial_out(struct uart_p=
ort *p, int offset, int value)
 		break;
=20
 	case UART_IER:
-		/* Enable receive timeout interrupt with the
-		 * receive line status interrupt */
+		/*
+		 * Enable receive timeout interrupt with the receive line
+		 * status interrupt.
+		 */
 		value |=3D (value & 0x4) << 2;
 		break;
=20
 	case UART_MCR:
-		/* If we have enabled modem status IRQs we should enable modem
-		 * mode. */
+		/*
+		 * If we have enabled modem status IRQs we should enable
+		 * modem mode.
+		 */
 		ier =3D p->serial_in(p, UART_IER);
=20
 		if (ier & UART_IER_MSI)
diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/82=
50/8250_pnp.c
index 658b392..00846a7 100644
--- a/drivers/tty/serial/8250/8250_pnp.c
+++ b/drivers/tty/serial/8250/8250_pnp.c
@@ -357,8 +357,8 @@ static const struct pnp_device_id pnp_dev_table[] =3D=
 {
 	/* Fujitsu Wacom 1FGT Tablet PC device */
 	{	"FUJ02E9",		0	},
 	/*
-	 * LG C1 EXPRESS DUAL (C1-PB11A3) touch screen (actually a FUJ02E6 in
-	 * disguise)
+	 * LG C1 EXPRESS DUAL (C1-PB11A3) touch screen (actually a FUJ02E6
+	 * in disguise).
 	 */
 	{	"LTS0001",		0       },
 	/* Rockwell's (PORALiNK) 33600 INT PNP */
@@ -367,12 +367,14 @@ static const struct pnp_device_id pnp_dev_table[]=
 =3D {
 	{	"PNPCXXX",		UNKNOWN_DEV	},
 	/* More unknown PnP modems */
 	{	"PNPDXXX",		UNKNOWN_DEV	},
-	/* Winbond CIR port, should not be probed. We should keep track
-	   of it to prevent the legacy serial driver from probing it */
+	/*
+	 * Winbond CIR port, should not be probed. We should keep track of
+	 * it to prevent the legacy serial driver from probing it.
+	 */
 	{	"WEC1022",		CIR_PORT	},
 	/*
-	 * SMSC IrCC SIR/FIR port, should not be probed by serial driver
-	 * as well so its own driver can bind to it.
+	 * SMSC IrCC SIR/FIR port, should not be probed by serial driver as
+	 * well so its own driver can bind to it.
 	 */
 	{	"SMCF010",		CIR_PORT	},
 	{	"",			0	}
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8=
250/8250_port.c
index f2e588e..5375c24 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -250,9 +250,11 @@ static const struct serial8250_config uart_config[=
] =3D {
 		.fcr		=3D UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
 		.flags		=3D UART_CAP_FIFO | UART_CAP_AFE,
 	},
-/* tx_loadsz is set to 63-bytes instead of 64-bytes to implement
-workaround of errata A-008006 which states that tx_loadsz should  be
-configured less than Maximum supported fifo bytes */
+	/*
+	 * tx_loadsz is set to 63-bytes instead of 64-bytes to implement
+	 * workaround of errata A-008006 which states that tx_loadsz should
+	 * be configured less than Maximum supported fifo bytes.
+	 */
 	[PORT_16550A_FSL64] =3D {
 		.name		=3D "16550A_FSL64",
 		.fifo_size	=3D 64,
@@ -1969,23 +1971,23 @@ int serial8250_do_startup(struct uart_port *por=
t)
=20
 	serial8250_set_mctrl(port, port->mctrl);
=20
-	/* Serial over Lan (SoL) hack:
-	   Intel 8257x Gigabit ethernet chips have a
-	   16550 emulation, to be used for Serial Over Lan.
-	   Those chips take a longer time than a normal
-	   serial device to signalize that a transmission
-	   data was queued. Due to that, the above test generally
-	   fails. One solution would be to delay the reading of
-	   iir. However, this is not reliable, since the timeout
-	   is variable. So, let's just don't test if we receive
-	   TX irq. This way, we'll never enable UART_BUG_TXEN.
+	/*
+	 * Serial over Lan (SoL) hack:
+	 * Intel 8257x Gigabit ethernet chips have a 16550 emulation, to be
+	 * used for Serial Over Lan.  Those chips take a longer time than a
+	 * normal serial device to signalize that a transmission data was
+	 * queued. Due to that, the above test generally fails. One solution
+	 * would be to delay the reading of iir. However, this is not
+	 * reliable, since the timeout is variable. So, let's just don't
+	 * test if we receive TX irq.  This way, we'll never enable
+	 * UART_BUG_TXEN.
 	 */
 	if (up->port.flags & UPF_NO_TXEN_TEST)
 		goto dont_test_tx_en;
=20
 	/*
-	 * Do a quick test to see if we receive an
-	 * interrupt when we enable the TX irq.
+	 * Do a quick test to see if we receive an interrupt when we enable
+	 * the TX irq.
 	 */
 	serial_port_out(port, UART_IER, UART_IER_THRI);
 	lsr =3D serial_port_in(port, UART_LSR);
diff --git a/drivers/tty/serial/8250/serial_cs.c b/drivers/tty/serial/8=
250/serial_cs.c
index 6d7a801..2b7309d 100644
--- a/drivers/tty/serial/8250/serial_cs.c
+++ b/drivers/tty/serial/8250/serial_cs.c
@@ -441,16 +441,20 @@ static int simple_config(struct pcmcia_device *li=
nk)
 	struct serial_info *info =3D link->priv;
 	int i =3D -ENODEV, try;
=20
-	/* First pass: look for a config entry that looks normal.
-	 * Two tries: without IO aliases, then with aliases */
+	/*
+	 * First pass: look for a config entry that looks normal.
+	 * Two tries: without IO aliases, then with aliases.
+	 */
 	link->config_flags |=3D CONF_AUTO_SET_VPP;
 	for (try =3D 0; try < 4; try++)
 		if (!pcmcia_loop_config(link, simple_config_check, &try))
 			goto found_port;
=20
-	/* Second pass: try to find an entry that isn't picky about
-	   its base address, then try to grab any standard serial port
-	   address, and finally try to get any free port. */
+	/*
+	 * Second pass: try to find an entry that isn't picky about
+	 * its base address, then try to grab any standard serial port
+	 * address, and finally try to get any free port.
+	 */
 	if (!pcmcia_loop_config(link, simple_config_check_notpicky, NULL))
 		goto found_port;
=20
@@ -480,8 +484,10 @@ static int multi_config_check(struct pcmcia_device=
 *p_dev, void *priv_data)
 	if (p_dev->resource[1]->end)
 		return -EINVAL;
=20
-	/* The quad port cards have bad CIS's, so just look for a
-	   window larger than 8 ports and assume it will be right */
+	/*
+	 * The quad port cards have bad CIS's, so just look for a
+	 * window larger than 8 ports and assume it will be right.
+	 */
 	if (p_dev->resource[0]->end <=3D 8)
 		return -EINVAL;
=20
@@ -623,8 +629,10 @@ static int serial_config(struct pcmcia_device *lin=
k)
 			break;
 		}
=20
-	/* Another check for dual-serial cards: look for either serial or
-	   multifunction cards that ask for appropriate IO port ranges */
+	/*
+	 * Another check for dual-serial cards: look for either serial or
+	 * multifunction cards that ask for appropriate IO port ranges.
+	 */
 	if ((info->multi =3D=3D 0) &&
 	    (link->has_func_id) &&
 	    (link->socket->pcmcia_pfc =3D=3D 0) &&
--=20
1.9.1

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

* [PATCH v7 04/15] tty: serial: 8250: Fix multiline comment style
@ 2016-01-14 15:08   ` Anton Wuerfel
  0 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

Checkpatch outputs some warnings about incorrect comment style,
which is fixed by this patch.

Signed-off-by: Anton Würfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_ingenic.c | 12 ++++++++----
 drivers/tty/serial/8250/8250_pnp.c     | 14 ++++++++------
 drivers/tty/serial/8250/8250_port.c    | 32 +++++++++++++++++---------------
 drivers/tty/serial/8250/serial_cs.c    | 26 +++++++++++++++++---------
 4 files changed, 50 insertions(+), 34 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_ingenic.c b/drivers/tty/serial/8250/8250_ingenic.c
index 49394b4..4d9dc10 100644
--- a/drivers/tty/serial/8250/8250_ingenic.c
+++ b/drivers/tty/serial/8250/8250_ingenic.c
@@ -152,14 +152,18 @@ static void ingenic_uart_serial_out(struct uart_port *p, int offset, int value)
 		break;
 
 	case UART_IER:
-		/* Enable receive timeout interrupt with the
-		 * receive line status interrupt */
+		/*
+		 * Enable receive timeout interrupt with the receive line
+		 * status interrupt.
+		 */
 		value |= (value & 0x4) << 2;
 		break;
 
 	case UART_MCR:
-		/* If we have enabled modem status IRQs we should enable modem
-		 * mode. */
+		/*
+		 * If we have enabled modem status IRQs we should enable
+		 * modem mode.
+		 */
 		ier = p->serial_in(p, UART_IER);
 
 		if (ier & UART_IER_MSI)
diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/8250/8250_pnp.c
index 658b392..00846a7 100644
--- a/drivers/tty/serial/8250/8250_pnp.c
+++ b/drivers/tty/serial/8250/8250_pnp.c
@@ -357,8 +357,8 @@ static const struct pnp_device_id pnp_dev_table[] = {
 	/* Fujitsu Wacom 1FGT Tablet PC device */
 	{	"FUJ02E9",		0	},
 	/*
-	 * LG C1 EXPRESS DUAL (C1-PB11A3) touch screen (actually a FUJ02E6 in
-	 * disguise)
+	 * LG C1 EXPRESS DUAL (C1-PB11A3) touch screen (actually a FUJ02E6
+	 * in disguise).
 	 */
 	{	"LTS0001",		0       },
 	/* Rockwell's (PORALiNK) 33600 INT PNP */
@@ -367,12 +367,14 @@ static const struct pnp_device_id pnp_dev_table[] = {
 	{	"PNPCXXX",		UNKNOWN_DEV	},
 	/* More unknown PnP modems */
 	{	"PNPDXXX",		UNKNOWN_DEV	},
-	/* Winbond CIR port, should not be probed. We should keep track
-	   of it to prevent the legacy serial driver from probing it */
+	/*
+	 * Winbond CIR port, should not be probed. We should keep track of
+	 * it to prevent the legacy serial driver from probing it.
+	 */
 	{	"WEC1022",		CIR_PORT	},
 	/*
-	 * SMSC IrCC SIR/FIR port, should not be probed by serial driver
-	 * as well so its own driver can bind to it.
+	 * SMSC IrCC SIR/FIR port, should not be probed by serial driver as
+	 * well so its own driver can bind to it.
 	 */
 	{	"SMCF010",		CIR_PORT	},
 	{	"",			0	}
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index f2e588e..5375c24 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -250,9 +250,11 @@ static const struct serial8250_config uart_config[] = {
 		.fcr		= UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
 		.flags		= UART_CAP_FIFO | UART_CAP_AFE,
 	},
-/* tx_loadsz is set to 63-bytes instead of 64-bytes to implement
-workaround of errata A-008006 which states that tx_loadsz should  be
-configured less than Maximum supported fifo bytes */
+	/*
+	 * tx_loadsz is set to 63-bytes instead of 64-bytes to implement
+	 * workaround of errata A-008006 which states that tx_loadsz should
+	 * be configured less than Maximum supported fifo bytes.
+	 */
 	[PORT_16550A_FSL64] = {
 		.name		= "16550A_FSL64",
 		.fifo_size	= 64,
@@ -1969,23 +1971,23 @@ int serial8250_do_startup(struct uart_port *port)
 
 	serial8250_set_mctrl(port, port->mctrl);
 
-	/* Serial over Lan (SoL) hack:
-	   Intel 8257x Gigabit ethernet chips have a
-	   16550 emulation, to be used for Serial Over Lan.
-	   Those chips take a longer time than a normal
-	   serial device to signalize that a transmission
-	   data was queued. Due to that, the above test generally
-	   fails. One solution would be to delay the reading of
-	   iir. However, this is not reliable, since the timeout
-	   is variable. So, let's just don't test if we receive
-	   TX irq. This way, we'll never enable UART_BUG_TXEN.
+	/*
+	 * Serial over Lan (SoL) hack:
+	 * Intel 8257x Gigabit ethernet chips have a 16550 emulation, to be
+	 * used for Serial Over Lan.  Those chips take a longer time than a
+	 * normal serial device to signalize that a transmission data was
+	 * queued. Due to that, the above test generally fails. One solution
+	 * would be to delay the reading of iir. However, this is not
+	 * reliable, since the timeout is variable. So, let's just don't
+	 * test if we receive TX irq.  This way, we'll never enable
+	 * UART_BUG_TXEN.
 	 */
 	if (up->port.flags & UPF_NO_TXEN_TEST)
 		goto dont_test_tx_en;
 
 	/*
-	 * Do a quick test to see if we receive an
-	 * interrupt when we enable the TX irq.
+	 * Do a quick test to see if we receive an interrupt when we enable
+	 * the TX irq.
 	 */
 	serial_port_out(port, UART_IER, UART_IER_THRI);
 	lsr = serial_port_in(port, UART_LSR);
diff --git a/drivers/tty/serial/8250/serial_cs.c b/drivers/tty/serial/8250/serial_cs.c
index 6d7a801..2b7309d 100644
--- a/drivers/tty/serial/8250/serial_cs.c
+++ b/drivers/tty/serial/8250/serial_cs.c
@@ -441,16 +441,20 @@ static int simple_config(struct pcmcia_device *link)
 	struct serial_info *info = link->priv;
 	int i = -ENODEV, try;
 
-	/* First pass: look for a config entry that looks normal.
-	 * Two tries: without IO aliases, then with aliases */
+	/*
+	 * First pass: look for a config entry that looks normal.
+	 * Two tries: without IO aliases, then with aliases.
+	 */
 	link->config_flags |= CONF_AUTO_SET_VPP;
 	for (try = 0; try < 4; try++)
 		if (!pcmcia_loop_config(link, simple_config_check, &try))
 			goto found_port;
 
-	/* Second pass: try to find an entry that isn't picky about
-	   its base address, then try to grab any standard serial port
-	   address, and finally try to get any free port. */
+	/*
+	 * Second pass: try to find an entry that isn't picky about
+	 * its base address, then try to grab any standard serial port
+	 * address, and finally try to get any free port.
+	 */
 	if (!pcmcia_loop_config(link, simple_config_check_notpicky, NULL))
 		goto found_port;
 
@@ -480,8 +484,10 @@ static int multi_config_check(struct pcmcia_device *p_dev, void *priv_data)
 	if (p_dev->resource[1]->end)
 		return -EINVAL;
 
-	/* The quad port cards have bad CIS's, so just look for a
-	   window larger than 8 ports and assume it will be right */
+	/*
+	 * The quad port cards have bad CIS's, so just look for a
+	 * window larger than 8 ports and assume it will be right.
+	 */
 	if (p_dev->resource[0]->end <= 8)
 		return -EINVAL;
 
@@ -623,8 +629,10 @@ static int serial_config(struct pcmcia_device *link)
 			break;
 		}
 
-	/* Another check for dual-serial cards: look for either serial or
-	   multifunction cards that ask for appropriate IO port ranges */
+	/*
+	 * Another check for dual-serial cards: look for either serial or
+	 * multifunction cards that ask for appropriate IO port ranges.
+	 */
 	if ((info->multi == 0) &&
 	    (link->has_func_id) &&
 	    (link->socket->pcmcia_pfc == 0) &&
-- 
1.9.1

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

* [PATCH v7 05/15] tty: serial: 8250: Remove else after return
  2016-01-14 15:08 [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
@ 2016-01-14 15:08   ` Anton Wuerfel
  2016-01-14 15:08   ` Anton Wuerfel
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

This patch fixes checkpatch warnings about unnecessary else blocks afte=
r
return statements.

Signed-off-by: Anton W=C3=BCrfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_pci.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/82=
50/8250_pci.c
index 534ca18..8543719 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -805,10 +805,10 @@ static int pci_netmos_9900_numports(struct pci_de=
v *dev)
=20
 	pi =3D (c & 0xff);
=20
-	if (pi =3D=3D 2) {
+	if (pi =3D=3D 2)
 		return 1;
-	} else if ((pi =3D=3D 0) &&
-			   (dev->device =3D=3D PCI_DEVICE_ID_NETMOS_9900)) {
+
+	if ((pi =3D=3D 0) && (dev->device =3D=3D PCI_DEVICE_ID_NETMOS_9900)) =
{
 		/* two possibilities: 0x30ps encodes number of parallel and
 		 * serial ports, or 0x1000 indicates *something*. This is not
 		 * immediately obvious, since the 2s1p+4s configuration seems
@@ -816,12 +816,12 @@ static int pci_netmos_9900_numports(struct pci_de=
v *dev)
 		 * advertising the same function 3 as the 4s+2s1p config.
 		 */
 		sub_serports =3D dev->subsystem_device & 0xf;
-		if (sub_serports > 0) {
+		if (sub_serports > 0)
 			return sub_serports;
-		} else {
-			dev_err(&dev->dev, "NetMos/Mostech serial driver ignoring port on a=
mbiguous config.\n");
-			return 0;
-		}
+
+		dev_err(&dev->dev,
+			"NetMos/Mostech serial driver ignoring port on ambiguous config.\n"=
);
+		return 0;
 	}
=20
 	moan_device("unknown NetMos/Mostech program interface", dev);
--=20
1.9.1

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

* [PATCH v7 05/15] tty: serial: 8250: Remove else after return
@ 2016-01-14 15:08   ` Anton Wuerfel
  0 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

This patch fixes checkpatch warnings about unnecessary else blocks after
return statements.

Signed-off-by: Anton Würfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_pci.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index 534ca18..8543719 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -805,10 +805,10 @@ static int pci_netmos_9900_numports(struct pci_dev *dev)
 
 	pi = (c & 0xff);
 
-	if (pi == 2) {
+	if (pi == 2)
 		return 1;
-	} else if ((pi == 0) &&
-			   (dev->device == PCI_DEVICE_ID_NETMOS_9900)) {
+
+	if ((pi == 0) && (dev->device == PCI_DEVICE_ID_NETMOS_9900)) {
 		/* two possibilities: 0x30ps encodes number of parallel and
 		 * serial ports, or 0x1000 indicates *something*. This is not
 		 * immediately obvious, since the 2s1p+4s configuration seems
@@ -816,12 +816,12 @@ static int pci_netmos_9900_numports(struct pci_dev *dev)
 		 * advertising the same function 3 as the 4s+2s1p config.
 		 */
 		sub_serports = dev->subsystem_device & 0xf;
-		if (sub_serports > 0) {
+		if (sub_serports > 0)
 			return sub_serports;
-		} else {
-			dev_err(&dev->dev, "NetMos/Mostech serial driver ignoring port on ambiguous config.\n");
-			return 0;
-		}
+
+		dev_err(&dev->dev,
+			"NetMos/Mostech serial driver ignoring port on ambiguous config.\n");
+		return 0;
 	}
 
 	moan_device("unknown NetMos/Mostech program interface", dev);
-- 
1.9.1

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

* [PATCH v7 06/15] tty: serial: 8250: Move EXPORT_SYMBOL to function
  2016-01-14 15:08 [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
@ 2016-01-14 15:08   ` Anton Wuerfel
  2016-01-14 15:08   ` Anton Wuerfel
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

This patch moves EXPORT_SYMBOL macros directly after the definition of
the corresponding symbol to remove checkpatch warnings.

Signed-off-by: Anton W=C3=BCrfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8=
250/8250_core.c
index 3912646..15082ae 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -763,6 +763,7 @@ void serial8250_suspend_port(int line)
=20
 	uart_suspend_port(&serial8250_reg, port);
 }
+EXPORT_SYMBOL(serial8250_suspend_port);
=20
 /**
  *	serial8250_resume_port - resume one serial port
@@ -788,6 +789,7 @@ void serial8250_resume_port(int line)
 	}
 	uart_resume_port(&serial8250_reg, port);
 }
+EXPORT_SYMBOL(serial8250_resume_port);
=20
 /*
  * Register a set of serial devices attached to a platform device.  Th=
e
@@ -1167,9 +1169,6 @@ static void __exit serial8250_exit(void)
 module_init(serial8250_init);
 module_exit(serial8250_exit);
=20
-EXPORT_SYMBOL(serial8250_suspend_port);
-EXPORT_SYMBOL(serial8250_resume_port);
-
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Generic 8250/16x50 serial driver");
=20
--=20
1.9.1

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

* [PATCH v7 06/15] tty: serial: 8250: Move EXPORT_SYMBOL to function
@ 2016-01-14 15:08   ` Anton Wuerfel
  0 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

This patch moves EXPORT_SYMBOL macros directly after the definition of
the corresponding symbol to remove checkpatch warnings.

Signed-off-by: Anton Würfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index 3912646..15082ae 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -763,6 +763,7 @@ void serial8250_suspend_port(int line)
 
 	uart_suspend_port(&serial8250_reg, port);
 }
+EXPORT_SYMBOL(serial8250_suspend_port);
 
 /**
  *	serial8250_resume_port - resume one serial port
@@ -788,6 +789,7 @@ void serial8250_resume_port(int line)
 	}
 	uart_resume_port(&serial8250_reg, port);
 }
+EXPORT_SYMBOL(serial8250_resume_port);
 
 /*
  * Register a set of serial devices attached to a platform device.  The
@@ -1167,9 +1169,6 @@ static void __exit serial8250_exit(void)
 module_init(serial8250_init);
 module_exit(serial8250_exit);
 
-EXPORT_SYMBOL(serial8250_suspend_port);
-EXPORT_SYMBOL(serial8250_resume_port);
-
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Generic 8250/16x50 serial driver");
 
-- 
1.9.1

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

* [PATCH v7 07/15] tty: serial: 8250: Fix line continuation warning
  2016-01-14 15:08 [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
@ 2016-01-14 15:08   ` Anton Wuerfel
  2016-01-14 15:08   ` Anton Wuerfel
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

=46ixed checkpatch warning about an unnecessary line continuation in a
multi-line variable assignment.

Signed-off-by: Anton W=C3=BCrfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_hp300.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_hp300.c b/drivers/tty/serial/=
8250/8250_hp300.c
index 5e1b464..cf566bb 100644
--- a/drivers/tty/serial/8250/8250_hp300.c
+++ b/drivers/tty/serial/8250/8250_hp300.c
@@ -248,8 +248,8 @@ static int __init hp300_8250_init(void)
=20
 		/* Memory mapped I/O */
 		uart.port.iotype =3D UPIO_MEM;
-		uart.port.flags =3D UPF_SKIP_TEST | UPF_SHARE_IRQ \
-			      | UPF_BOOT_AUTOCONF;
+		uart.port.flags =3D UPF_SKIP_TEST | UPF_SHARE_IRQ
+				| UPF_BOOT_AUTOCONF;
 		/* XXX - no interrupt support yet */
 		uart.port.irq =3D 0;
 		uart.port.uartclk =3D HPAPCI_BAUD_BASE * 16;
--=20
1.9.1

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

* [PATCH v7 07/15] tty: serial: 8250: Fix line continuation warning
@ 2016-01-14 15:08   ` Anton Wuerfel
  0 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

Fixed checkpatch warning about an unnecessary line continuation in a
multi-line variable assignment.

Signed-off-by: Anton Würfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_hp300.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_hp300.c b/drivers/tty/serial/8250/8250_hp300.c
index 5e1b464..cf566bb 100644
--- a/drivers/tty/serial/8250/8250_hp300.c
+++ b/drivers/tty/serial/8250/8250_hp300.c
@@ -248,8 +248,8 @@ static int __init hp300_8250_init(void)
 
 		/* Memory mapped I/O */
 		uart.port.iotype = UPIO_MEM;
-		uart.port.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ \
-			      | UPF_BOOT_AUTOCONF;
+		uart.port.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ
+				| UPF_BOOT_AUTOCONF;
 		/* XXX - no interrupt support yet */
 		uart.port.irq = 0;
 		uart.port.uartclk = HPAPCI_BAUD_BASE * 16;
-- 
1.9.1

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

* [PATCH v7 08/15] tty: serial: 8250: Add parentheses to macro
  2016-01-14 15:08 [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
@ 2016-01-14 15:08   ` Anton Wuerfel
  2016-01-14 15:08   ` Anton Wuerfel
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

This patch fixes a checkpatch warning caused by missing parentheses
in the definition of a macro.
=46urthermore redundant parentheses are removed in an assignment.

Signed-off-by: Anton W=C3=BCrfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_core.c | 2 +-
 drivers/tty/serial/8250/8250_pci.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8=
250/8250_core.c
index 15082ae..d042ad5 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -686,7 +686,7 @@ static int __init univ8250_console_init(void)
 }
 console_initcall(univ8250_console_init);
=20
-#define SERIAL8250_CONSOLE	&univ8250_console
+#define SERIAL8250_CONSOLE	(&univ8250_console)
 #else
 #define SERIAL8250_CONSOLE	NULL
 #endif
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/82=
50/8250_pci.c
index 8543719..fbd4222 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -803,7 +803,7 @@ static int pci_netmos_9900_numports(struct pci_dev =
*dev)
 	unsigned int pi;
 	unsigned short sub_serports;
=20
-	pi =3D (c & 0xff);
+	pi =3D c & 0xff;
=20
 	if (pi =3D=3D 2)
 		return 1;
--=20
1.9.1

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

* [PATCH v7 08/15] tty: serial: 8250: Add parentheses to macro
@ 2016-01-14 15:08   ` Anton Wuerfel
  0 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

This patch fixes a checkpatch warning caused by missing parentheses
in the definition of a macro.
Furthermore redundant parentheses are removed in an assignment.

Signed-off-by: Anton Würfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_core.c | 2 +-
 drivers/tty/serial/8250/8250_pci.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index 15082ae..d042ad5 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -686,7 +686,7 @@ static int __init univ8250_console_init(void)
 }
 console_initcall(univ8250_console_init);
 
-#define SERIAL8250_CONSOLE	&univ8250_console
+#define SERIAL8250_CONSOLE	(&univ8250_console)
 #else
 #define SERIAL8250_CONSOLE	NULL
 #endif
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index 8543719..fbd4222 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -803,7 +803,7 @@ static int pci_netmos_9900_numports(struct pci_dev *dev)
 	unsigned int pi;
 	unsigned short sub_serports;
 
-	pi = (c & 0xff);
+	pi = c & 0xff;
 
 	if (pi == 2)
 		return 1;
-- 
1.9.1

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

* [PATCH v7 09/15] tty: serial: 8250: Fix multi-line strings
  2016-01-14 15:08 [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
@ 2016-01-14 15:08   ` Anton Wuerfel
  2016-01-14 15:08   ` Anton Wuerfel
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

Merged user-visible multi-line strings into a single line according to =
the
Linux Kernel Coding Style, which allows user-visible strings to exceed =
the
maximum line length of 80 characters. The main reason for this is to
facilitate grepping for these strings.
However, some strings were ignored in this patch, because the use of
format specifiers breaks the ability to grep anyway.

Signed-off-by: Anton W=C3=BCrfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_core.c | 3 +--
 drivers/tty/serial/8250/serial_cs.c | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8=
250/8250_core.c
index d042ad5..b60b58b 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -1173,8 +1173,7 @@ MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Generic 8250/16x50 serial driver");
=20
 module_param(share_irqs, uint, 0644);
-MODULE_PARM_DESC(share_irqs, "Share IRQs with other non-8250/16x50 dev=
ices"
-	" (unsafe)");
+MODULE_PARM_DESC(share_irqs, "Share IRQs with other non-8250/16x50 dev=
ices (unsafe)");
=20
 module_param(nr_uarts, uint, 0644);
 MODULE_PARM_DESC(nr_uarts, "Maximum number of UARTs supported. (1-" __=
MODULE_STRING(CONFIG_SERIAL_8250_NR_UARTS) ")");
diff --git a/drivers/tty/serial/8250/serial_cs.c b/drivers/tty/serial/8=
250/serial_cs.c
index 2b7309d..933c268 100644
--- a/drivers/tty/serial/8250/serial_cs.c
+++ b/drivers/tty/serial/8250/serial_cs.c
@@ -533,8 +533,8 @@ static int multi_config(struct pcmcia_device *link)
 		info->multi =3D 2;
 		if (pcmcia_loop_config(link, multi_config_check_notpicky,
 				       &base2)) {
-			dev_warn(&link->dev, "no usable port range "
-			       "found, giving up\n");
+			dev_warn(&link->dev,
+				 "no usable port range found, giving up\n");
 			return -ENODEV;
 		}
 	}
--=20
1.9.1

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

* [PATCH v7 09/15] tty: serial: 8250: Fix multi-line strings
@ 2016-01-14 15:08   ` Anton Wuerfel
  0 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

Merged user-visible multi-line strings into a single line according to the
Linux Kernel Coding Style, which allows user-visible strings to exceed the
maximum line length of 80 characters. The main reason for this is to
facilitate grepping for these strings.
However, some strings were ignored in this patch, because the use of
format specifiers breaks the ability to grep anyway.

Signed-off-by: Anton Würfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_core.c | 3 +--
 drivers/tty/serial/8250/serial_cs.c | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index d042ad5..b60b58b 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -1173,8 +1173,7 @@ MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Generic 8250/16x50 serial driver");
 
 module_param(share_irqs, uint, 0644);
-MODULE_PARM_DESC(share_irqs, "Share IRQs with other non-8250/16x50 devices"
-	" (unsafe)");
+MODULE_PARM_DESC(share_irqs, "Share IRQs with other non-8250/16x50 devices (unsafe)");
 
 module_param(nr_uarts, uint, 0644);
 MODULE_PARM_DESC(nr_uarts, "Maximum number of UARTs supported. (1-" __MODULE_STRING(CONFIG_SERIAL_8250_NR_UARTS) ")");
diff --git a/drivers/tty/serial/8250/serial_cs.c b/drivers/tty/serial/8250/serial_cs.c
index 2b7309d..933c268 100644
--- a/drivers/tty/serial/8250/serial_cs.c
+++ b/drivers/tty/serial/8250/serial_cs.c
@@ -533,8 +533,8 @@ static int multi_config(struct pcmcia_device *link)
 		info->multi = 2;
 		if (pcmcia_loop_config(link, multi_config_check_notpicky,
 				       &base2)) {
-			dev_warn(&link->dev, "no usable port range "
-			       "found, giving up\n");
+			dev_warn(&link->dev,
+				 "no usable port range found, giving up\n");
 			return -ENODEV;
 		}
 	}
-- 
1.9.1

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

* [PATCH v7 10/15] tty: serial: 8250: Suitably replace printk
  2016-01-14 15:08 [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
@ 2016-01-14 15:08   ` Anton Wuerfel
  2016-01-14 15:08   ` Anton Wuerfel
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Würfel

=46rom: Phillip Raffeck <phillip.raffeck@fau.de>

This patch replaces printk by the corresponding variant of dev_* in ord=
er
to fix checkpatch warnings. If no suitable device pointer is present, t=
he
corresponding pr_* variant is used.

Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Signed-off-by: Anton W=C3=BCrfel <anton.wuerfel@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_core.c  |  5 ++---
 drivers/tty/serial/8250/8250_gsc.c   |  7 ++++---
 drivers/tty/serial/8250/8250_hp300.c | 20 +++++++++++---------
 drivers/tty/serial/8250/8250_port.c  |  3 +--
 4 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8=
250/8250_core.c
index b60b58b..d6b4906 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -1094,9 +1094,8 @@ static int __init serial8250_init(void)
=20
 	serial8250_isa_init_ports();
=20
-	printk(KERN_INFO "Serial: 8250/16550 driver, "
-		"%d ports, IRQ sharing %sabled\n", nr_uarts,
-		share_irqs ? "en" : "dis");
+	pr_info("Serial: 8250/16550 driver, %d ports, IRQ sharing %sabled\n",
+		nr_uarts, share_irqs ? "en" : "dis");
=20
 #ifdef CONFIG_SPARC
 	ret =3D sunserial_register_minors(&serial8250_reg, UART_NR);
diff --git a/drivers/tty/serial/8250/8250_gsc.c b/drivers/tty/serial/82=
50/8250_gsc.c
index 2e3ea1a..b1e6ae9 100644
--- a/drivers/tty/serial/8250/8250_gsc.c
+++ b/drivers/tty/serial/8250/8250_gsc.c
@@ -42,7 +42,7 @@ static int __init serial_init_chip(struct parisc_devi=
ce *dev)
 		 * the user what they're missing.
 		 */
 		if (parisc_parent(dev)->id.hw_type !=3D HPHW_IOA)
-			printk(KERN_INFO
+			dev_info(&dev->dev,
 				"Serial: device 0x%llx not configured.\n"
 				"Enable support for Wax, Lasi, Asp or Dino.\n",
 				(unsigned long long)dev->hpa.start);
@@ -66,8 +66,9 @@ static int __init serial_init_chip(struct parisc_devi=
ce *dev)
=20
 	err =3D serial8250_register_8250_port(&uart);
 	if (err < 0) {
-		printk(KERN_WARNING
-			"serial8250_register_8250_port returned error %d\n", err);
+		dev_warn(&dev->dev,
+			"serial8250_register_8250_port returned error %d\n",
+			err);
 		iounmap(uart.port.membase);
 		return err;
 	}
diff --git a/drivers/tty/serial/8250/8250_hp300.c b/drivers/tty/serial/=
8250/8250_hp300.c
index cf566bb..38166db 100644
--- a/drivers/tty/serial/8250/8250_hp300.c
+++ b/drivers/tty/serial/8250/8250_hp300.c
@@ -110,7 +110,7 @@ int __init hp300_setup_serial_console(void)
 	/* Check for APCI console */
 	if (scode =3D=3D 256) {
 #ifdef CONFIG_HPAPCI
-		printk(KERN_INFO "Serial console is HP APCI 1\n");
+		pr_info("Serial console is HP APCI 1\n");
=20
 		port.uartclk =3D HPAPCI_BAUD_BASE * 16;
 		port.mapbase =3D (FRODO_BASE + FRODO_APCI_OFFSET(1));
@@ -118,7 +118,7 @@ int __init hp300_setup_serial_console(void)
 		port.regshift =3D 2;
 		add_preferred_console("ttyS", port.line, "9600n8");
 #else
-		printk(KERN_WARNING "Serial console is APCI but support is disabled =
(CONFIG_HPAPCI)!\n");
+		pr_warn("Serial console is APCI but support is disabled (CONFIG_HPAP=
CI)!\n");
 		return 0;
 #endif
 	} else {
@@ -127,7 +127,7 @@ int __init hp300_setup_serial_console(void)
 		if (!pa)
 			return 0;
=20
-		printk(KERN_INFO "Serial console is HP DCA at select code %d\n", sco=
de);
+		pr_info("Serial console is HP DCA at select code %d\n", scode);
=20
 		port.uartclk =3D HPDCA_BAUD_BASE * 16;
 		port.mapbase =3D (pa + UART_OFFSET);
@@ -141,13 +141,13 @@ int __init hp300_setup_serial_console(void)
 		if (DIO_ID(pa + DIO_VIRADDRBASE) & 0x80)
 			add_preferred_console("ttyS", port.line, "9600n8");
 #else
-		printk(KERN_WARNING "Serial console is DCA but support is disabled (=
CONFIG_HPDCA)!\n");
+		pr_warn("Serial console is DCA but support is disabled (CONFIG_HPDCA=
)!\n");
 		return 0;
 #endif
 	}
=20
 	if (early_serial_setup(&port) < 0)
-		printk(KERN_WARNING "hp300_setup_serial_console(): early_serial_setu=
p() failed.\n");
+		pr_warn("%s: early_serial_setup() failed.\n", __func__);
 	return 0;
 }
 #endif /* CONFIG_SERIAL_8250_CONSOLE */
@@ -179,8 +179,9 @@ static int hpdca_init_one(struct dio_dev *d,
 	line =3D serial8250_register_8250_port(&uart);
=20
 	if (line < 0) {
-		printk(KERN_NOTICE "8250_hp300: register_serial() DCA scode %d"
-		       " irq %d failed\n", d->scode, uart.port.irq);
+		dev_notice(&d->dev,
+			  "8250_hp300: register_serial() DCA scode %d irq %d failed\n",
+			  d->scode, uart.port.irq);
 		return -ENOMEM;
 	}
=20
@@ -260,8 +261,9 @@ static int __init hp300_8250_init(void)
 		line =3D serial8250_register_8250_port(&uart);
=20
 		if (line < 0) {
-			printk(KERN_NOTICE "8250_hp300: register_serial() APCI"
-			       " %d irq %d failed\n", i, uart.port.irq);
+			dev_notice(uart.port.dev,
+				   "8250_hp300: register_serial() APCI %d irq %d failed\n",
+				   i, uart.port.irq);
 			kfree(port);
 			continue;
 		}
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8=
250/8250_port.c
index 5375c24..25fd6b4 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -1222,8 +1222,7 @@ static void autoconfig(struct uart_8250_port *up)
 out_lock:
 	spin_unlock_irqrestore(&port->lock, flags);
 	if (up->capabilities !=3D old_capabilities) {
-		printk(KERN_WARNING
-		       "ttyS%d: detected caps %08x should be %08x\n",
+		pr_warn("ttyS%d: detected caps %08x should be %08x\n",
 		       serial_index(port), old_capabilities,
 		       up->capabilities);
 	}
--=20
1.9.1

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

* [PATCH v7 10/15] tty: serial: 8250: Suitably replace printk
@ 2016-01-14 15:08   ` Anton Wuerfel
  0 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Würfel

From: Phillip Raffeck <phillip.raffeck@fau.de>

This patch replaces printk by the corresponding variant of dev_* in order
to fix checkpatch warnings. If no suitable device pointer is present, the
corresponding pr_* variant is used.

Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Signed-off-by: Anton Würfel <anton.wuerfel@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_core.c  |  5 ++---
 drivers/tty/serial/8250/8250_gsc.c   |  7 ++++---
 drivers/tty/serial/8250/8250_hp300.c | 20 +++++++++++---------
 drivers/tty/serial/8250/8250_port.c  |  3 +--
 4 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index b60b58b..d6b4906 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -1094,9 +1094,8 @@ static int __init serial8250_init(void)
 
 	serial8250_isa_init_ports();
 
-	printk(KERN_INFO "Serial: 8250/16550 driver, "
-		"%d ports, IRQ sharing %sabled\n", nr_uarts,
-		share_irqs ? "en" : "dis");
+	pr_info("Serial: 8250/16550 driver, %d ports, IRQ sharing %sabled\n",
+		nr_uarts, share_irqs ? "en" : "dis");
 
 #ifdef CONFIG_SPARC
 	ret = sunserial_register_minors(&serial8250_reg, UART_NR);
diff --git a/drivers/tty/serial/8250/8250_gsc.c b/drivers/tty/serial/8250/8250_gsc.c
index 2e3ea1a..b1e6ae9 100644
--- a/drivers/tty/serial/8250/8250_gsc.c
+++ b/drivers/tty/serial/8250/8250_gsc.c
@@ -42,7 +42,7 @@ static int __init serial_init_chip(struct parisc_device *dev)
 		 * the user what they're missing.
 		 */
 		if (parisc_parent(dev)->id.hw_type != HPHW_IOA)
-			printk(KERN_INFO
+			dev_info(&dev->dev,
 				"Serial: device 0x%llx not configured.\n"
 				"Enable support for Wax, Lasi, Asp or Dino.\n",
 				(unsigned long long)dev->hpa.start);
@@ -66,8 +66,9 @@ static int __init serial_init_chip(struct parisc_device *dev)
 
 	err = serial8250_register_8250_port(&uart);
 	if (err < 0) {
-		printk(KERN_WARNING
-			"serial8250_register_8250_port returned error %d\n", err);
+		dev_warn(&dev->dev,
+			"serial8250_register_8250_port returned error %d\n",
+			err);
 		iounmap(uart.port.membase);
 		return err;
 	}
diff --git a/drivers/tty/serial/8250/8250_hp300.c b/drivers/tty/serial/8250/8250_hp300.c
index cf566bb..38166db 100644
--- a/drivers/tty/serial/8250/8250_hp300.c
+++ b/drivers/tty/serial/8250/8250_hp300.c
@@ -110,7 +110,7 @@ int __init hp300_setup_serial_console(void)
 	/* Check for APCI console */
 	if (scode == 256) {
 #ifdef CONFIG_HPAPCI
-		printk(KERN_INFO "Serial console is HP APCI 1\n");
+		pr_info("Serial console is HP APCI 1\n");
 
 		port.uartclk = HPAPCI_BAUD_BASE * 16;
 		port.mapbase = (FRODO_BASE + FRODO_APCI_OFFSET(1));
@@ -118,7 +118,7 @@ int __init hp300_setup_serial_console(void)
 		port.regshift = 2;
 		add_preferred_console("ttyS", port.line, "9600n8");
 #else
-		printk(KERN_WARNING "Serial console is APCI but support is disabled (CONFIG_HPAPCI)!\n");
+		pr_warn("Serial console is APCI but support is disabled (CONFIG_HPAPCI)!\n");
 		return 0;
 #endif
 	} else {
@@ -127,7 +127,7 @@ int __init hp300_setup_serial_console(void)
 		if (!pa)
 			return 0;
 
-		printk(KERN_INFO "Serial console is HP DCA at select code %d\n", scode);
+		pr_info("Serial console is HP DCA at select code %d\n", scode);
 
 		port.uartclk = HPDCA_BAUD_BASE * 16;
 		port.mapbase = (pa + UART_OFFSET);
@@ -141,13 +141,13 @@ int __init hp300_setup_serial_console(void)
 		if (DIO_ID(pa + DIO_VIRADDRBASE) & 0x80)
 			add_preferred_console("ttyS", port.line, "9600n8");
 #else
-		printk(KERN_WARNING "Serial console is DCA but support is disabled (CONFIG_HPDCA)!\n");
+		pr_warn("Serial console is DCA but support is disabled (CONFIG_HPDCA)!\n");
 		return 0;
 #endif
 	}
 
 	if (early_serial_setup(&port) < 0)
-		printk(KERN_WARNING "hp300_setup_serial_console(): early_serial_setup() failed.\n");
+		pr_warn("%s: early_serial_setup() failed.\n", __func__);
 	return 0;
 }
 #endif /* CONFIG_SERIAL_8250_CONSOLE */
@@ -179,8 +179,9 @@ static int hpdca_init_one(struct dio_dev *d,
 	line = serial8250_register_8250_port(&uart);
 
 	if (line < 0) {
-		printk(KERN_NOTICE "8250_hp300: register_serial() DCA scode %d"
-		       " irq %d failed\n", d->scode, uart.port.irq);
+		dev_notice(&d->dev,
+			  "8250_hp300: register_serial() DCA scode %d irq %d failed\n",
+			  d->scode, uart.port.irq);
 		return -ENOMEM;
 	}
 
@@ -260,8 +261,9 @@ static int __init hp300_8250_init(void)
 		line = serial8250_register_8250_port(&uart);
 
 		if (line < 0) {
-			printk(KERN_NOTICE "8250_hp300: register_serial() APCI"
-			       " %d irq %d failed\n", i, uart.port.irq);
+			dev_notice(uart.port.dev,
+				   "8250_hp300: register_serial() APCI %d irq %d failed\n",
+				   i, uart.port.irq);
 			kfree(port);
 			continue;
 		}
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 5375c24..25fd6b4 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -1222,8 +1222,7 @@ static void autoconfig(struct uart_8250_port *up)
 out_lock:
 	spin_unlock_irqrestore(&port->lock, flags);
 	if (up->capabilities != old_capabilities) {
-		printk(KERN_WARNING
-		       "ttyS%d: detected caps %08x should be %08x\n",
+		pr_warn("ttyS%d: detected caps %08x should be %08x\n",
 		       serial_index(port), old_capabilities,
 		       up->capabilities);
 	}
-- 
1.9.1

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

* [PATCH v7 11/15] tty: serial: 8250: Remove SERIAL_DEBUG_PNP macro
  2016-01-14 15:08 [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
@ 2016-01-14 15:08   ` Anton Wuerfel
  2016-01-14 15:08   ` Anton Wuerfel
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Würfel

=46rom: Phillip Raffeck <phillip.raffeck@fau.de>

This patch removes the macro SERIAL_DEBUG_PNP, which is used to enable
debugging at compile time.
As SERIAL_DEBUG_PNP is an orphan, the corresponding #ifdef is removed.
To keep the ability to enable debugging at compile time,
the call to printk(KERN_DEBUG ...) is replaced by a corresponding
call to dev_dbg(), which is configurable via CONFIG_DYNAMIC_DEBUG.

Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Signed-off-by: Anton W=C3=BCrfel <anton.wuerfel@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_pnp.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/82=
50/8250_pnp.c
index 00846a7..0c32c59 100644
--- a/drivers/tty/serial/8250/8250_pnp.c
+++ b/drivers/tty/serial/8250/8250_pnp.c
@@ -464,11 +464,11 @@ serial_pnp_probe(struct pnp_dev *dev, const struc=
t pnp_device_id *dev_id)
 	} else
 		return -ENODEV;
=20
-#ifdef SERIAL_DEBUG_PNP
-	printk(KERN_DEBUG
-		"Setup PNP port: port %x, mem 0x%lx, irq %d, type %d\n",
-		       uart.port.iobase, uart.port.mapbase, uart.port.irq, uart.port=
=2Eiotype);
-#endif
+	dev_dbg(&dev->dev,
+		 "Setup PNP port: port %x, mem 0x%lx, irq %d, type %d\n",
+		 uart.port.iobase, uart.port.mapbase,
+		 uart.port.irq, uart.port.iotype);
+
 	if (flags & CIR_PORT) {
 		uart.port.flags |=3D UPF_FIXED_PORT | UPF_FIXED_TYPE;
 		uart.port.type =3D PORT_8250_CIR;
--=20
1.9.1

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

* [PATCH v7 11/15] tty: serial: 8250: Remove SERIAL_DEBUG_PNP macro
@ 2016-01-14 15:08   ` Anton Wuerfel
  0 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Würfel

From: Phillip Raffeck <phillip.raffeck@fau.de>

This patch removes the macro SERIAL_DEBUG_PNP, which is used to enable
debugging at compile time.
As SERIAL_DEBUG_PNP is an orphan, the corresponding #ifdef is removed.
To keep the ability to enable debugging at compile time,
the call to printk(KERN_DEBUG ...) is replaced by a corresponding
call to dev_dbg(), which is configurable via CONFIG_DYNAMIC_DEBUG.

Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Signed-off-by: Anton Würfel <anton.wuerfel@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_pnp.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/8250/8250_pnp.c
index 00846a7..0c32c59 100644
--- a/drivers/tty/serial/8250/8250_pnp.c
+++ b/drivers/tty/serial/8250/8250_pnp.c
@@ -464,11 +464,11 @@ serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
 	} else
 		return -ENODEV;
 
-#ifdef SERIAL_DEBUG_PNP
-	printk(KERN_DEBUG
-		"Setup PNP port: port %x, mem 0x%lx, irq %d, type %d\n",
-		       uart.port.iobase, uart.port.mapbase, uart.port.irq, uart.port.iotype);
-#endif
+	dev_dbg(&dev->dev,
+		 "Setup PNP port: port %x, mem 0x%lx, irq %d, type %d\n",
+		 uart.port.iobase, uart.port.mapbase,
+		 uart.port.irq, uart.port.iotype);
+
 	if (flags & CIR_PORT) {
 		uart.port.flags |= UPF_FIXED_PORT | UPF_FIXED_TYPE;
 		uart.port.type = PORT_8250_CIR;
-- 
1.9.1

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

* [PATCH v7 12/15] tty: serial: 8250: Correct conversion specifiers
  2016-01-14 15:08 [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
@ 2016-01-14 15:08   ` Anton Wuerfel
  2016-01-14 15:08   ` Anton Wuerfel
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

This patch fixes compiler warnings about wrong conversion specifiers us=
ed
in a debug output in 8250_pnp.c. The precise warning is:

drivers/tty/serial/8250/8250_pnp.c: In function =E2=80=98serial_pnp_pro=
be=E2=80=99:
include/linux/dynamic_debug.h:64:16: warning: format =E2=80=98%x=E2=80=99=
 expects argument
of [...]

drivers/tty/serial/8250/8250_pnp.c:467:2: note: in expansion of macro
=E2=80=98dev_dbg=E2=80=99
  dev_dbg(&dev->dev,
  ^
include/linux/dynamic_debug.h:64:16: warning: format =E2=80=98%lx=E2=80=
=99 expects argument
of [...]

drivers/tty/serial/8250/8250_pnp.c:467:2: note: in expansion of macro
=E2=80=98dev_dbg=E2=80=99
  dev_dbg(&dev->dev,
  ^

Those warnings never got triggered, because the command was nested
in an #ifdef, which is removed by a patch of this series.

Signed-off-by: Anton W=C3=BCrfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_pnp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/82=
50/8250_pnp.c
index 0c32c59..b2d163c 100644
--- a/drivers/tty/serial/8250/8250_pnp.c
+++ b/drivers/tty/serial/8250/8250_pnp.c
@@ -465,8 +465,8 @@ serial_pnp_probe(struct pnp_dev *dev, const struct =
pnp_device_id *dev_id)
 		return -ENODEV;
=20
 	dev_dbg(&dev->dev,
-		 "Setup PNP port: port %x, mem 0x%lx, irq %d, type %d\n",
-		 uart.port.iobase, uart.port.mapbase,
+		 "Setup PNP port: port %lx, mem %pa, irq %d, type %d\n",
+		 uart.port.iobase, &uart.port.mapbase,
 		 uart.port.irq, uart.port.iotype);
=20
 	if (flags & CIR_PORT) {
--=20
1.9.1

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

* [PATCH v7 12/15] tty: serial: 8250: Correct conversion specifiers
@ 2016-01-14 15:08   ` Anton Wuerfel
  0 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

This patch fixes compiler warnings about wrong conversion specifiers used
in a debug output in 8250_pnp.c. The precise warning is:

drivers/tty/serial/8250/8250_pnp.c: In function ‘serial_pnp_probe’:
include/linux/dynamic_debug.h:64:16: warning: format ‘%x’ expects argument
of [...]

drivers/tty/serial/8250/8250_pnp.c:467:2: note: in expansion of macro
‘dev_dbg’
  dev_dbg(&dev->dev,
  ^
include/linux/dynamic_debug.h:64:16: warning: format ‘%lx’ expects argument
of [...]

drivers/tty/serial/8250/8250_pnp.c:467:2: note: in expansion of macro
‘dev_dbg’
  dev_dbg(&dev->dev,
  ^

Those warnings never got triggered, because the command was nested
in an #ifdef, which is removed by a patch of this series.

Signed-off-by: Anton Würfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_pnp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/8250/8250_pnp.c
index 0c32c59..b2d163c 100644
--- a/drivers/tty/serial/8250/8250_pnp.c
+++ b/drivers/tty/serial/8250/8250_pnp.c
@@ -465,8 +465,8 @@ serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
 		return -ENODEV;
 
 	dev_dbg(&dev->dev,
-		 "Setup PNP port: port %x, mem 0x%lx, irq %d, type %d\n",
-		 uart.port.iobase, uart.port.mapbase,
+		 "Setup PNP port: port %lx, mem %pa, irq %d, type %d\n",
+		 uart.port.iobase, &uart.port.mapbase,
 		 uart.port.irq, uart.port.iotype);
 
 	if (flags & CIR_PORT) {
-- 
1.9.1

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

* [PATCH v7 13/15] tty: serial: 8250: Merge duplicate conditions
  2016-01-14 15:08 [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
@ 2016-01-14 15:08   ` Anton Wuerfel
  2016-01-14 15:08   ` Anton Wuerfel
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

This patch refactors a switch case statement by merging an if condition
in the default case into an identical condition right after the switch
statement.
This comes with a slight change in behaviour: If pci_netmos_9900_numpor=
ts
returns 0, an additional warning is printed.

Signed-off-by: Anton W=C3=BCrfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_pci.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/82=
50/8250_pci.c
index fbd4222..b22e5a5 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -850,13 +850,13 @@ static int pci_netmos_init(struct pci_dev *dev)
 			break;
=20
 		default:
-			if (num_serial =3D=3D 0 ) {
-				moan_device("unknown NetMos/Mostech device", dev);
-			}
+			break;
 	}
=20
-	if (num_serial =3D=3D 0)
+	if (num_serial =3D=3D 0) {
+		moan_device("unknown NetMos/Mostech device", dev);
 		return -ENODEV;
+	}
=20
 	return num_serial;
 }
--=20
1.9.1

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

* [PATCH v7 13/15] tty: serial: 8250: Merge duplicate conditions
@ 2016-01-14 15:08   ` Anton Wuerfel
  0 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

This patch refactors a switch case statement by merging an if condition
in the default case into an identical condition right after the switch
statement.
This comes with a slight change in behaviour: If pci_netmos_9900_numports
returns 0, an additional warning is printed.

Signed-off-by: Anton Würfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_pci.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index fbd4222..b22e5a5 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -850,13 +850,13 @@ static int pci_netmos_init(struct pci_dev *dev)
 			break;
 
 		default:
-			if (num_serial == 0 ) {
-				moan_device("unknown NetMos/Mostech device", dev);
-			}
+			break;
 	}
 
-	if (num_serial == 0)
+	if (num_serial == 0) {
+		moan_device("unknown NetMos/Mostech device", dev);
 		return -ENODEV;
+	}
 
 	return num_serial;
 }
-- 
1.9.1

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

* [PATCH v7 14/15] tty: serial: 8250: Fix indentation warnings
  2016-01-14 15:08 [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
@ 2016-01-14 15:08   ` Anton Wuerfel
  2016-01-14 15:08   ` Anton Wuerfel
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

Checkpatch complains about incorrect indentation of switch/case stateme=
nts.
This patch fixes the corresponding warnings. Additionally some indentat=
ion
is changed to match the correct format specified in the Linux Kernel
Coding Style.

Signed-off-by: Anton W=C3=BCrfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_pci.c  | 16 ++++++++--------
 drivers/tty/serial/8250/8250_pnp.c  |  4 ++--
 drivers/tty/serial/8250/8250_port.c |  6 +++---
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/82=
50/8250_pci.c
index b22e5a5..40aa5e7 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -842,15 +842,15 @@ static int pci_netmos_init(struct pci_dev *dev)
 		return 0;
=20
 	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 =3D 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 =3D pci_netmos_9900_numports(dev);
+		break;
=20
-		default:
-			break;
+	default:
+		break;
 	}
=20
 	if (num_serial =3D=3D 0) {
diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/82=
50/8250_pnp.c
index b2d163c..2c757b0 100644
--- a/drivers/tty/serial/8250/8250_pnp.c
+++ b/drivers/tty/serial/8250/8250_pnp.c
@@ -427,8 +427,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;
=20
 	if (check_resources(dev))
 		return 0;
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8=
250/8250_port.c
index 25fd6b4..9fe814f 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -2236,9 +2236,9 @@ static void serial8250_set_divisor(struct uart_po=
rt *port, unsigned int baud,
 		serial_port_out(port, 0x2, quot_frac);
 }
=20
-static unsigned int
-serial8250_get_baud_rate(struct uart_port *port, struct ktermios *term=
ios,
-			 struct ktermios *old)
+static unsigned int serial8250_get_baud_rate(struct uart_port *port,
+					     struct ktermios *termios,
+					     struct ktermios *old)
 {
 	unsigned int tolerance =3D port->uartclk / 100;
=20
--=20
1.9.1

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

* [PATCH v7 14/15] tty: serial: 8250: Fix indentation warnings
@ 2016-01-14 15:08   ` Anton Wuerfel
  0 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

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.

Signed-off-by: Anton Würfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_pci.c  | 16 ++++++++--------
 drivers/tty/serial/8250/8250_pnp.c  |  4 ++--
 drivers/tty/serial/8250/8250_port.c |  6 +++---
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index b22e5a5..40aa5e7 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -842,15 +842,15 @@ 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:
-			break;
+	default:
+		break;
 	}
 
 	if (num_serial == 0) {
diff --git a/drivers/tty/serial/8250/8250_pnp.c b/drivers/tty/serial/8250/8250_pnp.c
index b2d163c..2c757b0 100644
--- a/drivers/tty/serial/8250/8250_pnp.c
+++ b/drivers/tty/serial/8250/8250_pnp.c
@@ -427,8 +427,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 25fd6b4..9fe814f 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -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;
 
-- 
1.9.1

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

* [PATCH v7 15/15] tty: serial: 8250: Add generic port init macro
  2016-01-14 15:08 [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
  2016-01-14 15:08   ` Anton Wuerfel
@ 2016-01-14 15:08   ` Anton Wuerfel
  2016-01-14 15:08   ` Anton Wuerfel
                     ` (13 subsequent siblings)
  15 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

This patch removes redundant 8250 port initialization macros and
replaces them by a single generic base-macro, which is specialized
as needed.

Signed-off-by: Anton W=C3=BCrfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250.h               | 12 ++++++++
 drivers/tty/serial/8250/8250_accent.c        | 13 ++-------
 drivers/tty/serial/8250/8250_boca.c          | 41 ++++++++++++--------=
--------
 drivers/tty/serial/8250/8250_exar_st16c554.c | 17 ++++--------
 drivers/tty/serial/8250/8250_fourport.c      | 28 ++++++++-----------
 5 files changed, 49 insertions(+), 62 deletions(-)

diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8=
250.h
index d54dcd8..4672ab4 100644
--- a/drivers/tty/serial/8250/8250.h
+++ b/drivers/tty/serial/8250/8250.h
@@ -92,6 +92,18 @@ struct serial8250_config {
 #define SERIAL8250_SHARE_IRQS 0
 #endif
=20
+#define SERIAL8250_PORT_FLAGS(_base, _irq, _flags)		\
+	{							\
+		.iobase		=3D _base,			\
+		.irq		=3D _irq,				\
+		.uartclk	=3D 1843200,			\
+		.iotype		=3D UPIO_PORT,			\
+		.flags		=3D UPF_BOOT_AUTOCONF | (_flags),	\
+	}
+
+#define SERIAL8250_PORT(_base, _irq) SERIAL8250_PORT_FLAGS(_base, _irq=
, 0)
+
+
 static inline int serial_in(struct uart_8250_port *up, int offset)
 {
 	return up->port.serial_in(&up->port, offset);
diff --git a/drivers/tty/serial/8250/8250_accent.c b/drivers/tty/serial=
/8250/8250_accent.c
index 34b51c6..522aeae 100644
--- a/drivers/tty/serial/8250/8250_accent.c
+++ b/drivers/tty/serial/8250/8250_accent.c
@@ -10,18 +10,11 @@
 #include <linux/init.h>
 #include <linux/serial_8250.h>
=20
-#define PORT(_base,_irq)				\
-	{						\
-		.iobase		=3D _base,		\
-		.irq		=3D _irq,			\
-		.uartclk	=3D 1843200,		\
-		.iotype		=3D UPIO_PORT,		\
-		.flags		=3D UPF_BOOT_AUTOCONF,	\
-	}
+#include "8250.h"
=20
 static struct plat_serial8250_port accent_data[] =3D {
-	PORT(0x330, 4),
-	PORT(0x338, 4),
+	SERIAL8250_PORT(0x330, 4),
+	SERIAL8250_PORT(0x338, 4),
 	{ },
 };
=20
diff --git a/drivers/tty/serial/8250/8250_boca.c b/drivers/tty/serial/8=
250/8250_boca.c
index d125dc1..a63b599 100644
--- a/drivers/tty/serial/8250/8250_boca.c
+++ b/drivers/tty/serial/8250/8250_boca.c
@@ -10,32 +10,25 @@
 #include <linux/init.h>
 #include <linux/serial_8250.h>
=20
-#define PORT(_base,_irq)				\
-	{						\
-		.iobase		=3D _base,		\
-		.irq		=3D _irq,			\
-		.uartclk	=3D 1843200,		\
-		.iotype		=3D UPIO_PORT,		\
-		.flags		=3D UPF_BOOT_AUTOCONF,	\
-	}
+#include "8250.h"
=20
 static struct plat_serial8250_port boca_data[] =3D {
-	PORT(0x100, 12),
-	PORT(0x108, 12),
-	PORT(0x110, 12),
-	PORT(0x118, 12),
-	PORT(0x120, 12),
-	PORT(0x128, 12),
-	PORT(0x130, 12),
-	PORT(0x138, 12),
-	PORT(0x140, 12),
-	PORT(0x148, 12),
-	PORT(0x150, 12),
-	PORT(0x158, 12),
-	PORT(0x160, 12),
-	PORT(0x168, 12),
-	PORT(0x170, 12),
-	PORT(0x178, 12),
+	SERIAL8250_PORT(0x100, 12),
+	SERIAL8250_PORT(0x108, 12),
+	SERIAL8250_PORT(0x110, 12),
+	SERIAL8250_PORT(0x118, 12),
+	SERIAL8250_PORT(0x120, 12),
+	SERIAL8250_PORT(0x128, 12),
+	SERIAL8250_PORT(0x130, 12),
+	SERIAL8250_PORT(0x138, 12),
+	SERIAL8250_PORT(0x140, 12),
+	SERIAL8250_PORT(0x148, 12),
+	SERIAL8250_PORT(0x150, 12),
+	SERIAL8250_PORT(0x158, 12),
+	SERIAL8250_PORT(0x160, 12),
+	SERIAL8250_PORT(0x168, 12),
+	SERIAL8250_PORT(0x170, 12),
+	SERIAL8250_PORT(0x178, 12),
 	{ },
 };
=20
diff --git a/drivers/tty/serial/8250/8250_exar_st16c554.c b/drivers/tty=
/serial/8250/8250_exar_st16c554.c
index bf53aab..3a7cb82 100644
--- a/drivers/tty/serial/8250/8250_exar_st16c554.c
+++ b/drivers/tty/serial/8250/8250_exar_st16c554.c
@@ -13,20 +13,13 @@
 #include <linux/init.h>
 #include <linux/serial_8250.h>
=20
-#define PORT(_base,_irq)				\
-	{						\
-		.iobase		=3D _base,		\
-		.irq		=3D _irq,			\
-		.uartclk	=3D 1843200,		\
-		.iotype		=3D UPIO_PORT,		\
-		.flags		=3D UPF_BOOT_AUTOCONF,	\
-	}
+#include "8250.h"
=20
 static struct plat_serial8250_port exar_data[] =3D {
-	PORT(0x100, 5),
-	PORT(0x108, 5),
-	PORT(0x110, 5),
-	PORT(0x118, 5),
+	SERIAL8250_PORT(0x100, 5),
+	SERIAL8250_PORT(0x108, 5),
+	SERIAL8250_PORT(0x110, 5),
+	SERIAL8250_PORT(0x118, 5),
 	{ },
 };
=20
diff --git a/drivers/tty/serial/8250/8250_fourport.c b/drivers/tty/seri=
al/8250/8250_fourport.c
index be15826..4045180 100644
--- a/drivers/tty/serial/8250/8250_fourport.c
+++ b/drivers/tty/serial/8250/8250_fourport.c
@@ -10,24 +10,20 @@
 #include <linux/init.h>
 #include <linux/serial_8250.h>
=20
-#define PORT(_base,_irq)						\
-	{								\
-		.iobase		=3D _base,				\
-		.irq		=3D _irq,					\
-		.uartclk	=3D 1843200,				\
-		.iotype		=3D UPIO_PORT,				\
-		.flags		=3D UPF_BOOT_AUTOCONF | UPF_FOURPORT,	\
-	}
+#include "8250.h"
+
+#define SERIAL8250_FOURPORT(_base, _irq) \
+	SERIAL8250_PORT_FLAGS(_base, _irq, UPF_FOURPORT)
=20
 static struct plat_serial8250_port fourport_data[] =3D {
-	PORT(0x1a0, 9),
-	PORT(0x1a8, 9),
-	PORT(0x1b0, 9),
-	PORT(0x1b8, 9),
-	PORT(0x2a0, 5),
-	PORT(0x2a8, 5),
-	PORT(0x2b0, 5),
-	PORT(0x2b8, 5),
+	SERIAL8250_FOURPORT(0x1a0, 9),
+	SERIAL8250_FOURPORT(0x1a8, 9),
+	SERIAL8250_FOURPORT(0x1b0, 9),
+	SERIAL8250_FOURPORT(0x1b8, 9),
+	SERIAL8250_FOURPORT(0x2a0, 5),
+	SERIAL8250_FOURPORT(0x2a8, 5),
+	SERIAL8250_FOURPORT(0x2b0, 5),
+	SERIAL8250_FOURPORT(0x2b8, 5),
 	{ },
 };
=20
--=20
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-parisc"=
 in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v7 15/15] tty: serial: 8250: Add generic port init macro
@ 2016-01-14 15:08   ` Anton Wuerfel
  0 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

This patch removes redundant 8250 port initialization macros and
replaces them by a single generic base-macro, which is specialized
as needed.

Signed-off-by: Anton Würfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250.h               | 12 ++++++++
 drivers/tty/serial/8250/8250_accent.c        | 13 ++-------
 drivers/tty/serial/8250/8250_boca.c          | 41 ++++++++++++----------------
 drivers/tty/serial/8250/8250_exar_st16c554.c | 17 ++++--------
 drivers/tty/serial/8250/8250_fourport.c      | 28 ++++++++-----------
 5 files changed, 49 insertions(+), 62 deletions(-)

diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h
index d54dcd8..4672ab4 100644
--- a/drivers/tty/serial/8250/8250.h
+++ b/drivers/tty/serial/8250/8250.h
@@ -92,6 +92,18 @@ struct serial8250_config {
 #define SERIAL8250_SHARE_IRQS 0
 #endif
 
+#define SERIAL8250_PORT_FLAGS(_base, _irq, _flags)		\
+	{							\
+		.iobase		= _base,			\
+		.irq		= _irq,				\
+		.uartclk	= 1843200,			\
+		.iotype		= UPIO_PORT,			\
+		.flags		= UPF_BOOT_AUTOCONF | (_flags),	\
+	}
+
+#define SERIAL8250_PORT(_base, _irq) SERIAL8250_PORT_FLAGS(_base, _irq, 0)
+
+
 static inline int serial_in(struct uart_8250_port *up, int offset)
 {
 	return up->port.serial_in(&up->port, offset);
diff --git a/drivers/tty/serial/8250/8250_accent.c b/drivers/tty/serial/8250/8250_accent.c
index 34b51c6..522aeae 100644
--- a/drivers/tty/serial/8250/8250_accent.c
+++ b/drivers/tty/serial/8250/8250_accent.c
@@ -10,18 +10,11 @@
 #include <linux/init.h>
 #include <linux/serial_8250.h>
 
-#define PORT(_base,_irq)				\
-	{						\
-		.iobase		= _base,		\
-		.irq		= _irq,			\
-		.uartclk	= 1843200,		\
-		.iotype		= UPIO_PORT,		\
-		.flags		= UPF_BOOT_AUTOCONF,	\
-	}
+#include "8250.h"
 
 static struct plat_serial8250_port accent_data[] = {
-	PORT(0x330, 4),
-	PORT(0x338, 4),
+	SERIAL8250_PORT(0x330, 4),
+	SERIAL8250_PORT(0x338, 4),
 	{ },
 };
 
diff --git a/drivers/tty/serial/8250/8250_boca.c b/drivers/tty/serial/8250/8250_boca.c
index d125dc1..a63b599 100644
--- a/drivers/tty/serial/8250/8250_boca.c
+++ b/drivers/tty/serial/8250/8250_boca.c
@@ -10,32 +10,25 @@
 #include <linux/init.h>
 #include <linux/serial_8250.h>
 
-#define PORT(_base,_irq)				\
-	{						\
-		.iobase		= _base,		\
-		.irq		= _irq,			\
-		.uartclk	= 1843200,		\
-		.iotype		= UPIO_PORT,		\
-		.flags		= UPF_BOOT_AUTOCONF,	\
-	}
+#include "8250.h"
 
 static struct plat_serial8250_port boca_data[] = {
-	PORT(0x100, 12),
-	PORT(0x108, 12),
-	PORT(0x110, 12),
-	PORT(0x118, 12),
-	PORT(0x120, 12),
-	PORT(0x128, 12),
-	PORT(0x130, 12),
-	PORT(0x138, 12),
-	PORT(0x140, 12),
-	PORT(0x148, 12),
-	PORT(0x150, 12),
-	PORT(0x158, 12),
-	PORT(0x160, 12),
-	PORT(0x168, 12),
-	PORT(0x170, 12),
-	PORT(0x178, 12),
+	SERIAL8250_PORT(0x100, 12),
+	SERIAL8250_PORT(0x108, 12),
+	SERIAL8250_PORT(0x110, 12),
+	SERIAL8250_PORT(0x118, 12),
+	SERIAL8250_PORT(0x120, 12),
+	SERIAL8250_PORT(0x128, 12),
+	SERIAL8250_PORT(0x130, 12),
+	SERIAL8250_PORT(0x138, 12),
+	SERIAL8250_PORT(0x140, 12),
+	SERIAL8250_PORT(0x148, 12),
+	SERIAL8250_PORT(0x150, 12),
+	SERIAL8250_PORT(0x158, 12),
+	SERIAL8250_PORT(0x160, 12),
+	SERIAL8250_PORT(0x168, 12),
+	SERIAL8250_PORT(0x170, 12),
+	SERIAL8250_PORT(0x178, 12),
 	{ },
 };
 
diff --git a/drivers/tty/serial/8250/8250_exar_st16c554.c b/drivers/tty/serial/8250/8250_exar_st16c554.c
index bf53aab..3a7cb82 100644
--- a/drivers/tty/serial/8250/8250_exar_st16c554.c
+++ b/drivers/tty/serial/8250/8250_exar_st16c554.c
@@ -13,20 +13,13 @@
 #include <linux/init.h>
 #include <linux/serial_8250.h>
 
-#define PORT(_base,_irq)				\
-	{						\
-		.iobase		= _base,		\
-		.irq		= _irq,			\
-		.uartclk	= 1843200,		\
-		.iotype		= UPIO_PORT,		\
-		.flags		= UPF_BOOT_AUTOCONF,	\
-	}
+#include "8250.h"
 
 static struct plat_serial8250_port exar_data[] = {
-	PORT(0x100, 5),
-	PORT(0x108, 5),
-	PORT(0x110, 5),
-	PORT(0x118, 5),
+	SERIAL8250_PORT(0x100, 5),
+	SERIAL8250_PORT(0x108, 5),
+	SERIAL8250_PORT(0x110, 5),
+	SERIAL8250_PORT(0x118, 5),
 	{ },
 };
 
diff --git a/drivers/tty/serial/8250/8250_fourport.c b/drivers/tty/serial/8250/8250_fourport.c
index be15826..4045180 100644
--- a/drivers/tty/serial/8250/8250_fourport.c
+++ b/drivers/tty/serial/8250/8250_fourport.c
@@ -10,24 +10,20 @@
 #include <linux/init.h>
 #include <linux/serial_8250.h>
 
-#define PORT(_base,_irq)						\
-	{								\
-		.iobase		= _base,				\
-		.irq		= _irq,					\
-		.uartclk	= 1843200,				\
-		.iotype		= UPIO_PORT,				\
-		.flags		= UPF_BOOT_AUTOCONF | UPF_FOURPORT,	\
-	}
+#include "8250.h"
+
+#define SERIAL8250_FOURPORT(_base, _irq) \
+	SERIAL8250_PORT_FLAGS(_base, _irq, UPF_FOURPORT)
 
 static struct plat_serial8250_port fourport_data[] = {
-	PORT(0x1a0, 9),
-	PORT(0x1a8, 9),
-	PORT(0x1b0, 9),
-	PORT(0x1b8, 9),
-	PORT(0x2a0, 5),
-	PORT(0x2a8, 5),
-	PORT(0x2b0, 5),
-	PORT(0x2b8, 5),
+	SERIAL8250_FOURPORT(0x1a0, 9),
+	SERIAL8250_FOURPORT(0x1a8, 9),
+	SERIAL8250_FOURPORT(0x1b0, 9),
+	SERIAL8250_FOURPORT(0x1b8, 9),
+	SERIAL8250_FOURPORT(0x2a0, 5),
+	SERIAL8250_FOURPORT(0x2a8, 5),
+	SERIAL8250_FOURPORT(0x2b0, 5),
+	SERIAL8250_FOURPORT(0x2b8, 5),
 	{ },
 };
 
-- 
1.9.1

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

* [PATCH v7 15/15] tty: serial: 8250: Add generic port init macro
@ 2016-01-14 15:08   ` Anton Wuerfel
  0 siblings, 0 replies; 34+ messages in thread
From: Anton Wuerfel @ 2016-01-14 15:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Joachim Eastwood,
	Matthias Brugger, Masahiro Yamada, Peter Hurley,
	Sebastian Andrzej Siewior, Andy Shevchenko, Phillip Raffeck,
	Heikki Krogerus, Peter Hung, linux-serial, linux-kernel,
	linux-parisc, linux-kernel, Anton Wuerfel

This patch removes redundant 8250 port initialization macros and
replaces them by a single generic base-macro, which is specialized
as needed.

Signed-off-by: Anton Würfel <anton.wuerfel@fau.de>
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de>
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250.h               | 12 ++++++++
 drivers/tty/serial/8250/8250_accent.c        | 13 ++-------
 drivers/tty/serial/8250/8250_boca.c          | 41 ++++++++++++----------------
 drivers/tty/serial/8250/8250_exar_st16c554.c | 17 ++++--------
 drivers/tty/serial/8250/8250_fourport.c      | 28 ++++++++-----------
 5 files changed, 49 insertions(+), 62 deletions(-)

diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h
index d54dcd8..4672ab4 100644
--- a/drivers/tty/serial/8250/8250.h
+++ b/drivers/tty/serial/8250/8250.h
@@ -92,6 +92,18 @@ struct serial8250_config {
 #define SERIAL8250_SHARE_IRQS 0
 #endif
 
+#define SERIAL8250_PORT_FLAGS(_base, _irq, _flags)		\
+	{							\
+		.iobase		= _base,			\
+		.irq		= _irq,				\
+		.uartclk	= 1843200,			\
+		.iotype		= UPIO_PORT,			\
+		.flags		= UPF_BOOT_AUTOCONF | (_flags),	\
+	}
+
+#define SERIAL8250_PORT(_base, _irq) SERIAL8250_PORT_FLAGS(_base, _irq, 0)
+
+
 static inline int serial_in(struct uart_8250_port *up, int offset)
 {
 	return up->port.serial_in(&up->port, offset);
diff --git a/drivers/tty/serial/8250/8250_accent.c b/drivers/tty/serial/8250/8250_accent.c
index 34b51c6..522aeae 100644
--- a/drivers/tty/serial/8250/8250_accent.c
+++ b/drivers/tty/serial/8250/8250_accent.c
@@ -10,18 +10,11 @@
 #include <linux/init.h>
 #include <linux/serial_8250.h>
 
-#define PORT(_base,_irq)				\
-	{						\
-		.iobase		= _base,		\
-		.irq		= _irq,			\
-		.uartclk	= 1843200,		\
-		.iotype		= UPIO_PORT,		\
-		.flags		= UPF_BOOT_AUTOCONF,	\
-	}
+#include "8250.h"
 
 static struct plat_serial8250_port accent_data[] = {
-	PORT(0x330, 4),
-	PORT(0x338, 4),
+	SERIAL8250_PORT(0x330, 4),
+	SERIAL8250_PORT(0x338, 4),
 	{ },
 };
 
diff --git a/drivers/tty/serial/8250/8250_boca.c b/drivers/tty/serial/8250/8250_boca.c
index d125dc1..a63b599 100644
--- a/drivers/tty/serial/8250/8250_boca.c
+++ b/drivers/tty/serial/8250/8250_boca.c
@@ -10,32 +10,25 @@
 #include <linux/init.h>
 #include <linux/serial_8250.h>
 
-#define PORT(_base,_irq)				\
-	{						\
-		.iobase		= _base,		\
-		.irq		= _irq,			\
-		.uartclk	= 1843200,		\
-		.iotype		= UPIO_PORT,		\
-		.flags		= UPF_BOOT_AUTOCONF,	\
-	}
+#include "8250.h"
 
 static struct plat_serial8250_port boca_data[] = {
-	PORT(0x100, 12),
-	PORT(0x108, 12),
-	PORT(0x110, 12),
-	PORT(0x118, 12),
-	PORT(0x120, 12),
-	PORT(0x128, 12),
-	PORT(0x130, 12),
-	PORT(0x138, 12),
-	PORT(0x140, 12),
-	PORT(0x148, 12),
-	PORT(0x150, 12),
-	PORT(0x158, 12),
-	PORT(0x160, 12),
-	PORT(0x168, 12),
-	PORT(0x170, 12),
-	PORT(0x178, 12),
+	SERIAL8250_PORT(0x100, 12),
+	SERIAL8250_PORT(0x108, 12),
+	SERIAL8250_PORT(0x110, 12),
+	SERIAL8250_PORT(0x118, 12),
+	SERIAL8250_PORT(0x120, 12),
+	SERIAL8250_PORT(0x128, 12),
+	SERIAL8250_PORT(0x130, 12),
+	SERIAL8250_PORT(0x138, 12),
+	SERIAL8250_PORT(0x140, 12),
+	SERIAL8250_PORT(0x148, 12),
+	SERIAL8250_PORT(0x150, 12),
+	SERIAL8250_PORT(0x158, 12),
+	SERIAL8250_PORT(0x160, 12),
+	SERIAL8250_PORT(0x168, 12),
+	SERIAL8250_PORT(0x170, 12),
+	SERIAL8250_PORT(0x178, 12),
 	{ },
 };
 
diff --git a/drivers/tty/serial/8250/8250_exar_st16c554.c b/drivers/tty/serial/8250/8250_exar_st16c554.c
index bf53aab..3a7cb82 100644
--- a/drivers/tty/serial/8250/8250_exar_st16c554.c
+++ b/drivers/tty/serial/8250/8250_exar_st16c554.c
@@ -13,20 +13,13 @@
 #include <linux/init.h>
 #include <linux/serial_8250.h>
 
-#define PORT(_base,_irq)				\
-	{						\
-		.iobase		= _base,		\
-		.irq		= _irq,			\
-		.uartclk	= 1843200,		\
-		.iotype		= UPIO_PORT,		\
-		.flags		= UPF_BOOT_AUTOCONF,	\
-	}
+#include "8250.h"
 
 static struct plat_serial8250_port exar_data[] = {
-	PORT(0x100, 5),
-	PORT(0x108, 5),
-	PORT(0x110, 5),
-	PORT(0x118, 5),
+	SERIAL8250_PORT(0x100, 5),
+	SERIAL8250_PORT(0x108, 5),
+	SERIAL8250_PORT(0x110, 5),
+	SERIAL8250_PORT(0x118, 5),
 	{ },
 };
 
diff --git a/drivers/tty/serial/8250/8250_fourport.c b/drivers/tty/serial/8250/8250_fourport.c
index be15826..4045180 100644
--- a/drivers/tty/serial/8250/8250_fourport.c
+++ b/drivers/tty/serial/8250/8250_fourport.c
@@ -10,24 +10,20 @@
 #include <linux/init.h>
 #include <linux/serial_8250.h>
 
-#define PORT(_base,_irq)						\
-	{								\
-		.iobase		= _base,				\
-		.irq		= _irq,					\
-		.uartclk	= 1843200,				\
-		.iotype		= UPIO_PORT,				\
-		.flags		= UPF_BOOT_AUTOCONF | UPF_FOURPORT,	\
-	}
+#include "8250.h"
+
+#define SERIAL8250_FOURPORT(_base, _irq) \
+	SERIAL8250_PORT_FLAGS(_base, _irq, UPF_FOURPORT)
 
 static struct plat_serial8250_port fourport_data[] = {
-	PORT(0x1a0, 9),
-	PORT(0x1a8, 9),
-	PORT(0x1b0, 9),
-	PORT(0x1b8, 9),
-	PORT(0x2a0, 5),
-	PORT(0x2a8, 5),
-	PORT(0x2b0, 5),
-	PORT(0x2b8, 5),
+	SERIAL8250_FOURPORT(0x1a0, 9),
+	SERIAL8250_FOURPORT(0x1a8, 9),
+	SERIAL8250_FOURPORT(0x1b0, 9),
+	SERIAL8250_FOURPORT(0x1b8, 9),
+	SERIAL8250_FOURPORT(0x2a0, 5),
+	SERIAL8250_FOURPORT(0x2a8, 5),
+	SERIAL8250_FOURPORT(0x2b0, 5),
+	SERIAL8250_FOURPORT(0x2b8, 5),
 	{ },
 };
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings
  2016-01-14 15:08 [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
                   ` (14 preceding siblings ...)
  2016-01-14 15:08   ` Anton Wuerfel
@ 2016-02-03 14:40 ` Anton Wuerfel
  2016-02-03 17:54   ` Greg Kroah-Hartman
  15 siblings, 1 reply; 34+ messages in thread
From: Anton Wuerfel @ 2016-02-03 14:40 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Peter Hurley, Andy Shevchenko, Phillip Raffeck, linux-serial,
	linux-kernel, linux-parisc, linux-kernel, Anton Wuerfel

Hello,

we noticed the patch series has not been merged yet to 4.5. Are there
still problems we have to address?

Regards
Anton Wuerfel
Phillip Raffeck




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

* Re: [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings
  2016-02-03 14:40 ` [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
@ 2016-02-03 17:54   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 34+ messages in thread
From: Greg Kroah-Hartman @ 2016-02-03 17:54 UTC (permalink / raw)
  To: Anton Wuerfel
  Cc: Peter Hurley, Andy Shevchenko, Phillip Raffeck, linux-serial,
	linux-kernel, linux-parisc, linux-kernel

On Wed, Feb 03, 2016 at 03:40:09PM +0100, Anton Wuerfel wrote:
> Hello,
> 
> we noticed the patch series has not been merged yet to 4.5. Are there
> still problems we have to address?

I don't know, they are in my queue to be processed "soon"...

And they will not go into 4.5, that merge window is long closed, coding
style fixes like this are on the bottom of my list of things to be
reviewed, and are not "bug fixes" that affect people so they sometimes
take a long time to get merged.

thanks,

greg k-h

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

end of thread, other threads:[~2016-02-03 17:54 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-14 15:08 [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
2016-01-14 15:08 ` [PATCH v7 01/15] tty: serial: 8250: Fix whitespace errors Anton Wuerfel
2016-01-14 15:08   ` Anton Wuerfel
2016-01-14 15:08 ` [PATCH v7 02/15] tty: serial: 8250: Replace spaces with tabs Anton Wuerfel
2016-01-14 15:08   ` Anton Wuerfel
2016-01-14 15:08 ` [PATCH v7 03/15] tty: serial: 8250: Fix braces after struct Anton Wuerfel
2016-01-14 15:08   ` Anton Wuerfel
2016-01-14 15:08 ` [PATCH v7 04/15] tty: serial: 8250: Fix multiline comment style Anton Wuerfel
2016-01-14 15:08   ` Anton Wuerfel
2016-01-14 15:08 ` [PATCH v7 05/15] tty: serial: 8250: Remove else after return Anton Wuerfel
2016-01-14 15:08   ` Anton Wuerfel
2016-01-14 15:08 ` [PATCH v7 06/15] tty: serial: 8250: Move EXPORT_SYMBOL to function Anton Wuerfel
2016-01-14 15:08   ` Anton Wuerfel
2016-01-14 15:08 ` [PATCH v7 07/15] tty: serial: 8250: Fix line continuation warning Anton Wuerfel
2016-01-14 15:08   ` Anton Wuerfel
2016-01-14 15:08 ` [PATCH v7 08/15] tty: serial: 8250: Add parentheses to macro Anton Wuerfel
2016-01-14 15:08   ` Anton Wuerfel
2016-01-14 15:08 ` [PATCH v7 09/15] tty: serial: 8250: Fix multi-line strings Anton Wuerfel
2016-01-14 15:08   ` Anton Wuerfel
2016-01-14 15:08 ` [PATCH v7 10/15] tty: serial: 8250: Suitably replace printk Anton Wuerfel
2016-01-14 15:08   ` Anton Wuerfel
2016-01-14 15:08 ` [PATCH v7 11/15] tty: serial: 8250: Remove SERIAL_DEBUG_PNP macro Anton Wuerfel
2016-01-14 15:08   ` Anton Wuerfel
2016-01-14 15:08 ` [PATCH v7 12/15] tty: serial: 8250: Correct conversion specifiers Anton Wuerfel
2016-01-14 15:08   ` Anton Wuerfel
2016-01-14 15:08 ` [PATCH v7 13/15] tty: serial: 8250: Merge duplicate conditions Anton Wuerfel
2016-01-14 15:08   ` Anton Wuerfel
2016-01-14 15:08 ` [PATCH v7 14/15] tty: serial: 8250: Fix indentation warnings Anton Wuerfel
2016-01-14 15:08   ` Anton Wuerfel
2016-01-14 15:08 ` [PATCH v7 15/15] tty: serial: 8250: Add generic port init macro Anton Wuerfel
2016-01-14 15:08   ` Anton Wuerfel
2016-01-14 15:08   ` Anton Wuerfel
2016-02-03 14:40 ` [PATCH v7 00/15] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
2016-02-03 17:54   ` Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.