The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH v2 04/11] parport: fix coding style
Date: Wed, 28 Oct 2015 14:41:33 +0530	[thread overview]
Message-ID: <1446023500-21292-5-git-send-email-sudipm.mukherjee@gmail.com> (raw)
In-Reply-To: <1446023500-21292-1-git-send-email-sudipm.mukherjee@gmail.com>

The multi-line comments were not according to the kernel coding style.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/parport/share.c | 69 +++++++++++++++++++++++++++++++------------------
 1 file changed, 44 insertions(+), 25 deletions(-)

diff --git a/drivers/parport/share.c b/drivers/parport/share.c
index d85e566..840c730 100644
--- a/drivers/parport/share.c
+++ b/drivers/parport/share.c
@@ -207,8 +207,10 @@ static void detach_driver_chain(struct parport *port)
 /* Ask kmod for some lowlevel drivers. */
 static void get_lowlevel_driver (void)
 {
-	/* There is no actual module called this: you should set
-	 * up an alias for modutils. */
+	/*
+	 * There is no actual module called this: you should set
+	 * up an alias for modutils.
+	 */
 	request_module ("parport_lowlevel");
 }
 
@@ -728,11 +730,12 @@ parport_register_device(struct parport *port, const char *name,
 		}
 	}
 
-	/* We up our own module reference count, and that of the port
-           on which a device is to be registered, to ensure that
-           neither of us gets unloaded while we sleep in (e.g.)
-           kmalloc.
-         */
+	/*
+	 * We up our own module reference count, and that of the port
+	 * on which a device is to be registered, to ensure that
+	 * neither of us gets unloaded while we sleep in (e.g.)
+	 * kmalloc.
+	 */
 	if (!try_module_get(port->ops->owner)) {
 		return NULL;
 	}
@@ -783,9 +786,11 @@ parport_register_device(struct parport *port, const char *name,
 	}
 
 	tmp->next = port->physport->devices;
-	wmb(); /* Make sure that tmp->next is written before it's
-                  added to the list; see comments marked 'no locking
-                  required' */
+	wmb(); /*
+		* Make sure that tmp->next is written before it's
+		* added to the list; see comments marked 'no locking
+		* required'
+		*/
 	if (port->physport->devices)
 		port->physport->devices->prev = tmp;
 	port->physport->devices = tmp;
@@ -1008,8 +1013,10 @@ void parport_unregister_device(struct pardevice *dev)
 
 	spin_unlock(&port->pardevice_lock);
 
