linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/13] tty: serial: 8250: Fix checkpatch warnings
@ 2016-01-08 17:43 Anton Wuerfel
  2016-01-08 17:43 ` [PATCH v4 01/13] tty: serial: 8250: Fix whitespace errors Anton Wuerfel
                   ` (12 more replies)
  0 siblings, 13 replies; 22+ messages in thread
From: Anton Wuerfel @ 2016-01-08 17:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Peter Hurley,
	Heikki Krogerus, Andy Shevchenko, Qipeng Zha, Desmond Liu,
	Wang Long, Matt Redfearn, Paul Burton, Ralf Baechle,
	Krzysztof Kozlowski, Peter Hung, Soeren Grunewald, Adam Lee,
	Maciej S. Szmigiero, Mans Rullgard, linux-kernel, linux-parisc,
	linux-kernel, phillip.raffeck, Anton Wuerfel

Hello Peter and Andy,

sorry for the long delay - we were very busy during christmas holidays.
We tried to incorporate your suggestions.

We apologize for syntax errors in v3-patchset. While fixing these issues
we added another patch to the series, so we decided to send in a new patchset
instead of fixing the damaged patch files in v3.

Regards,
Anton Wuerfel
Phillip Raffeck

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

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

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 (13):
Phillip Raffeck (13):
  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: Removed warning in debug output
  tty: serial: 8250: Fix indentation warnings
  tty: serial: 8250: Suitably replace printk
  tty: serial: 8250: Remove SERIAL_DEBUG_PNP macro

 drivers/tty/serial/8250/8250_accent.c        |  2 +-
 drivers/tty/serial/8250/8250_acorn.c         |  2 +-
 drivers/tty/serial/8250/8250_boca.c          |  2 +-
 drivers/tty/serial/8250/8250_core.c          | 15 ++---
 drivers/tty/serial/8250/8250_exar_st16c554.c |  2 +-
 drivers/tty/serial/8250/8250_fourport.c      |  2 +-
 drivers/tty/serial/8250/8250_gsc.c           |  7 ++-
 drivers/tty/serial/8250/8250_hp300.c         | 26 ++++----
 drivers/tty/serial/8250/8250_hub6.c          |  2 +-
 drivers/tty/serial/8250/8250_ingenic.c       | 12 ++--
 drivers/tty/serial/8250/8250_pci.c           | 49 +++++++--------
 drivers/tty/serial/8250/8250_pnp.c           | 20 ++++---
 drivers/tty/serial/8250/8250_port.c          | 46 +++++++-------
 drivers/tty/serial/8250/serial_cs.c          | 89 +++++++++++++++-------------
 14 files changed, 145 insertions(+), 131 deletions(-)

-- 
1.9.1


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

* [PATCH v4 01/13] tty: serial: 8250: Fix whitespace errors
  2016-01-08 17:43 [PATCH v4 00/13] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
@ 2016-01-08 17:43 ` Anton Wuerfel
  2016-01-11 12:28   ` Andy Shevchenko
  2016-01-08 17:43 ` [PATCH v4 02/13] tty: serial: 8250: Replace spaces with tabs Anton Wuerfel
                   ` (11 subsequent siblings)
  12 siblings, 1 reply; 22+ messages in thread
From: Anton Wuerfel @ 2016-01-08 17:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Peter Hurley,
	Heikki Krogerus, Andy Shevchenko, Qipeng Zha, Desmond Liu,
	Wang Long, Matt Redfearn, Paul Burton, Ralf Baechle,
	Krzysztof Kozlowski, Peter Hung, Soeren Grunewald, Adam Lee,
	Maciej S. Szmigiero, Mans Rullgard, linux-kernel, linux-parisc,
	linux-kernel, phillip.raffeck, 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>
CC: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_accent.c        |  2 +-
 drivers/tty/serial/8250/8250_acorn.c         |  2 +-
 drivers/tty/serial/8250/8250_boca.c          |  2 +-
 drivers/tty/serial/8250/8250_exar_st16c554.c |  2 +-
 drivers/tty/serial/8250/8250_fourport.c      |  2 +-
 drivers/tty/serial/8250/8250_hub6.c          |  2 +-
 drivers/tty/serial/8250/8250_pci.c           | 10 +++--
 drivers/tty/serial/8250/8250_port.c          |  2 +
 drivers/tty/serial/8250/serial_cs.c          | 60 ++++++++++++++------=
--------
 9 files changed, 44 insertions(+), 40 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_accent.c b/drivers/tty/serial=
/8250/8250_accent.c
index 34b51c6..c480729 100644
--- a/drivers/tty/serial/8250/8250_accent.c
+++ b/drivers/tty/serial/8250/8250_accent.c
@@ -10,7 +10,7 @@
 #include <linux/init.h>
 #include <linux/serial_8250.h>
