LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 0/3] staging: comedi: 8253.h: reformat comments
@ 2015-01-26 12:06 Ian Abbott
  2015-01-26 12:06 ` [PATCH 1/3] staging: comedi: 8253.h: reformat copyright comment Ian Abbott
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ian Abbott @ 2015-01-26 12:06 UTC (permalink / raw)
  To: driverdev-devel
  Cc: Greg Kroah-Hartman, Ian Abbott, H Hartley Sweeten, linux-kernel

1) staging: comedi: 8253.h: reformat copyright comment
2) staging: comedi: 8253.h: reformat other block comments
3) staging: comedi: 8253.h: use usual style for single-line comments

 drivers/staging/comedi/drivers/8253.h | 92 ++++++++++++++++++-----------------
 1 file changed, 48 insertions(+), 44 deletions(-)

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

* [PATCH 1/3] staging: comedi: 8253.h: reformat copyright comment
  2015-01-26 12:06 [PATCH 0/3] staging: comedi: 8253.h: reformat comments Ian Abbott
@ 2015-01-26 12:06 ` Ian Abbott
  2015-01-26 12:06 ` [PATCH 2/3] staging: comedi: 8253.h: reformat other block comments Ian Abbott
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Ian Abbott @ 2015-01-26 12:06 UTC (permalink / raw)
  To: driverdev-devel
  Cc: Greg Kroah-Hartman, Ian Abbott, H Hartley Sweeten, linux-kernel

Use the usual block comment style.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
 drivers/staging/comedi/drivers/8253.h | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/comedi/drivers/8253.h b/drivers/staging/comedi/drivers/8253.h
index 9f4c141..55f1704 100644
--- a/drivers/staging/comedi/drivers/8253.h
+++ b/drivers/staging/comedi/drivers/8253.h
@@ -1,20 +1,20 @@
 /*
-    comedi/drivers/8253.h
-    Header file for 8253
-
-    COMEDI - Linux Control and Measurement Device Interface
-    Copyright (C) 2000 David A. Schleef <ds@schleef.org>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-*/
+ * comedi/drivers/8253.h
+ * Header file for 8253
+ *
+ * COMEDI - Linux Control and Measurement Device Interface
+ * Copyright (C) 2000 David A. Schleef <ds@schleef.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
 
 #ifndef _8253_H
 #define _8253_H
-- 
2.1.4


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

* [PATCH 2/3] staging: comedi: 8253.h: reformat other block comments
  2015-01-26 12:06 [PATCH 0/3] staging: comedi: 8253.h: reformat comments Ian Abbott
  2015-01-26 12:06 ` [PATCH 1/3] staging: comedi: 8253.h: reformat copyright comment Ian Abbott
