mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Carlos Palminha <CARLOS.PALMINHA@synopsys.com>
To: <linux-kernel@vger.kernel.org>, <linux-parport@lists.infradead.org>
Cc: <sudipm.mukherjee@gmail.com>, <sudip.mukherjee@codethink.co.uk>,
	<akpm@linux-foundation.org>,
	Carlos Palminha <CARLOS.PALMINHA@synopsys.com>
Subject: [PATCH 1/5] parport: add newline to trailing statements
Date: Mon, 17 Jul 2017 17:36:58 +0100	[thread overview]
Message-ID: <20170717163702.17427-2-palminha@synopsys.com> (raw)
In-Reply-To: <20170717163702.17427-1-palminha@synopsys.com>

based on checkpatch, add newline to trailing statements

Signed-off-by: Carlos Palminha <palminha@synopsys.com>
---
 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

  reply	other threads:[~2017-07-17 16:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-17 16:36 [PATCH 0/5] parport: cleanup several checkpatch issues Carlos Palminha
2017-07-17 16:36 ` Carlos Palminha [this message]
2017-08-07 20:42   ` [PATCH 1/5] parport: add newline to trailing statements Sudip Mukherjee
2017-07-17 16:36 ` [PATCH 2/5] parport: cleanup prohibited space after functions name Carlos Palminha
2017-08-07 20:49   ` Sudip Mukherjee
2017-07-17 16:37 ` [PATCH 3/5] parport: cleanup statics initialization to NULL or 0 Carlos Palminha
2017-07-17 16:37 ` [PATCH 4/5] parport: move open braces to the same line Carlos Palminha
2017-07-17 16:40 ` [PATCH 5/5] parport: remove unnecessary braces Carlos Palminha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170717163702.17427-2-palminha@synopsys.com \
    --to=carlos.palminha@synopsys.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parport@lists.infradead.org \
    --cc=sudip.mukherjee@codethink.co.uk \
    --cc=sudipm.mukherjee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®