=20
-#define PORT(_base,_irq)				\
+#define PORT(_base, _irq)				\
 	{						\
 		.iobase		=3D _base,		\
 		.irq		=3D _irq,			\
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_boca.c b/drivers/tty/serial/8=
250/8250_boca.c
index d125dc1..e42a5b5 100644
--- a/drivers/tty/serial/8250/8250_boca.c
+++ b/drivers/tty/serial/8250/8250_boca.c
@@ -10,7 +10,7 @@
 #include <linux/init.h>
 #include <linux/serial_8250.h>
=20
-#define PORT(_base,_irq)				\
+#define PORT(_base, _irq)				\
 	{						\
 		.iobase		=3D _base,		\
 		.irq		=3D _irq,			\
diff --git a/drivers/tty/serial/8250/8250_exar_st16c554.c b/drivers/tty=
/serial/8250/8250_exar_st16c554.c
index bf53aab..999f2d3 100644
--- a/drivers/tty/serial/8250/8250_exar_st16c554.c
+++ b/drivers/tty/serial/8250/8250_exar_st16c554.c
@@ -13,7 +13,7 @@
 #include <linux/init.h>
 #include <linux/serial_8250.h>
=20
-#define PORT(_base,_irq)				\
+#define PORT(_base, _irq)				\
 	{						\
 		.iobase		=3D _base,		\
 		.irq		=3D _irq,			\
diff --git a/drivers/tty/serial/8250/8250_fourport.c b/drivers/tty/seri=
al/8250/8250_fourport.c
index be15826..9a04a8a 100644
--- a/drivers/tty/serial/8250/8250_fourport.c
+++ b/drivers/tty/serial/8250/8250_fourport.c
@@ -10,7 +10,7 @@
 #include <linux/init.h>
 #include <linux/serial_8250.h>
=20
-#define PORT(_base,_irq)						\
+#define PORT(_base, _irq)						\
 	{								\
 		.iobase		=3D _base,				\
 		.irq		=3D _irq,					\
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..ccf43cb 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -850,7 +850,7 @@ static int pci_netmos_init(struct pci_dev *dev)
 			break;
=20
 		default:
-			if (num_serial =3D=3D 0 ) {
+			if (num_serial =3D=3D 0) {
 				moan_device("unknown NetMos/Mostech device", dev);
 			}
 	}
@@ -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] 22+ messages in thread

* [PATCH v4 02/13] tty: serial: 8250: Replace spaces with tabs
  2016-01-08 17:43 [PATCH v4 00/13] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
  2016-01-08 17:43 ` [PATCH v4 01/13] tty: serial: 8250: Fix whitespace errors Anton Wuerfel
@ 2016-01-08 17:43 ` Anton Wuerfel
  2016-01-08 17:43 ` [PATCH v4 03/13] tty: serial: 8250: Fix braces after struct Anton Wuerfel
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 22+ messages in thread
From: Anton Wuerfel @ 2016-01-08 17:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Peter Hurley,
	Heikki Krogerus, Andy Shevchenko, Qipeng Zha, Desmond Liu,
	Wang Long, Matt Redfearn, Paul Burton, Ralf Baechle,
	Krzysztof Kozlowski, Peter Hung, Soeren Grunewald, Adam Lee,
	Maciej S. Szmigiero, Mans Rullgard, linux-kernel, linux-parisc,
	linux-kernel, phillip.raffeck, 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>
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 ccf43cb..7f9f245 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] 22+ messages in thread

* [PATCH v4 03/13] tty: serial: 8250: Fix braces after struct
  2016-01-08 17:43 [PATCH v4 00/13] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
  2016-01-08 17:43 ` [PATCH v4 01/13] tty: serial: 8250: Fix whitespace errors Anton Wuerfel
  2016-01-08 17:43 ` [PATCH v4 02/13] tty: serial: 8250: Replace spaces with tabs Anton Wuerfel
@ 2016-01-08 17:43 ` Anton Wuerfel
  2016-01-08 17:43 ` [PATCH v4 04/13] tty: serial: 8250: Fix multiline comment style Anton Wuerfel
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 22+ messages in thread
From: Anton Wuerfel @ 2016-01-08 17:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Peter Hurley,
	Heikki Krogerus, Andy Shevchenko, Qipeng Zha, Desmond Liu,
	Wang Long, Matt Redfearn, Paul Burton, Ralf Baechle,
	Krzysztof Kozlowski, Peter Hung, Soeren Grunewald, Adam Lee,
	Maciej S. Szmigiero, Mans Rullgard, linux-kernel, linux-parisc,
	linux-kernel, phillip.raffeck, 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>
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] 22+ messages in thread

* [PATCH v4 04/13] tty: serial: 8250: Fix multiline comment style
  2016-01-08 17:43 [PATCH v4 00/13] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
                   ` (2 preceding siblings ...)
  2016-01-08 17:43 ` [PATCH v4 03/13] tty: serial: 8250: Fix braces after struct Anton Wuerfel
@ 2016-01-08 17:43 ` Anton Wuerfel
  2016-01-08 17:43 ` [PATCH v4 05/13] tty: serial: 8250: Remove else after return Anton Wuerfel
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 22+ messages in thread
From: Anton Wuerfel @ 2016-01-08 17:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Peter Hurley,
	Heikki Krogerus, Andy Shevchenko, Qipeng Zha, Desmond Liu,
	Wang Long, Matt Redfearn, Paul Burton, Ralf Baechle,
	Krzysztof Kozlowski, Peter Hung, Soeren Grunewald, Adam Lee,
	Maciej S. Szmigiero, Mans Rullgard, linux-kernel, linux-parisc,
	linux-kernel, phillip.raffeck, 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>
CC: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_ingenic.c | 12 ++++++++----
 drivers/tty/serial/8250/8250_pnp.c     |  6 ++++--
 drivers/tty/serial/8250/8250_port.c    | 31 ++++++++++++++++----------=
-----
 drivers/tty/serial/8250/serial_cs.c    | 26 +++++++++++++++++---------
 4 files changed, 45 insertions(+), 30 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_ingenic.c b/drivers/tty/seria=
l/8250/8250_ingenic.c
index 49394b4..086bd00 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..ffa7354 100644
--- a/drivers/tty/serial/8250/8250_pnp.c
+++ b/drivers/tty/serial/8250/8250_pnp.c
@@ -367,8 +367,10 @@ 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
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8=
250/8250_port.c
index f2e588e..99f709c 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 b=
e
+	 * configured less than Maximum supported fifo bytes
+	 */
 	[PORT_16550A_FSL64] =3D {
 		.name		=3D "16550A_FSL64",
 		.fifo_size	=3D 64,
@@ -1969,23 +1971,22 @@ 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 u=
sed
+	 * for Serial Over Lan.  Those chips take a longer time than a normal
+	 * serial device to signalize that a transmission data was queued. Du=
e
+	 * 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 ir=
q.
+	 * 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 t=
he
+	 * 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..1f34867 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] 22+ messages in thread

* [PATCH v4 05/13] tty: serial: 8250: Remove else after return
  2016-01-08 17:43 [PATCH v4 00/13] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
                   ` (3 preceding siblings ...)
  2016-01-08 17:43 ` [PATCH v4 04/13] tty: serial: 8250: Fix multiline comment style Anton Wuerfel
@ 2016-01-08 17:43 ` Anton Wuerfel
  2016-01-11 12:30   ` Andy Shevchenko
  2016-01-08 17:43 ` [PATCH v4 06/13] tty: serial: 8250: Move EXPORT_SYMBOL to function Anton Wuerfel
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 22+ messages in thread
From: Anton Wuerfel @ 2016-01-08 17:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Peter Hurley,
	Heikki Krogerus, Andy Shevchenko, Qipeng Zha, Desmond Liu,
	Wang Long, Matt Redfearn, Paul Burton, Ralf Baechle,
	Krzysztof Kozlowski, Peter Hung, Soeren Grunewald, Adam Lee,
	Maciej S. Szmigiero, Mans Rullgard, linux-kernel, linux-parisc,
	linux-kernel, phillip.raffeck, 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>
CC: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_pci.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/82=
50/8250_pci.c
index 7f9f245..09157fa 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,11 @@ 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 am=
biguous config.\n");
+		return 0;
 	}
=20
 	moan_device("unknown NetMos/Mostech program interface", dev);
--=20
1.9.1

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

* [PATCH v4 06/13] tty: serial: 8250: Move EXPORT_SYMBOL to function
  2016-01-08 17:43 [PATCH v4 00/13] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
                   ` (4 preceding siblings ...)
  2016-01-08 17:43 ` [PATCH v4 05/13] tty: serial: 8250: Remove else after return Anton Wuerfel
@ 2016-01-08 17:43 ` Anton Wuerfel
  2016-01-08 17:43 ` [PATCH v4 07/13] tty: serial: 8250: Fix line continuation warning Anton Wuerfel
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 22+ messages in thread
From: Anton Wuerfel @ 2016-01-08 17:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Peter Hurley,
	Heikki Krogerus, Andy Shevchenko, Qipeng Zha, Desmond Liu,
	Wang Long, Matt Redfearn, Paul Burton, Ralf Baechle,
	Krzysztof Kozlowski, Peter Hung, Soeren Grunewald, Adam Lee,
	Maciej S. Szmigiero, Mans Rullgard, linux-kernel, linux-parisc,
	linux-kernel, phillip.raffeck, 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>
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] 22+ messages in thread

* [PATCH v4 07/13] tty: serial: 8250: Fix line continuation warning
  2016-01-08 17:43 [PATCH v4 00/13] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
                   ` (5 preceding siblings ...)
  2016-01-08 17:43 ` [PATCH v4 06/13] tty: serial: 8250: Move EXPORT_SYMBOL to function Anton Wuerfel
@ 2016-01-08 17:43 ` Anton Wuerfel
  2016-01-08 17:43 ` [PATCH v4 08/13] tty: serial: 8250: Add parentheses to macro Anton Wuerfel
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 22+ messages in thread
From: Anton Wuerfel @ 2016-01-08 17:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Peter Hurley,
	Heikki Krogerus, Andy Shevchenko, Qipeng Zha, Desmond Liu,
	Wang Long, Matt Redfearn, Paul Burton, Ralf Baechle,
	Krzysztof Kozlowski, Peter Hung, Soeren Grunewald, Adam Lee,
	Maciej S. Szmigiero, Mans Rullgard, linux-kernel, linux-parisc,
	linux-kernel, phillip.raffeck, 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>
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] 22+ messages in thread