@ 2015-01-26 12:06 ` Ian Abbott
  2015-01-26 12:06 ` [PATCH 3/3] staging: comedi: 8253.h: use usual style for single-line comments Ian Abbott
  2015-01-26 17:03 ` [PATCH 0/3] staging: comedi: 8253.h: reformat comments Hartley Sweeten
  3 siblings, 0 replies; 5+ messages in thread
From: Ian Abbott @ 2015-01-26 12:06 UTC (permalink / raw)
  To: driverdev-devel
  Cc: Greg Kroah-Hartman, Ian Abbott, H Hartley Sweeten, linux-kernel

Use the usual block comment style.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
 drivers/staging/comedi/drivers/8253.h | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/comedi/drivers/8253.h b/drivers/staging/comedi/drivers/8253.h
index 55f1704..0d9aec0 100644
--- a/drivers/staging/comedi/drivers/8253.h
+++ b/drivers/staging/comedi/drivers/8253.h
@@ -44,9 +44,11 @@ static inline void i8253_cascade_ns_to_timer(int i8253_osc_base,
 	unsigned int start;
 	unsigned int ns_low, ns_high;
 	static const unsigned int max_count = 0x10000;
-	/* exit early if everything is already correct (this can save time
+	/*
+	 * exit early if everything is already correct (this can save time
 	 * since this function may be called repeatedly during command tests
-	 * and execution) */
+	 * and execution)
+	 */
 	div1 = *d1 ? *d1 : max_count;
 	div2 = *d2 ? *d2 : max_count;
 	divider = div1 * div2;
@@ -120,7 +122,8 @@ static inline void i8253_cascade_ns_to_timer(int i8253_osc_base,
 }
 
 #ifndef CMDTEST
-/* i8254_load programs 8254 counter chip.  It should also work for the 8253.
+/*
+ * i8254_load programs 8254 counter chip.  It should also work for the 8253.
  * base_address is the lowest io address
  * for the chip (the address of counter 0).
  * counter_number is the counter you want to load (0,1 or 2)
@@ -274,7 +277,8 @@ static inline void i8254_mm_write(void __iomem *base_address,
 	writeb(byte, base_address + (counter_number << regshift));
 }
 
-/* Set counter mode, should work for 8253 also.
+/*
+ * Set counter mode, should work for 8253 also.
  * Note: the 'mode' value is different to that for i8254_load() and comes
  * from the INSN_CONFIG_8254_SET_MODE command:
  *   I8254_MODE0, I8254_MODE1, ..., I8254_MODE5
-- 
2.1.4


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

* [PATCH 3/3] staging: comedi: 8253.h: use usual style for single-line comments
  2015-01-26 12:06 [PATCH 0/3] staging: comedi: 8253.h: reformat comments Ian Abbott
  2015-01-26 12:06 ` [PATCH 1/3] staging: comedi: 8253.h: reformat copyright comment Ian Abbott
  2015-01-26 12:06 ` [PATCH 2/3] staging: comedi: 8253.h: reformat other block comments Ian Abbott
@ 2015-01-26 12:06 ` Ian Abbott
  2015-01-26 17:03 ` [PATCH 0/3] staging: comedi: 8253.h: reformat comments Hartley Sweeten
  3 siblings, 0 replies; 5+ messages in thread
From: Ian Abbott @ 2015-01-26 12:06 UTC (permalink / raw)
  To: driverdev-devel
  Cc: Greg Kroah-Hartman, Ian Abbott, H Hartley Sweeten, linux-kernel

Use one space after the opening and one space before the closing of the
comment.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
 drivers/staging/comedi/drivers/8253.h | 48 +++++++++++++++++------------------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/comedi/drivers/8253.h b/drivers/staging/comedi/drivers/8253.h
index 0d9aec0..51b9c8d 100644
--- a/drivers/staging/comedi/drivers/8253.h
+++ b/drivers/staging/comedi/drivers/8253.h
@@ -116,7 +116,7 @@ static inline void i8253_cascade_ns_to_timer(int i8253_osc_base,
 	}
 
 	*nanosec = div1 * div2 * i8253_osc_base;
-	/*  masking is done since counter maps zero to 0x10000 */
+	/* masking is done since counter maps zero to 0x10000 */
 	*d1 = div1 & 0xffff;
 	*d2 = div2 & 0xffff;
 }
@@ -161,12 +161,12 @@ static inline int i8254_load(unsigned long base_address, unsigned int regshift,
 		return -1;
 
 	byte = counter_number << 6;
-	byte |= 0x30;		/*  load low then high byte */
-	byte |= (mode << 1);	/*  set counter mode */
+	byte |= 0x30;		/* load low then high byte */
+	byte |= (mode << 1);	/* set counter mode */
 	outb(byte, base_address + (i8254_control_reg << regshift));
-	byte = count & 0xff;	/*  lsb of counter value */
+	byte = count & 0xff;	/* lsb of counter value */
 	outb(byte, base_address + (counter_number << regshift));
-	byte = (count >> 8) & 0xff;	/*  msb of counter value */
+	byte = (count >> 8) & 0xff;	/* msb of counter value */
 	outb(byte, base_address + (counter_number << regshift));
 
 	return 0;
@@ -190,18 +190,18 @@ static inline int i8254_mm_load(void __iomem *base_address,
 		return -1;
 
 	byte = counter_number << 6;
-	byte |= 0x30;		/*  load low then high byte */
-	byte |= (mode << 1);	/*  set counter mode */
+	byte |= 0x30;		/* load low then high byte */
+	byte |= (mode << 1);	/* set counter mode */
 	writeb(byte, base_address + (i8254_control_reg << regshift));
-	byte = count & 0xff;	/*  lsb of counter value */
+	byte = count & 0xff;	/* lsb of counter value */
 	writeb(byte, base_address + (counter_number << regshift));
-	byte = (count >> 8) & 0xff;	/*  msb of counter value */
+	byte = (count >> 8) & 0xff;	/* msb of counter value */
 	writeb(byte, base_address + (counter_number << regshift));
 
 	return 0;
 }
 
-/* Returns 16 bit counter value, should work for 8253 also.*/
+/* Returns 16 bit counter value, should work for 8253 also. */
 static inline int i8254_read(unsigned long base_address, unsigned int regshift,
 			     unsigned int counter_number)
 {
@@ -211,13 +211,13 @@ static inline int i8254_read(unsigned long base_address, unsigned int regshift,
 	if (counter_number > 2)
 		return -1;
 
-	/*  latch counter */
+	/* latch counter */
 	byte = counter_number << 6;
 	outb(byte, base_address + (i8254_control_reg << regshift));
 
-	/*  read lsb */
+	/* read lsb */
 	ret = inb(base_address + (counter_number << regshift));
-	/*  read msb */
+	/* read msb */
 	ret += inb(base_address + (counter_number << regshift)) << 8;
 
 	return ret;
@@ -233,13 +233,13 @@ static inline int i8254_mm_read(void __iomem *base_address,
 	if (counter_number > 2)
 		return -1;
 
-	/*  latch counter */
+	/* latch counter */
 	byte = counter_number << 6;
 	writeb(byte, base_address + (i8254_control_reg << regshift));
 
-	/*  read lsb */
+	/* read lsb */
 	ret = readb(base_address + (counter_number << regshift));
-	/*  read msb */
+	/* read msb */
 	ret += readb(base_address + (counter_number << regshift)) << 8;
 
 	return ret;
@@ -255,9 +255,9 @@ static inline void i8254_write(unsigned long base_address,
 	if (counter_number > 2)
 		return;
 
-	byte = count & 0xff;	/*  lsb of counter value */
+	byte = count & 0xff;	/* lsb of counter value */
 	outb(byte, base_address + (counter_number << regshift));
-	byte = (count >> 8) & 0xff;	/*  msb of counter value */
+	byte = (count >> 8) & 0xff;	/* msb of counter value */
 	outb(byte, base_address + (counter_number << regshift));
 }
 
@@ -271,9 +271,9 @@ static inline void i8254_mm_write(void __iomem *base_address,
 	if (counter_number > 2)
 		return;
 
-	byte = count & 0xff;	/*  lsb of counter value */
+	byte = count & 0xff;	/* lsb of counter value */
 	writeb(byte, base_address + (counter_number << regshift));
-	byte = (count >> 8) & 0xff;	/*  msb of counter value */
+	byte = (count >> 8) & 0xff;	/* msb of counter value */
 	writeb(byte, base_address + (counter_number << regshift));
 }
 
@@ -297,8 +297,8 @@ static inline int i8254_set_mode(unsigned long base_address,
 		return -1;
 
 	byte = counter_number << 6;
-	byte |= 0x30;		/*  load low then high byte */
-	byte |= mode;		/*  set counter mode and BCD|binary */
+	byte |= 0x30;		/* load low then high byte */
+	byte |= mode;		/* set counter mode and BCD|binary */
 	outb(byte, base_address + (i8254_control_reg << regshift));
 
 	return 0;
@@ -317,8 +317,8 @@ static inline int i8254_mm_set_mode(void __iomem *base_address,
 		return -1;
 
 	byte = counter_number << 6;
-	byte |= 0x30;		/*  load low then high byte */
-	byte |= mode;		/*  set counter mode and BCD|binary */
+	byte |= 0x30;		/* load low then high byte */
+	byte |= mode;		/* set counter mode and BCD|binary */
 	writeb(byte, base_address + (i8254_control_reg << regshift));
 
 	return 0;
-- 
2.1.4


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

* RE: [PATCH 0/3] staging: comedi: 8253.h: reformat comments
  2015-01-26 12:06 [PATCH 0/3] staging: comedi: 8253.h: reformat comments Ian Abbott
                   ` (2 preceding siblings ...)
  2015-01-26 12:06 ` [PATCH 3/3] staging: comedi: 8253.h: use usual style for single-line comments Ian Abbott
@ 2015-01-26 17:03 ` Hartley Sweeten
  3 siblings, 0 replies; 5+ messages in thread