-	/* Make sure we haven't left any pointers around in the wait
-	 * list. */
+	/*
+	 * Make sure we haven't left any pointers around in the wait
+	 * list.
+	 */
 	spin_lock_irq(&port->waitlist_lock);
 	if (dev->waitprev || dev->waitnext || port->waithead == dev) {
 		if (dev->waitprev)
@@ -1131,8 +1138,10 @@ int parport_claim(struct pardevice *dev)
 			goto blocked;
 
 		if (port->cad != oldcad) {
-			/* I think we'll actually deadlock rather than
-                           get here, but just in case.. */
+			/*
+			 * I think we'll actually deadlock rather than
+			 * get here, but just in case..
+			 */
 			printk(KERN_WARNING
 			       "%s: %s released port when preempted!\n",
 			       port->name, oldcad->name);
@@ -1185,9 +1194,11 @@ int parport_claim(struct pardevice *dev)
 	return 0;
 
 blocked:
-	/* If this is the first time we tried to claim the port, register an
-	   interest.  This is only allowed for devices sleeping in
-	   parport_claim_or_block(), or those with a wakeup function.  */
+	/*
+	 * If this is the first time we tried to claim the port, register an
+	 * interest.  This is only allowed for devices sleeping in
+	 * parport_claim_or_block(), or those with a wakeup function.
+	 */
 
 	/* The cad_lock is still held for writing here */
 	if (dev->waiting & 2 || dev->wakeup) {
@@ -1223,8 +1234,10 @@ int parport_claim_or_block(struct pardevice *dev)
 {
 	int r;
 
-	/* Signal to parport_claim() that we can wait even without a
-	   wakeup function.  */
+	/*
+	 * Signal to parport_claim() that we can wait even without a
+	 * wakeup function.
+	 */
 	dev->waiting = 2;
 
 	/* Try to claim the port.  If this fails, we need to sleep.  */
@@ -1242,8 +1255,10 @@ int parport_claim_or_block(struct pardevice *dev)
 		 * See also parport_release()
 		 */
 
-		/* If dev->waiting is clear now, an interrupt
-		   gave us the port and we would deadlock if we slept.  */
+		/*
+		 * If dev->waiting is clear now, an interrupt
+		 * gave us the port and we would deadlock if we slept.
+		 */
 		if (dev->waiting) {
 			wait_event_interruptible(dev->wait_q,
 						 !dev->waiting);
@@ -1316,8 +1331,10 @@ void parport_release(struct pardevice *dev)
 	/* Save control registers */
 	port->ops->save_state(port, dev->state);
 
-	/* If anybody is waiting, find out who's been there longest and
-	   then wake them up. (Note: no locking required) */
+	/*
+	 * If anybody is waiting, find out who's been there longest and
+	 * then wake them up. (Note: no locking required)
+	 */
 	/* !!! LOCKING IS NEEDED HERE */
 	for (pd = port->waithead; pd; pd = pd->waitnext) {
 		if (pd->waiting & 2) { /* sleeping in claim_or_block */
@@ -1334,8 +1351,10 @@ void parport_release(struct pardevice *dev)
 		}
 	}
 
-	/* Nobody was waiting, so walk the list to see if anyone is
-	   interested in being woken up. (Note: no locking required) */
+	/*
+	 * Nobody was waiting, so walk the list to see if anyone is
+	 * interested in being woken up. (Note: no locking required)
+	 */
 	/* !!! LOCKING IS NEEDED HERE */
 	for (pd = port->devices; (port->cad == NULL) && pd; pd = pd->next) {
 		if (pd->wakeup && pd != dev)
-- 
1.9.1


  parent reply	other threads:[~2015-10-28  9:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28  9:11 [PATCH v2 00/11] parport cleanup Sudip Mukherjee
2015-10-28  9:11 ` [PATCH v2 01/11] parport: fix a trivial typo Sudip Mukherjee
2015-10-28  9:11 ` [PATCH v2 02/11] parport: remove trailing white space Sudip Mukherjee
2015-10-28  9:11 ` [PATCH v2 03/11] parport: EXPORT_SYMBOL should follow function Sudip Mukherjee
2015-10-28  9:11 ` Sudip Mukherjee [this message]
2015-10-28  9:11 ` [PATCH v2 05/11] parport: code indent should use tabs Sudip Mukherjee
2015-10-28  9:11 ` [PATCH v2 06/11] parport: quoted strings should not be split Sudip Mukherjee
2015-10-28  9:11 ` [PATCH v2 07/11] parport: remove braces Sudip Mukherjee
2015-10-28  9:11 ` [PATCH v2 08/11] parport: remove unnecessary out of memory message Sudip Mukherjee
2015-10-28  9:11 ` [PATCH v2 09/11] parport: change style of NULL comparison Sudip Mukherjee
2015-10-28  9:11 ` [PATCH v2 10/11] parport: remove unneeded space Sudip Mukherjee
2015-10-28  9:11 ` [PATCH v2 11/11] parport: avoid assignment in if Sudip Mukherjee
2015-12-22  4:28 ` [PATCH v2 00/11] parport cleanup Sudip Mukherjee

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=1446023500-21292-5-git-send-email-sudipm.mukherjee@gmail.com \
    --to=sudipm.mukherjee@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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