* [PATCH v4 08/13] tty: serial: 8250: Add parentheses to macro
  2016-01-08 17:43 [PATCH v4 00/13] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
                   ` (6 preceding siblings ...)
  2016-01-08 17:43 ` [PATCH v4 07/13] tty: serial: 8250: Fix line continuation warning Anton Wuerfel
@ 2016-01-08 17:43 ` Anton Wuerfel
  2016-01-08 17:43 ` [PATCH v4 09/13] tty: serial: 8250: Fix multi-line strings Anton Wuerfel
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 22+ messages in thread
From: Anton Wuerfel @ 2016-01-08 17:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Peter Hurley,
	Heikki Krogerus, Andy Shevchenko, Qipeng Zha, Desmond Liu,
	Wang Long, Matt Redfearn, Paul Burton, Ralf Baechle,
	Krzysztof Kozlowski, Peter Hung, Soeren Grunewald, Adam Lee,
	Maciej S. Szmigiero, Mans Rullgard, linux-kernel, linux-parisc,
	linux-kernel, phillip.raffeck, Anton Wuerfel

This patch fixes a checkpatch warning caused by missing parentheses
in the definition of a macro.

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_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
--=20
1.9.1

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

* [PATCH v4 09/13] tty: serial: 8250: Fix multi-line strings
  2016-01-08 17:43 [PATCH v4 00/13] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
                   ` (7 preceding siblings ...)
  2016-01-08 17:43 ` [PATCH v4 08/13] tty: serial: 8250: Add parentheses to macro Anton Wuerfel
@ 2016-01-08 17:43 ` Anton Wuerfel
  2016-01-08 17:43 ` [PATCH v4 10/13] tty: serial: 8250: Suitably replace printk Anton Wuerfel
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 22+ messages in thread
From: Anton Wuerfel @ 2016-01-08 17:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Peter Hurley,
	Heikki Krogerus, Andy Shevchenko, Qipeng Zha, Desmond Liu,
	Wang Long, Matt Redfearn, Paul Burton, Ralf Baechle,
	Krzysztof Kozlowski, Peter Hung, Soeren Grunewald, Adam Lee,
	Maciej S. Szmigiero, Mans Rullgard, linux-kernel, linux-parisc,
	linux-kernel, phillip.raffeck, 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>
CC: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_core.c | 3 +--
 drivers/tty/serial/8250/serial_cs.c | 3 +--
 2 files changed, 2 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 1f34867..1ab6bfc 100644
--- a/drivers/tty/serial/8250/serial_cs.c
+++ b/drivers/tty/serial/8250/serial_cs.c
@@ -533,8 +533,7 @@ 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] 22+ messages in thread

* [PATCH v4 10/13] tty: serial: 8250: Suitably replace printk
  2016-01-08 17:43 [PATCH v4 00/13] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
                   ` (8 preceding siblings ...)
  2016-01-08 17:43 ` [PATCH v4 09/13] tty: serial: 8250: Fix multi-line strings Anton Wuerfel
@ 2016-01-08 17:43 ` Anton Wuerfel
  2016-01-11 12:38   ` Andy Shevchenko
  2016-01-08 17:43 ` [PATCH v4 11/13] tty: serial: 8250: Remove SERIAL_DEBUG_PNP macro Anton Wuerfel
                   ` (2 subsequent siblings)
  12 siblings, 1 reply; 22+ messages in thread
From: Anton Wuerfel @ 2016-01-08 17:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Peter Hurley,
	Heikki Krogerus, Andy Shevchenko, Qipeng Zha, Desmond Liu,
	Wang Long, Matt Redfearn, Paul Burton, Ralf Baechle,
	Krzysztof Kozlowski, Peter Hung, Soeren Grunewald, Adam Lee,
	Maciej S. Szmigiero, Mans Rullgard, linux-kernel, linux-parisc,
	linux-kernel, phillip.raffeck

=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>
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 | 19 ++++++++++---------
 drivers/tty/serial/8250/8250_port.c  |  3 +--
 4 files changed, 17 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..4aaa24c 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("hp300_setup_serial_console(): early_serial_setup() failed.\=
n");
 	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,8 @@ 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);
+			pr_notice("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 99f709c..343d050 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

--
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] 22+ messages in thread

* [PATCH v4 11/13] tty: serial: 8250: Remove SERIAL_DEBUG_PNP macro
  2016-01-08 17:43 [PATCH v4 00/13] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
                   ` (9 preceding siblings ...)
  2016-01-08 17:43 ` [PATCH v4 10/13] tty: serial: 8250: Suitably replace printk Anton Wuerfel
@ 2016-01-08 17:43 ` Anton Wuerfel
  2016-01-08 17:43 ` [PATCH v4 12/13] tty: serial: 8250: Removed warning in debug output Anton Wuerfel
  2016-01-08 17:43 ` [PATCH v4 13/13] tty: serial: 8250: Fix indentation warnings Anton Wuerfel
  12 siblings, 0 replies; 22+ messages in thread
From: Anton Wuerfel @ 2016-01-08 17:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Peter Hurley,
	Heikki Krogerus, Andy Shevchenko, Qipeng Zha, Desmond Liu,
	Wang Long, Matt Redfearn, Paul Burton, Ralf Baechle,
	Krzysztof Kozlowski, Peter Hung, Soeren Grunewald, Adam Lee,
	Maciej S. Szmigiero, Mans Rullgard, linux-kernel, linux-parisc,
	linux-kernel, phillip.raffeck

=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>
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 ffa7354..ba3a1af 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] 22+ messages in thread

* [PATCH v4 12/13] tty: serial: 8250: Removed warning in debug output
  2016-01-08 17:43 [PATCH v4 00/13] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
                   ` (10 preceding siblings ...)
  2016-01-08 17:43 ` [PATCH v4 11/13] tty: serial: 8250: Remove SERIAL_DEBUG_PNP macro Anton Wuerfel
@ 2016-01-08 17:43 ` Anton Wuerfel
  2016-01-11 12:42   ` Andy Shevchenko
  2016-01-08 17:43 ` [PATCH v4 13/13] tty: serial: 8250: Fix indentation warnings Anton Wuerfel
  12 siblings, 1 reply; 22+ messages in thread
From: Anton Wuerfel @ 2016-01-08 17:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Peter Hurley,
	Heikki Krogerus, Andy Shevchenko, Qipeng Zha, Desmond Liu,
	Wang Long, Matt Redfearn, Paul Burton, Ralf Baechle,
	Krzysztof Kozlowski, Peter Hung, Soeren Grunewald, Adam Lee,
	Maciej S. Szmigiero, Mans Rullgard, linux-kernel, linux-parisc,
	linux-kernel, phillip.raffeck, Anton Wuerfel

This patch fixes type warnings in a debug output in 8250_pnp.c.
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 ba3a1af..e99282f 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 0x%lx, irq %d, type %d\n",
+		 uart.port.iobase, (unsigned long) uart.port.mapbase,
 		 uart.port.irq, uart.port.iotype);
