All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Abbott <abbotti@mev.co.uk>
To: <driverdev-devel@linuxdriverproject.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ian Abbott <abbotti@mev.co.uk>,
	H Hartley Sweeten <hartleys@visionengravers.com>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH v2 4/6] staging: comedi: comedi_compat32.c: reformat other block comments
Date: Tue, 27 Jan 2015 18:16:54 +0000	[thread overview]
Message-ID: <1422382616-6884-5-git-send-email-abbotti@mev.co.uk> (raw)
In-Reply-To: <1422382616-6884-1-git-send-email-abbotti@mev.co.uk>

Use the usual block comment style.  Combine some consecutive comments
into block comments.  Also remove part of a comment referring to
`ptr_to_compat()` not being implemented until kernel version 2.6.11 as
it's irrelevant.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
v2: no change
---
 drivers/staging/comedi/comedi_compat32.c | 36 +++++++++++++++++++++-----------
 1 file changed, 24 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/comedi/comedi_compat32.c b/drivers/staging/comedi/comedi_compat32.c
index 097fd4d..acbacff 100644
--- a/drivers/staging/comedi/comedi_compat32.c
+++ b/drivers/staging/comedi/comedi_compat32.c
@@ -27,11 +27,15 @@
 
 #define COMEDI32_CHANINFO _IOR(CIO, 3, struct comedi32_chaninfo_struct)
 #define COMEDI32_RANGEINFO _IOR(CIO, 8, struct comedi32_rangeinfo_struct)
-/* N.B. COMEDI32_CMD and COMEDI_CMD ought to use _IOWR, not _IOR.
- * It's too late to change it now, but it only affects the command number. */
+/*
+ * N.B. COMEDI32_CMD and COMEDI_CMD ought to use _IOWR, not _IOR.
+ * It's too late to change it now, but it only affects the command number.
+ */
 #define COMEDI32_CMD _IOR(CIO, 9, struct comedi32_cmd_struct)
-/* N.B. COMEDI32_CMDTEST and COMEDI_CMDTEST ought to use _IOWR, not _IOR.
- * It's too late to change it now, but it only affects the command number. */
+/*
+ * N.B. COMEDI32_CMDTEST and COMEDI_CMDTEST ought to use _IOWR, not _IOR.
+ * It's too late to change it now, but it only affects the command number.
+ */
 #define COMEDI32_CMDTEST _IOR(CIO, 10, struct comedi32_cmd_struct)
 #define COMEDI32_INSNLIST _IOR(CIO, 11, struct comedi32_insnlist_struct)
 #define COMEDI32_INSN _IOR(CIO, 12, struct comedi32_insn_struct)
@@ -215,10 +219,12 @@ static int put_compat_cmd(struct comedi32_cmd_struct __user *cmd32,
 	int err;
 	unsigned int temp;
 
-	/* Copy back most of cmd structure. */
-	/* Assume the pointer values are already valid. */
-	/* (Could use ptr_to_compat() to set them, but that wasn't implemented
-	 * until kernel version 2.6.11.) */
+	/*
+	 * Copy back most of cmd structure.
+	 *
+	 * Assume the pointer values are already valid.
+	 * (Could use ptr_to_compat() to set them.)
+	 */
 	if (!access_ok(VERIFY_READ, cmd, sizeof(*cmd)) ||
 	    !access_ok(VERIFY_WRITE, cmd32, sizeof(*cmd32)))
 		return -EFAULT;
@@ -403,8 +409,11 @@ static int compat_insn(struct file *file, unsigned long arg)
 	return translated_ioctl(file, COMEDI_INSN, (unsigned long)insn);
 }
 