From: Hartley Sweeten @ 2015-01-26 17:03 UTC (permalink / raw)
  To: Ian Abbott, driverdev-devel; +Cc: Greg Kroah-Hartman, linux-kernel

On Monday, January 26, 2015 5:06 AM, Ian Abbott wrote:
> 1) staging: comedi: 8253.h: reformat copyright comment
> 2) staging: comedi: 8253.h: reformat other block comments
> 3) staging: comedi: 8253.h: use usual style for single-line comments
>
>  drivers/staging/comedi/drivers/8253.h | 92 ++++++++++++++++++-----------------
>  1 file changed, 48 insertions(+), 44 deletions(-)

Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>


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

end of thread, other threads:[~2015-01-26 17:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-26 12:06 [PATCH 0/3] staging: comedi: 8253.h: reformat comments Ian Abbott
2015-01-26 12:06 ` [PATCH 1/3] staging: comedi: 8253.h: reformat copyright comment Ian Abbott
2015-01-26 12:06 ` [PATCH 2/3] staging: comedi: 8253.h: reformat other block comments Ian Abbott
2015-01-26 12:06 ` [PATCH 3/3] staging: comedi: 8253.h: use usual style for single-line comments Ian Abbott
2015-01-26 17:03 ` [PATCH 0/3] staging: comedi: 8253.h: reformat comments Hartley Sweeten

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).