=20
 	if (flags & CIR_PORT) {
--=20
1.9.1

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

* [PATCH v4 13/13] tty: serial: 8250: Fix indentation warnings
  2016-01-08 17:43 [PATCH v4 00/13] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
                   ` (11 preceding siblings ...)
  2016-01-08 17:43 ` [PATCH v4 12/13] tty: serial: 8250: Removed warning in debug output Anton Wuerfel
@ 2016-01-08 17:43 ` Anton Wuerfel
  2016-01-11 12:47   ` Andy Shevchenko
  12 siblings, 1 reply; 22+ messages in thread
From: Anton Wuerfel @ 2016-01-08 17:43 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Peter Hurley,
	Heikki Krogerus, Andy Shevchenko, Qipeng Zha, Desmond Liu,
	Wang Long, Matt Redfearn, Paul Burton, Ralf Baechle,
	Krzysztof Kozlowski, Peter Hung, Soeren Grunewald, Adam Lee,
	Maciej S. Szmigiero, Mans Rullgard, linux-kernel, linux-parisc,
	linux-kernel, phillip.raffeck, 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>
CC: linux-kernel@i4.cs.fau.de
---
 drivers/tty/serial/8250/8250_pci.c  | 12 ++++++------
 drivers/tty/serial/8250/8250_pnp.c  |  4 ++--
 drivers/tty/serial/8250/8250_port.c |  6 +++---
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/82=
50/8250_pci.c
index 09157fa..b0b47f9 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -841,12 +841,12 @@ 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:
 			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 e99282f..a021e31 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 343d050..da3b240 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -2235,9 +2235,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] 22+ messages in thread

* Re: [PATCH v4 01/13] tty: serial: 8250: Fix whitespace errors
  2016-01-08 17:43 ` [PATCH v4 01/13] tty: serial: 8250: Fix whitespace errors Anton Wuerfel
@ 2016-01-11 12:28   ` Andy Shevchenko
  2016-01-11 12:50     ` Shevchenko, Andriy
  0 siblings, 1 reply; 22+ messages in thread
From: Andy Shevchenko @ 2016-01-11 12:28 UTC (permalink / raw)
  To: Anton Wuerfel, Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Peter Hurley,
	Heikki Krogerus, Qipeng Zha, Desmond Liu, Wang Long,
	Matt Redfearn, Paul Burton, Ralf Baechle, Krzysztof Kozlowski,
	Peter Hung, Soeren Grunewald, Adam Lee, Maciej S. Szmigiero,
	Mans Rullgard, linux-kernel, linux-parisc, linux-kernel,
	phillip.raffeck

On Fri, 2016-01-08 at 18:43 +0100, Anton Wuerfel wrote:
> 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).
>=20
> 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

Cc: looks more standard.

> --- a/drivers/tty/serial/8250/8250_accent.c
> +++ b/drivers/tty/serial/8250/8250_accent.c
> @@ -10,7 +10,7 @@
> =C2=A0#include <linux/init.h>
> =C2=A0#include <linux/serial_8250.h>
> =C2=A0
> -#define PORT(_base,_irq)				\
> +#define PORT(_base, _irq)				\
> =C2=A0	{						\
> =C2=A0		.iobase		=3D _base,		\
> =C2=A0		.irq		=3D _irq,			\
>=20

While those are okay, I would suggest to make a macro in
drivers/=E2=80=A6/8250.h one for all, something like this:

#define 8250_PORT_FLAGS(_base, _irq, _flags)
=E2=80=A6
	.flags=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=3D =
UPF_BOOT_AUTOCONF | (_flags) \

#define 8250_PORT(_base, _irq)	8250_PORT_FLAGS(_base, _irq, 0)

And use it.

> --- a/drivers/tty/serial/8250/8250_boca.c
> +++ b/drivers/tty/serial/8250/8250_boca.c
> @@ -10,7 +10,7 @@
> =C2=A0#include <linux/init.h>
> =C2=A0#include <linux/serial_8250.h>
> =C2=A0
> -#define PORT(_base,_irq)				\
> +#define PORT(_base, _irq)				\
> =C2=A0	{						\
> =C2=A0		.iobase		=3D _base,		\
> =C2=A0		.irq		=3D _irq,			\
>=20

> --- a/drivers/tty/serial/8250/8250_exar_st16c554.c
> +++ b/drivers/tty/serial/8250/8250_exar_st16c554.c
> @@ -13,7 +13,7 @@
> =C2=A0#include <linux/init.h>
> =C2=A0#include <linux/serial_8250.h>
> =C2=A0
> -#define PORT(_base,_irq)				\
> +#define PORT(_base, _irq)				\
> =C2=A0	{						\
> =C2=A0		.iobase		=3D _base,		\
> =C2=A0		.irq		=3D _irq,			\
>=20

> --- a/drivers/tty/serial/8250/8250_fourport.c
> +++ b/drivers/tty/serial/8250/8250_fourport.c
> @@ -10,7 +10,7 @@
> =C2=A0#include <linux/init.h>
> =C2=A0#include <linux/serial_8250.h>
> =C2=A0
> -#define PORT(_base,_irq)					=09
> \
> +#define PORT(_base, _irq)					=09
> \
> =C2=A0	{							=09
> \
> =C2=A0		.iobase		=3D _base,		=09
> 	\
> =C2=A0		.irq		=3D _irq,			=09
> 	\



--=20
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

--
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	[flat|nested] 22+ messages in thread

* Re: [PATCH v4 05/13] tty: serial: 8250: Remove else after return
  2016-01-08 17:43 ` [PATCH v4 05/13] tty: serial: 8250: Remove else after return Anton Wuerfel
@ 2016-01-11 12:30   ` Andy Shevchenko
  0 siblings, 0 replies; 22+ messages in thread
From: Andy Shevchenko @ 2016-01-11 12:30 UTC (permalink / raw)
  To: Anton Wuerfel, Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Peter Hurley,
	Heikki Krogerus, Qipeng Zha, Desmond Liu, Wang Long,
	Matt Redfearn, Paul Burton, Ralf Baechle, Krzysztof Kozlowski,
	Peter Hung, Soeren Grunewald, Adam Lee, Maciej S. Szmigiero,
	Mans Rullgard, linux-kernel, linux-parisc, linux-kernel,
	phillip.raffeck

On Fri, 2016-01-08 at 18:43 +0100, Anton Wuerfel wrote:
> This patch fixes checkpatch warnings about unnecessary else blocks
> after
> return statements.

> --- 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)
> =C2=A0
> =C2=A0	pi =3D (c & 0xff);

And here the parens are redundant.

> =C2=A0
> -	if (pi =3D=3D 2) {
> +	if (pi =3D=3D 2)
> =C2=A0		return 1;
> -	} else if ((pi =3D=3D 0) &&
> -			=C2=A0=C2=A0=C2=A0(dev->device =3D=3D
> PCI_DEVICE_ID_NETMOS_9900)) {
> +
> +	if ((pi =3D=3D 0) && (dev->device =3D=3D PCI_DEVICE_ID_NETMOS_9900)=
)
> {

--=20
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

--
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	[flat|nested] 22+ messages in thread

* Re: [PATCH v4 10/13] tty: serial: 8250: Suitably replace printk
  2016-01-08 17:43 ` [PATCH v4 10/13] tty: serial: 8250: Suitably replace printk Anton Wuerfel