-/* Process untranslated ioctl. */
-/* Returns -ENOIOCTLCMD for unrecognised ioctl codes. */
+/*
+ * Process untranslated ioctl.
+ *
+ * Returns -ENOIOCTLCMD for unrecognised ioctl codes.
+ */
 static inline int raw_ioctl(struct file *file, unsigned int cmd,
 			    unsigned long arg)
 {
@@ -454,8 +463,11 @@ static inline int raw_ioctl(struct file *file, unsigned int cmd,
 	return rc;
 }
 
-/* compat_ioctl file operation. */
-/* Returns -ENOIOCTLCMD for unrecognised ioctl codes. */
+/*
+ * compat_ioctl file operation.
+ *
+ * Returns -ENOIOCTLCMD for unrecognised ioctl codes.
+ */
 long comedi_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
 	return raw_ioctl(file, cmd, arg);
-- 
2.1.4


WARNING: multiple messages have this Message-ID (diff)
From: Ian Abbott <abbotti@mev.co.uk>
To: driverdev-devel@linuxdriverproject.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ian Abbott <abbotti@mev.co.uk>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 4/6] staging: comedi: comedi_compat32.c: reformat other block comments
Date: Tue, 27 Jan 2015 18:16:54 +0000	[thread overview]
Message-ID: <1422382616-6884-5-git-send-email-abbotti@mev.co.uk> (raw)
In-Reply-To: <1422382616-6884-1-git-send-email-abbotti@mev.co.uk>

Use the usual block comment style.  Combine some consecutive comments
into block comments.  Also remove part of a comment referring to
`ptr_to_compat()` not being implemented until kernel version 2.6.11 as
it's irrelevant.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
---
v2: no change
---
 drivers/staging/comedi/comedi_compat32.c | 36 +++++++++++++++++++++-----------
 1 file changed, 24 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/comedi/comedi_compat32.c b/drivers/staging/comedi/comedi_compat32.c
index 097fd4d..acbacff 100644
--- a/drivers/staging/comedi/comedi_compat32.c
+++ b/drivers/staging/comedi/comedi_compat32.c
@@ -27,11 +27,15 @@
 
 #define COMEDI32_CHANINFO _IOR(CIO, 3, struct comedi32_chaninfo_struct)
 #define COMEDI32_RANGEINFO _IOR(CIO, 8, struct comedi32_rangeinfo_struct)
-/* N.B. COMEDI32_CMD and COMEDI_CMD ought to use _IOWR, not _IOR.
- * It's too late to change it now, but it only affects the command number. */
+/*
+ * N.B. COMEDI32_CMD and COMEDI_CMD ought to use _IOWR, not _IOR.
+ * It's too late to change it now, but it only affects the command number.
+ */
 #define COMEDI32_CMD _IOR(CIO, 9, struct comedi32_cmd_struct)
-/* N.B. COMEDI32_CMDTEST and COMEDI_CMDTEST ought to use _IOWR, not _IOR.
- * It's too late to change it now, but it only affects the command number. */
+/*
+ * N.B. COMEDI32_CMDTEST and COMEDI_CMDTEST ought to use _IOWR, not _IOR.
+ * It's too late to change it now, but it only affects the command number.
+ */
 #define COMEDI32_CMDTEST _IOR(CIO, 10, struct comedi32_cmd_struct)
 #define COMEDI32_INSNLIST _IOR(CIO, 11, struct comedi32_insnlist_struct)
 #define COMEDI32_INSN _IOR(CIO, 12, struct comedi32_insn_struct)
@@ -215,10 +219,12 @@ static int put_compat_cmd(struct comedi32_cmd_struct __user *cmd32,
 	int err;
 	unsigned int temp;
 
-	/* Copy back most of cmd structure. */
-	/* Assume the pointer values are already valid. */
-	/* (Could use ptr_to_compat() to set them, but that wasn't implemented
-	 * until kernel version 2.6.11.) */
+	/*
+	 * Copy back most of cmd structure.
+	 *
+	 * Assume the pointer values are already valid.
+	 * (Could use ptr_to_compat() to set them.)
+	 */
 	if (!access_ok(VERIFY_READ, cmd, sizeof(*cmd)) ||
 	    !access_ok(VERIFY_WRITE, cmd32, sizeof(*cmd32)))
 		return -EFAULT;
@@ -403,8 +409,11 @@ static int compat_insn(struct file *file, unsigned long arg)
 	return translated_ioctl(file, COMEDI_INSN, (unsigned long)insn);
 }
 
