[PATCH 1/5] parport: add newline to trailing statements

From: Carlos Palminha
Date: Mon Jul 17 2017 - 12:37:31 EST


based on checkpatch, add newline to trailing statements

Signed-off-by: Carlos Palminha <palminha@xxxxxxxxxxxx>
---
drivers/parport/daisy.c | 7 +++++--
drivers/parport/ieee1284.c | 17 +++++++++--------
drivers/parport/ieee1284_ops.c | 8 ++++++--
drivers/parport/parport_cs.c | 4 +++-
drivers/parport/parport_gsc.c | 6 ++++--
drivers/parport/probe.c | 4 +++-
6 files changed, 30 insertions(+), 16 deletions(-)

diff --git a/drivers/parport/daisy.c b/drivers/parport/daisy.c
index 46eb15fb57ff..209f3e61964e 100644
--- a/drivers/parport/daisy.c
+++ b/drivers/parport/daisy.c
@@ -191,7 +191,9 @@ void parport_daisy_fini(struct parport *port)
/* Gaps in the numbering could be handled better. How should
someone enumerate through all IEEE1284.3 devices in the
topology?. */
- if (!topology) numdevs = 0;
+ if (!topology)
+ numdevs = 0;
+
spin_unlock(&topology_lock);
return;
}
@@ -472,7 +474,8 @@ static int assign_addrs(struct parport *port)

/* Ask the new devices to introduce themselves. */
deviceid = kmalloc(1024, GFP_KERNEL);
- if (!deviceid) return 0;
+ if (!deviceid)
+ return 0;

for (daisy = 0; thisdev < numdevs; thisdev++, daisy++)
parport_device_id(thisdev, deviceid, 1024);
diff --git a/drivers/parport/ieee1284.c b/drivers/parport/ieee1284.c
index 74cc6dd982d2..b40ee76d519d 100644
--- a/drivers/parport/ieee1284.c
+++ b/drivers/parport/ieee1284.c
@@ -536,16 +536,17 @@ int parport_negotiate (struct parport *port, int mode)
port->ieee1284.phase = IEEE1284_PH_FWD_IDLE;
DPRINTK (KERN_DEBUG "%s: ECP direction: forward\n",
port->name);
- } else switch (mode) {
- case IEEE1284_MODE_NIBBLE:
- case IEEE1284_MODE_BYTE:
- port->ieee1284.phase = IEEE1284_PH_REV_IDLE;
- break;
- default:
- port->ieee1284.phase = IEEE1284_PH_FWD_IDLE;
+ } else {
+ switch (mode) {
+ case IEEE1284_MODE_NIBBLE:
+ case IEEE1284_MODE_BYTE:
+ port->ieee1284.phase = IEEE1284_PH_REV_IDLE;
+ break;
+ default:
+ port->ieee1284.phase = IEEE1284_PH_FWD_IDLE;
+ }
}

-
return 0;
#endif /* IEEE1284 support */
}
diff --git a/drivers/parport/ieee1284_ops.c b/drivers/parport/ieee1284_ops.c
index a959224d011b..bfc9cde9a21d 100644
--- a/drivers/parport/ieee1284_ops.c
+++ b/drivers/parport/ieee1284_ops.c
@@ -468,7 +468,9 @@ size_t parport_ieee1284_ecp_write_data (struct parport *port,
DPRINTK (KERN_DEBUG "%s: Host transfer recovered\n",
port->name);

- if (time_after_eq (jiffies, expire)) break;
+ if (time_after_eq (jiffies, expire))
+ break;
+
goto try_again;
success:
parport_frob_control (port, PARPORT_CONTROL_STROBE, 0);
@@ -704,7 +706,9 @@ size_t parport_ieee1284_ecp_write_addr (struct parport *port,
DPRINTK (KERN_DEBUG "%s: Host transfer recovered\n",
port->name);

- if (time_after_eq (jiffies, expire)) break;
+ if (time_after_eq (jiffies, expire))
+ break;
+
goto try_again;
success:
parport_frob_control (port, PARPORT_CONTROL_STROBE, 0);
diff --git a/drivers/parport/parport_cs.c b/drivers/parport/parport_cs.c
index e9b52e4a4648..993565fef73b 100644
--- a/drivers/parport/parport_cs.c
+++ b/drivers/parport/parport_cs.c
@@ -88,7 +88,9 @@ static int parport_probe(struct pcmcia_device *link)

/* Create new parport device */
info = kzalloc(sizeof(*info), GFP_KERNEL);
- if (!info) return -ENOMEM;
+ if (!info)
+ return -ENOMEM;
+
link->priv = info;
info->p_dev = link;

diff --git a/drivers/parport/parport_gsc.c b/drivers/parport/parport_gsc.c
index 3858b87fd0bb..fc1c4192121b 100644
--- a/drivers/parport/parport_gsc.c
+++ b/drivers/parport/parport_gsc.c
@@ -211,10 +211,12 @@ static int parport_PS2_supported(struct parport *pb)
parport_gsc_data_reverse (pb);

parport_gsc_write_data(pb, 0x55);
- if (parport_gsc_read_data(pb) != 0x55) ok++;
+ if (parport_gsc_read_data(pb) != 0x55)
+ ok++;

parport_gsc_write_data(pb, 0xaa);
- if (parport_gsc_read_data(pb) != 0xaa) ok++;
+ if (parport_gsc_read_data(pb) != 0xaa)
+ ok++;

/* cancel input mode */
parport_gsc_data_forward (pb);
diff --git a/drivers/parport/probe.c b/drivers/parport/probe.c
index 4d1d6eaf333d..f2618cc1c793 100644
--- a/drivers/parport/probe.c
+++ b/drivers/parport/probe.c
@@ -64,7 +64,9 @@ static void parse_data(struct parport *port, int device, char *str)
while (p) {
char *sep;
q = strchr(p, ';');
- if (q) *q = 0;
+ if (q)
+ *q = 0;
+
sep = strchr(p, ':');
if (sep) {
char *u;
--
2.11.0