@ 2016-01-11 12:38   ` Andy Shevchenko
  0 siblings, 0 replies; 22+ messages in thread
From: Andy Shevchenko @ 2016-01-11 12:38 UTC (permalink / raw)
  To: Anton Wuerfel, Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Peter Hurley,
	Heikki Krogerus, Qipeng Zha, Desmond Liu, Wang Long,
	Matt Redfearn, Paul Burton, Ralf Baechle, Krzysztof Kozlowski,
	Peter Hung, Soeren Grunewald, Adam Lee, Maciej S. Szmigiero,
	Mans Rullgard, linux-kernel, linux-parisc, linux-kernel,
	phillip.raffeck

On Fri, 2016-01-08 at 18:43 +0100, Anton Wuerfel wrote:
> From: Phillip Raffeck <phillip.raffeck@fau.de>
>=20
> 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.
>=20

> --- a/drivers/tty/serial/8250/8250_hp300.c
> +++ b/drivers/tty/serial/8250/8250_hp300.c
>=20

> @@ -141,13 +141,13 @@ int __init hp300_setup_serial_console(void)
> =C2=A0		if (DIO_ID(pa + DIO_VIRADDRBASE) & 0x80)
> =C2=A0			add_preferred_console("ttyS", port.line,
> "9600n8");
> =C2=A0#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");
> =C2=A0		return 0;
> =C2=A0#endif
> =C2=A0	}
> =C2=A0
> =C2=A0	if (early_serial_setup(&port) < 0)
> -		printk(KERN_WARNING "hp300_setup_serial_console():
> early_serial_setup() failed.\n");
> +		pr_warn("hp300_setup_serial_console():
> early_serial_setup() failed.\n");

%s:=E2=80=A6, __func__ ?

> =C2=A0	return 0;
> =C2=A0}
> =C2=A0#endif /* CONFIG_SERIAL_8250_CONSOLE */
> @@ -179,8 +179,9 @@ static int hpdca_init_one(struct dio_dev *d,
> =C2=A0	line =3D serial8250_register_8250_port(&uart);
> =C2=A0
> =C2=A0	if (line < 0) {
> -		printk(KERN_NOTICE "8250_hp300: register_serial()
> DCA scode %d"
> -		=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0" irq %d failed\n", d->s=
code, uart.port.irq);
> +		dev_notice(&d->dev,
> +			=C2=A0=C2=A0"8250_hp300: register_serial() DCA scode
> %d irq %d failed\n",
> +			=C2=A0=C2=A0d->scode, uart.port.irq);
> =C2=A0		return -ENOMEM;
> =C2=A0	}
> =C2=A0
> @@ -260,8 +261,8 @@ static int __init hp300_8250_init(void)
> =C2=A0		line =3D serial8250_register_8250_port(&uart);
> =C2=A0
> =C2=A0		if (line < 0) {
> -			printk(KERN_NOTICE "8250_hp300:
> register_serial() APCI"
> -			=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0" %d irq %d failed\n", =
i,
> uart.port.irq);
> +			pr_notice("8250_hp300: register_serial()
> APCI %d irq %d failed\n",
> +				=C2=A0=C2=A0i, uart.port.irq);

Inconsistent with dev_notice() above. Choose one which is most suitable
here.

--=20
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

--
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	[flat|nested] 22+ messages in thread

* Re: [PATCH v4 12/13] tty: serial: 8250: Removed warning in debug output
  2016-01-08 17:43 ` [PATCH v4 12/13] tty: serial: 8250: Removed warning in debug output Anton Wuerfel
@ 2016-01-11 12:42   ` Andy Shevchenko
  0 siblings, 0 replies; 22+ messages in thread
From: Andy Shevchenko @ 2016-01-11 12:42 UTC (permalink / raw)
  To: Anton Wuerfel, Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Peter Hurley,
	Heikki Krogerus, Qipeng Zha, Desmond Liu, Wang Long,
	Matt Redfearn, Paul Burton, Ralf Baechle, Krzysztof Kozlowski,
	Peter Hung, Soeren Grunewald, Adam Lee, Maciej S. Szmigiero,
	Mans Rullgard, linux-kernel, linux-parisc, linux-kernel,
	phillip.raffeck

On Fri, 2016-01-08 at 18:43 +0100, Anton Wuerfel wrote:
> This patch fixes type warnings in a debug output in 8250_pnp.c.
> Those warnings never got triggered, because the command was nested
> in an #ifdef, which is removed by a patch of this series.

Would be nice to cite the warning line from compiler or sparse (which
one, btw?)

Also, patch does not fix a warning. Rephrase title and commit message
in an appropriate way.

>=20
> 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
> ---
> =C2=A0drivers/tty/serial/8250/8250_pnp.c | 4 ++--
> =C2=A01 file changed, 2 insertions(+), 2 deletions(-)
>=20
> diff --git a/drivers/tty/serial/8250/8250_pnp.c
> b/drivers/tty/serial/8250/8250_pnp.c
> index ba3a1af..e99282f 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)
> =C2=A0		return -ENODEV;
> =C2=A0
> =C2=A0	dev_dbg(&dev->dev,
> -		=C2=A0"Setup PNP port: port %x, mem 0x%lx, irq %d, type
> %d\n",
> -		=C2=A0uart.port.iobase, uart.port.mapbase,
> +		=C2=A0"Setup PNP port: port %lx, mem 0x%lx, irq %d, type
> %d\n",
> +		=C2=A0uart.port.iobase, (unsigned long)
> uart.port.mapbase,

No need to have a space after ).

> =C2=A0		=C2=A0uart.port.irq, uart.port.iotype);
> =C2=A0
> =C2=A0	if (flags & CIR_PORT) {

--=20
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

--
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	[flat|nested] 22+ messages in thread

* Re: [PATCH v4 13/13] tty: serial: 8250: Fix indentation warnings
  2016-01-08 17:43 ` [PATCH v4 13/13] tty: serial: 8250: Fix indentation warnings Anton Wuerfel
@ 2016-01-11 12:47   ` Andy Shevchenko
  0 siblings, 0 replies; 22+ messages in thread
From: Andy Shevchenko @ 2016-01-11 12:47 UTC (permalink / raw)
  To: Anton Wuerfel, Greg Kroah-Hartman
  Cc: Jiri Slaby, James E.J. Bottomley, Helge Deller, Peter Hurley,
	Heikki Krogerus, Qipeng Zha, Desmond Liu, Wang Long,
	Matt Redfearn, Paul Burton, Ralf Baechle, Krzysztof Kozlowski,
	Peter Hung, Soeren Grunewald, Adam Lee, Maciej S. Szmigiero,
	Mans Rullgard, linux-kernel, linux-parisc, linux-kernel,
	phillip.raffeck

On Fri, 2016-01-08 at 18:43 +0100, Anton Wuerfel wrote:
> Checkpatch complains about incorrect indentation of switch/case
> statements.
> This patch fixes the corresponding warnings. Additionally some
> indentation
> is changed to match the correct format specified in the Linux Kernel
> Coding Style.
>=20
> 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
> ---
> =C2=A0drivers/tty/serial/8250/8250_pci.c=C2=A0=C2=A0| 12 ++++++------
> =C2=A0drivers/tty/serial/8250/8250_pnp.c=C2=A0=C2=A0|=C2=A0=C2=A04 ++=
--
> =C2=A0drivers/tty/serial/8250/8250_port.c |=C2=A0=C2=A06 +++---
> =C2=A03 files changed, 11 insertions(+), 11 deletions(-)
>=20
> diff --git a/drivers/tty/serial/8250/8250_pci.c
> b/drivers/tty/serial/8250/8250_pci.c
> index 09157fa..b0b47f9 100644
> --- a/drivers/tty/serial/8250/8250_pci.c
> +++ b/drivers/tty/serial/8250/8250_pci.c
> @@ -841,12 +841,12 @@ static int pci_netmos_init(struct pci_dev *dev)
> =C2=A0		return 0;
> =C2=A0
> =C2=A0	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;
> =C2=A0
> =C2=A0		default:

You forget to shift above line as well.

> =C2=A0			if (num_serial =3D=3D 0) {

But before doing that I would suggest to refactor the warning message
below in the code: copy it out of 'default:' to below condition and
replace by 'break;' inside the switch-case.

--=20
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

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

* Re: [PATCH v4 01/13] tty: serial: 8250: Fix whitespace errors
  2016-01-11 12:28   ` Andy Shevchenko