-/* Process untranslated ioctl. */
-/* Returns -ENOIOCTLCMD for unrecognised ioctl codes. */
+/*
+ * Process untranslated ioctl.
+ *
+ * Returns -ENOIOCTLCMD for unrecognised ioctl codes.
+ */
 static inline int raw_ioctl(struct file *file, unsigned int cmd,
 			    unsigned long arg)
 {
@@ -454,8 +463,11 @@ static inline int raw_ioctl(struct file *file, unsigned int cmd,
 	return rc;
 }
 
-/* compat_ioctl file operation. */
-/* Returns -ENOIOCTLCMD for unrecognised ioctl codes. */
+/*
+ * compat_ioctl file operation.
+ *
+ * Returns -ENOIOCTLCMD for unrecognised ioctl codes.
+ */
 long comedi_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
 	return raw_ioctl(file, cmd, arg);
-- 
2.1.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2015-01-27 18:17 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27 15:50 [PATCH 0/7] staging: comedi: comedi_compat32.[ch] fix and tidy up Ian Abbott
2015-01-27 15:50 ` Ian Abbott
2015-01-27 15:50 ` [PATCH 1/7] staging: comedi: comedi_compat32.c: fix COMEDI_CMD copy back Ian Abbott
2015-01-27 15:50   ` Ian Abbott
2015-01-27 15:58   ` Ian Abbott
2015-01-27 15:58     ` Ian Abbott
2015-01-27 17:20     ` Hartley Sweeten
2015-01-27 17:20       ` Hartley Sweeten
2015-01-27 18:04       ` Ian Abbott
2015-01-27 18:04         ` Ian Abbott
2015-01-27 18:04         ` Ian Abbott
2015-01-27 15:50 ` [PATCH 2/7] staging: comedi: comedi_compat32.h: reformat copyright comment Ian Abbott
2015-01-27 15:50   ` Ian Abbott
2015-01-27 15:50 ` [PATCH 3/7] staging: comedi: comedi_compat.c: " Ian Abbott
2015-01-27 15:50   ` Ian Abbott
2015-01-27 15:50 ` [PATCH 4/7] staging: comedi: comedi_compat32.c: reformat other block comments Ian Abbott
2015-01-27 15:50   ` Ian Abbott
2015-01-27 15:50 ` [PATCH 5/7] staging: comedi: comedi_compat32.c: align some comments Ian Abbott
2015-01-27 15:50   ` Ian Abbott
2015-01-27 15:50 ` [PATCH 6/7] staging: comedi: comedi_compat32.c: absorb raw_ioctl() Ian Abbott
2015-01-27 15:50   ` Ian Abbott
2015-01-27 15:50 ` [PATCH 7/7] staging: comedi: comedi_compat.c: use long unlocked_ioctl return value Ian Abbott
2015-01-27 15:50   ` Ian Abbott
2015-01-27 18:16 ` [PATCH v2 0/6] staging: comedi: comedi_compat32.[ch] fix and tidy up Ian Abbott
2015-01-27 18:16   ` Ian Abbott
2015-01-27 18:16   ` [PATCH v2 1/6] staging: comedi: comedi_compat32.c: fix COMEDI_CMD copy back Ian Abbott
2015-01-27 18:16     ` Ian Abbott
2015-01-27 18:16   ` [PATCH v2 2/6] staging: comedi: comedi_compat32.h: reformat copyright comment Ian Abbott
2015-01-27 18:16     ` Ian Abbott
2015-01-27 18:16   ` [PATCH v2 3/6] staging: comedi: comedi_compat.c: " Ian Abbott
2015-01-27 18:16     ` Ian Abbott
2015-01-27 18:21     ` Ian Abbott
2015-01-27 18:21       ` Ian Abbott
2015-01-27 18:26     ` [PATCH v3 3/6] staging: comedi: comedi_compat32.c: " Ian Abbott
2015-01-27 18:26       ` Ian Abbott
2015-01-27 18:16   ` Ian Abbott [this message]
2015-01-27 18:16     ` [PATCH v2 4/6] staging: comedi: comedi_compat32.c: reformat other block comments Ian Abbott
2015-01-27 18:16   ` [PATCH v2 5/6] staging: comedi: comedi_compat32.c: align some comments Ian Abbott
2015-01-27 18:16     ` Ian Abbott
2015-01-27 18:16   ` [PATCH v2 6/6] staging: comedi: comedi_compat32.c: absorb raw_ioctl() Ian Abbott
2015-01-27 18:16     ` Ian Abbott
2015-01-27 20:38   ` [PATCH v2 0/6] staging: comedi: comedi_compat32.[ch] fix and tidy up Hartley Sweeten
2015-01-27 20:38     ` Hartley Sweeten

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=1422382616-6884-5-git-send-email-abbotti@mev.co.uk \
    --to=abbotti@mev.co.uk \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hartleys@visionengravers.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.