@ 2016-01-11 12:50     ` Shevchenko, Andriy
  2016-01-11 12:54       ` Måns Rullgård
  0 siblings, 1 reply; 22+ messages in thread
From: Shevchenko, Andriy @ 2016-01-11 12:50 UTC (permalink / raw)
  To: gregkh@linuxfoundation.org, anton.wuerfel@fau.de
  Cc: linux-kernel@vger.kernel.org, mail@maciej.szmigiero.name,
	desmondl@broadcom.com, Zha, Qipeng,
	heikki.krogerus@linux.intel.com, long.wanglong@huawei.com,
	soeren.grunewald@desy.de, deller@gmx.de, jslaby@suse.com,
	phillip.raffeck@fau.de, paul.burton@imgtec.com, hpeter@gmail.com,
	ralf@linux-mips.org, linux-kernel@i4.cs.fau.de, mans@mansr.com,
	adam.lee@canonical.com, jejb@parisc-linux.org,
	"linux-parisc@vger.kernel.org" <linux-paris

T24gTW9uLCAyMDE2LTAxLTExIGF0IDE0OjI4ICswMjAwLCBBbmR5IFNoZXZjaGVua28gd3JvdGU6
DQo+IE9uIEZyaSwgMjAxNi0wMS0wOCBhdCAxODo0MyArMDEwMCwgQW50b24gV3VlcmZlbCB3cm90
ZToNCj4gPiBUaGlzIHBhdGNoIGZpeGVzIHdoaXRlc3BhY2UgZXJyb3JzIHJlcG9ydGVkIGJ5IGNo
ZWNrcGF0Y2ggdG8NCj4gPiBpbmNyZWFzZQ0KPiA+IHJlYWRhYmlsaXR5LiBNYWluIGZvY3VzIGlz
IG9uIG1pc3Npbmcgc3BhY2VzIGFmdGVyIGNvbW1hcyBpbg0KPiA+IGZ1bmN0aW9uIGhlYWRlcnMg
YW5kIG1hY3JvcyAobGlrZSBmb28sYmFyIGVkaXRlZCB0byBmb28sIGJhcikuDQo+ID4gDQo+ID4g
U2lnbmVkLW9mZi1ieTogQW50b24gV8O8cmZlbCA8YW50b24ud3VlcmZlbEBmYXUuZGU+DQo+ID4g
U2lnbmVkLW9mZi1ieTogUGhpbGxpcCBSYWZmZWNrIDxwaGlsbGlwLnJhZmZlY2tAZmF1LmRlPg0K
PiA+IENDOiBsaW51eC1rZXJuZWxAaTQuY3MuZmF1LmRlDQo+IA0KPiBDYzogbG9va3MgbW9yZSBz
dGFuZGFyZC4NCj4gDQo+ID4gLS0tIGEvZHJpdmVycy90dHkvc2VyaWFsLzgyNTAvODI1MF9hY2Nl
bnQuYw0KPiA+ICsrKyBiL2RyaXZlcnMvdHR5L3NlcmlhbC84MjUwLzgyNTBfYWNjZW50LmMNCj4g
PiBAQCAtMTAsNyArMTAsNyBAQA0KPiA+IMKgI2luY2x1ZGUgPGxpbnV4L2luaXQuaD4NCj4gPiDC
oCNpbmNsdWRlIDxsaW51eC9zZXJpYWxfODI1MC5oPg0KPiA+IMKgDQo+ID4gLSNkZWZpbmUgUE9S
VChfYmFzZSxfaXJxKQkJCQlcDQo+ID4gKyNkZWZpbmUgUE9SVChfYmFzZSwgX2lycSkJCQkJXA0K
PiA+IMKgCXsJCQkJCQlcDQo+ID4gwqAJCS5pb2Jhc2UJCT0gX2Jhc2UsCQlcDQo+ID4gwqAJCS5p
cnEJCT0gX2lycSwJCQkNCj4gPiBcDQoNCjgyNTBfUE9SVCgpDQoNCj4gPiANCj4gDQo+IFdoaWxl
IHRob3NlIGFyZSBva2F5LCBJIHdvdWxkIHN1Z2dlc3QgdG8gbWFrZSBhIG1hY3JvIGluDQo+IGRy
aXZlcnMv4oCmLzgyNTAuaCBvbmUgZm9yIGFsbCwgc29tZXRoaW5nIGxpa2UgdGhpczoNCj4gDQo+
ICNkZWZpbmUgODI1MF9QT1JUX0ZMQUdTKF9iYXNlLCBfaXJxLCBfZmxhZ3MpDQo+IOKApg0KPiAJ
LmZsYWdzwqDCoMKgwqDCoMKgwqDCoMKgwqA9IFVQRl9CT09UX0FVVE9DT05GIHwgKF9mbGFncykg
XA0KPiANCj4gI2RlZmluZSA4MjUwX1BPUlQoX2Jhc2UsIF9pcnEpCTgyNTBfUE9SVF9GTEFHUyhf
YmFzZSwgX2lycSwgMCkNCj4gDQo+IEFuZCB1c2UgaXQuDQoNCiNkZWZpbmUgODI1MF9GT1VSUE9S
VChfYmFzZSwgX2lycSkJODI1MF9QT1JUX0ZMQUdTKF9iYXNlLCBfaXJxLA0KVVBGX0ZPVVJQT1JU
KQ0KDQo+ID4gLS0tIGEvZHJpdmVycy90dHkvc2VyaWFsLzgyNTAvODI1MF9mb3VycG9ydC5jDQo+
ID4gKysrIGIvZHJpdmVycy90dHkvc2VyaWFsLzgyNTAvODI1MF9mb3VycG9ydC5jDQo+ID4gQEAg
LTEwLDcgKzEwLDcgQEANCj4gPiDCoCNpbmNsdWRlIDxsaW51eC9pbml0Lmg+DQo+ID4gwqAjaW5j
bHVkZSA8bGludXgvc2VyaWFsXzgyNTAuaD4NCj4gPiDCoA0KPiA+IC0jZGVmaW5lIFBPUlQoX2Jh
c2UsX2lycSkJCQkJCQkNCj4gPiBcDQo+ID4gKyNkZWZpbmUgUE9SVChfYmFzZSwgX2lycSkJCQkJ
CQkNCj4gPiBcDQo+ID4gwqAJewkJCQkJCQkJDQo+ID4gXA0KPiA+IMKgCQkuaW9iYXNlCQk9IF9i
YXNlLAkJCQ0KPiA+IAlcDQo+ID4gwqAJCS5pcnEJCT0gX2lycSwJCQkNCj4gPiAJDQo+ID4gCVwN
Cg0KODI1MF9GT1VSUE9SVCgpDQoNCi0tIA0KQW5keSBTaGV2Y2hlbmtvIDxhbmRyaXkuc2hldmNo
ZW5rb0BpbnRlbC5jb20+DQpJbnRlbCBGaW5sYW5kIE95DQotLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KSW50ZWwgRmlu
bGFuZCBPeQpSZWdpc3RlcmVkIEFkZHJlc3M6IFBMIDI4MSwgMDAxODEgSGVsc2lua2kgCkJ1c2lu
ZXNzIElkZW50aXR5IENvZGU6IDAzNTc2MDYgLSA0IApEb21pY2lsZWQgaW4gSGVsc2lua2kgCgpU
aGlzIGUtbWFpbCBhbmQgYW55IGF0dGFjaG1lbnRzIG1heSBjb250YWluIGNvbmZpZGVudGlhbCBt
YXRlcmlhbCBmb3IKdGhlIHNvbGUgdXNlIG9mIHRoZSBpbnRlbmRlZCByZWNpcGllbnQocykuIEFu
eSByZXZpZXcgb3IgZGlzdHJpYnV0aW9uCmJ5IG90aGVycyBpcyBzdHJpY3RseSBwcm9oaWJpdGVk
LiBJZiB5b3UgYXJlIG5vdCB0aGUgaW50ZW5kZWQKcmVjaXBpZW50LCBwbGVhc2UgY29udGFjdCB0
aGUgc2VuZGVyIGFuZCBkZWxldGUgYWxsIGNvcGllcy4K


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

* Re: [PATCH v4 01/13] tty: serial: 8250: Fix whitespace errors
  2016-01-11 12:50     ` Shevchenko, Andriy
@ 2016-01-11 12:54       ` Måns Rullgård
  2016-01-11 13:03         ` Shevchenko, Andriy
  0 siblings, 1 reply; 22+ messages in thread
From: Måns Rullgård @ 2016-01-11 12:54 UTC (permalink / raw)
  To: Shevchenko, Andriy
  Cc: gregkh@linuxfoundation.org, anton.wuerfel@fau.de,
	linux-kernel@vger.kernel.org, mail@maciej.szmigiero.name,
	desmondl@broadcom.com, Zha, Qipeng,
	heikki.krogerus@linux.intel.com, long.wanglong@huawei.com,
	soeren.grunewald@desy.de, deller@gmx.de, jslaby@suse.com,
	phillip.raffeck@fau.de, paul.burton@imgtec.com, hpeter@gmail.com,
	ralf@linux-mips.org, linux-kernel@i4.cs.fau.de,
	adam.lee@canonical.com, "jej

"Shevchenko, Andriy" <andriy.shevchenko@intel.com> writes:

> On Mon, 2016-01-11 at 14:28 +0200, Andy Shevchenko wrote:
>> On Fri, 2016-01-08 at 18:43 +0100, Anton Wuerfel wrote:
>> > 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).
>> >=20
>> > 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
>>=20
>> Cc: looks more standard.
>>=20
>> > --- a/drivers/tty/serial/8250/8250_accent.c
>> > +++ b/drivers/tty/serial/8250/8250_accent.c
>> > @@ -10,7 +10,7 @@
>> > =C2=A0#include <linux/init.h>
>> > =C2=A0#include <linux/serial_8250.h>
>> > =C2=A0
>> > -#define PORT(_base,_irq)				\
>> > +#define PORT(_base, _irq)				\
>> > =C2=A0	{						\
>> > =C2=A0		.iobase		=3D _base,		\
>> > =C2=A0		.irq		=3D _irq,		=09
>> > \
>
> 8250_PORT()
>
>> >=20
>>=20
>> While those are okay, I would suggest to make a macro in
>> drivers/=E2=80=A6/8250.h one for all, something like this:
>>=20
>> #define 8250_PORT_FLAGS(_base, _irq, _flags)
>> =E2=80=A6
>> 	.flags=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=3D=
 UPF_BOOT_AUTOCONF | (_flags) \
>>=20
>> #define 8250_PORT(_base, _irq)	8250_PORT_FLAGS(_base, _irq, 0)
>>=20
>> And use it.
>
> #define 8250_FOURPORT(_base, _irq)	8250_PORT_FLAGS(_base, _irq,
> UPF_FOURPORT)

Macro names can't start with a number.

--=20
M=C3=A5ns Rullg=C3=A5rd

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

* Re: [PATCH v4 01/13] tty: serial: 8250: Fix whitespace errors
  2016-01-11 12:54       ` Måns Rullgård
@ 2016-01-11 13:03         ` Shevchenko, Andriy
  0 siblings, 0 replies; 22+ messages in thread
From: Shevchenko, Andriy @ 2016-01-11 13:03 UTC (permalink / raw)
  To: mans@mansr.com
  Cc: anton.wuerfel@fau.de, linux-kernel@vger.kernel.org,
	mail@maciej.szmigiero.name, desmondl@broadcom.com, Zha, Qipeng,
	heikki.krogerus@linux.intel.com, long.wanglong@huawei.com,
	soeren.grunewald@desy.de, deller@gmx.de, jslaby@suse.com,
	phillip.raffeck@fau.de, paul.burton@imgtec.com, hpeter@gmail.com,
	ralf@linux-mips.org, linux-kernel@i4.cs.fau.de,
	adam.lee@canonical.com, gregkh@linuxfoundation.org,
	"jejb@parisc-linux.or

T24gTW9uLCAyMDE2LTAxLTExIGF0IDEyOjU0ICswMDAwLCBNw6VucyBSdWxsZ8OlcmQgd3JvdGU6
DQo+ICJTaGV2Y2hlbmtvLCBBbmRyaXkiIDxhbmRyaXkuc2hldmNoZW5rb0BpbnRlbC5jb20+IHdy
aXRlczoNCj4gDQo+ID4gT24gTW9uLCAyMDE2LTAxLTExIGF0IDE0OjI4ICswMjAwLCBBbmR5IFNo
ZXZjaGVua28gd3JvdGU6DQo+ID4gPiBPbiBGcmksIDIwMTYtMDEtMDggYXQgMTg6NDMgKzAxMDAs
IEFudG9uIFd1ZXJmZWwgd3JvdGU6DQo+ID4gPiA+IFRoaXMgcGF0Y2ggZml4ZXMgd2hpdGVzcGFj
ZSBlcnJvcnMgcmVwb3J0ZWQgYnkgY2hlY2twYXRjaCB0bw0KPiA+ID4gPiBpbmNyZWFzZQ0KPiA+
ID4gPiByZWFkYWJpbGl0eS4gTWFpbiBmb2N1cyBpcyBvbiBtaXNzaW5nIHNwYWNlcyBhZnRlciBj
b21tYXMgaW4NCj4gPiA+ID4gZnVuY3Rpb24gaGVhZGVycyBhbmQgbWFjcm9zIChsaWtlIGZvbyxi
YXIgZWRpdGVkIHRvIGZvbywgYmFyKS4NCj4gPiA+ID4gDQo+ID4gPiA+IFNpZ25lZC1vZmYtYnk6
IEFudG9uIFfDvHJmZWwgPGFudG9uLnd1ZXJmZWxAZmF1LmRlPg0KPiA+ID4gPiBTaWduZWQtb2Zm
LWJ5OiBQaGlsbGlwIFJhZmZlY2sgPHBoaWxsaXAucmFmZmVja0BmYXUuZGU+DQo+ID4gPiA+IEND
OiBsaW51eC1rZXJuZWxAaTQuY3MuZmF1LmRlDQo+ID4gPiANCj4gPiA+IENjOiBsb29rcyBtb3Jl
IHN0YW5kYXJkLg0KPiA+ID4gDQo+ID4gPiA+IC0tLSBhL2RyaXZlcnMvdHR5L3NlcmlhbC84MjUw
LzgyNTBfYWNjZW50LmMNCj4gPiA+ID4gKysrIGIvZHJpdmVycy90dHkvc2VyaWFsLzgyNTAvODI1
MF9hY2NlbnQuYw0KPiA+ID4gPiBAQCAtMTAsNyArMTAsNyBAQA0KPiA+ID4gPiDCoCNpbmNsdWRl
IDxsaW51eC9pbml0Lmg+DQo+ID4gPiA+IMKgI2luY2x1ZGUgPGxpbnV4L3NlcmlhbF84MjUwLmg+
DQo+ID4gPiA+IMKgDQo+ID4gPiA+IC0jZGVmaW5lIFBPUlQoX2Jhc2UsX2lycSkJCQkJXA0KPiA+
ID4gPiArI2RlZmluZSBQT1JUKF9iYXNlLCBfaXJxKQkJCQlcDQo+ID4gPiA+IMKgCXsJCQkJCQlc
DQo+ID4gPiA+IMKgCQkuaW9iYXNlCQk9IF9iYXNlLAkJDQo+ID4gPiA+IFwNCj4gPiA+ID4gwqAJ
CS5pcnEJCT0gX2lycSwJCQkNCj4gPiA+ID4gXA0KPiA+IA0KPiA+IDgyNTBfUE9SVCgpDQo+ID4g
DQo+ID4gPiA+IA0KPiA+ID4gDQo+ID4gPiBXaGlsZSB0aG9zZSBhcmUgb2theSwgSSB3b3VsZCBz
dWdnZXN0IHRvIG1ha2UgYSBtYWNybyBpbg0KPiA+ID4gZHJpdmVycy/igKYvODI1MC5oIG9uZSBm
b3IgYWxsLCBzb21ldGhpbmcgbGlrZSB0aGlzOg0KPiA+ID4gDQo+ID4gPiAjZGVmaW5lIDgyNTBf
UE9SVF9GTEFHUyhfYmFzZSwgX2lycSwgX2ZsYWdzKQ0KPiA+ID4g4oCmDQo+ID4gPiAJLmZsYWdz
wqDCoMKgwqDCoMKgwqDCoMKgwqA9IFVQRl9CT09UX0FVVE9DT05GIHwgKF9mbGFncykgXA0KPiA+
ID4gDQo+ID4gPiAjZGVmaW5lIDgyNTBfUE9SVChfYmFzZSwgX2lycSkJODI1MF9QT1JUX0ZMQUdT
KF9iYXNlLA0KPiA+ID4gX2lycSwgMCkNCj4gPiA+IA0KPiA+ID4gQW5kIHVzZSBpdC4NCj4gPiAN
Cj4gPiAjZGVmaW5lIDgyNTBfRk9VUlBPUlQoX2Jhc2UsIF9pcnEpCTgyNTBfUE9SVF9GTEFHUyhf
YmFzZSwNCj4gPiBfaXJxLA0KPiA+IFVQRl9GT1VSUE9SVCkNCj4gDQo+IE1hY3JvIG5hbWVzIGNh
bid0IHN0YXJ0IHdpdGggYSBudW1iZXIuDQoNCk9oLCByaWdodCwgdGhhbmtzLg0KDQpTRVJJQUw4
MjUwX1BPUlQqIHdpbGwgd29yay4NCg0KLS0gDQpBbmR5IFNoZXZjaGVua28gPGFuZHJpeS5zaGV2
Y2hlbmtvQGludGVsLmNvbT4NCkludGVsIEZpbmxhbmQgT3kNCi0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQpJbnRlbCBG
aW5sYW5kIE95ClJlZ2lzdGVyZWQgQWRkcmVzczogUEwgMjgxLCAwMDE4MSBIZWxzaW5raSAKQnVz
aW5lc3MgSWRlbnRpdHkgQ29kZTogMDM1NzYwNiAtIDQgCkRvbWljaWxlZCBpbiBIZWxzaW5raSAK
ClRoaXMgZS1tYWlsIGFuZCBhbnkgYXR0YWNobWVudHMgbWF5IGNvbnRhaW4gY29uZmlkZW50aWFs
IG1hdGVyaWFsIGZvcgp0aGUgc29sZSB1c2Ugb2YgdGhlIGludGVuZGVkIHJlY2lwaWVudChzKS4g
QW55IHJldmlldyBvciBkaXN0cmlidXRpb24KYnkgb3RoZXJzIGlzIHN0cmljdGx5IHByb2hpYml0
ZWQuIElmIHlvdSBhcmUgbm90IHRoZSBpbnRlbmRlZApyZWNpcGllbnQsIHBsZWFzZSBjb250YWN0
IHRoZSBzZW5kZXIgYW5kIGRlbGV0ZSBhbGwgY29waWVzLgo=


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

end of thread, other threads:[~2016-01-11 13:03 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-08 17:43 [PATCH v4 00/13] tty: serial: 8250: Fix checkpatch warnings Anton Wuerfel
2016-01-08 17:43 ` [PATCH v4 01/13] tty: serial: 8250: Fix whitespace errors Anton Wuerfel
2016-01-11 12:28   ` Andy Shevchenko
2016-01-11 12:50     ` Shevchenko, Andriy
2016-01-11 12:54       ` Måns Rullgård
2016-01-11 13:03         ` Shevchenko, Andriy
2016-01-08 17:43 ` [PATCH v4 02/13] tty: serial: 8250: Replace spaces with tabs Anton Wuerfel
2016-01-08 17:43 ` [PATCH v4 03/13] tty: serial: 8250: Fix braces after struct Anton Wuerfel
2016-01-08 17:43 ` [PATCH v4 04/13] tty: serial: 8250: Fix multiline comment style Anton Wuerfel
2016-01-08 17:43 ` [PATCH v4 05/13] tty: serial: 8250: Remove else after return Anton Wuerfel
2016-01-11 12:30   ` Andy Shevchenko
2016-01-08 17:43 ` [PATCH v4 06/13] tty: serial: 8250: Move EXPORT_SYMBOL to function Anton Wuerfel
2016-01-08 17:43 ` [PATCH v4 07/13] tty: serial: 8250: Fix line continuation warning Anton Wuerfel
2016-01-08 17:43 ` [PATCH v4 08/13] tty: serial: 8250: Add parentheses to macro Anton Wuerfel
2016-01-08 17:43 ` [PATCH v4 09/13] tty: serial: 8250: Fix multi-line strings Anton Wuerfel
2016-01-08 17:43 ` [PATCH v4 10/13] tty: serial: 8250: Suitably replace printk Anton Wuerfel
2016-01-11 12:38   ` Andy Shevchenko
2016-01-08 17:43 ` [PATCH v4 11/13] tty: serial: 8250: Remove SERIAL_DEBUG_PNP macro Anton Wuerfel
2016-01-08 17:43 ` [PATCH v4 12/13] tty: serial: 8250: Removed warning in debug output Anton Wuerfel
2016-01-11 12:42   ` Andy Shevchenko
2016-01-08 17:43 ` [PATCH v4 13/13] tty: serial: 8250: Fix indentation warnings Anton Wuerfel
2016-01-11 12:47   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).