* [PATCH] staging: comedi: coding style fixes
@ 2015-06-21 20:25 Luis de Bethencourt
2015-06-22 11:39 ` Sudip Mukherjee
0 siblings, 1 reply; 2+ messages in thread
From: Luis de Bethencourt @ 2015-06-21 20:25 UTC (permalink / raw)
To: linux-kernel
Cc: Ian Abbott, H Hartley Sweeten, Greg Kroah-Hartman, Jaime Arrocha
Warnings found by checkpatch.pl
WARNING: please, no space before tabs
/drivers/staging/comedi/drivers/das16m1.c:83
+ 404-407 ^I8254$
WARNING: line over 80 characters
/drivers/staging/comedi/drivers/das16m1.c:414
+ if (devpriv->adc_count == 0 && hw_counter == devpriv->initial_hw_count) {
/drivers/staging/comedi/drivers/das16m1.c:417
/drivers/staging/comedi/drivers/das16m1.c:418
/drivers/staging/comedi/drivers/das16m1.c:419
/drivers/staging/comedi/drivers/das16m1.c:420
/drivers/staging/comedi/drivers/das16m1.c:421
Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
---
drivers/staging/comedi/drivers/das16m1.c | 41 +++++++++++++++++---------------
1 file changed, 22 insertions(+), 19 deletions(-)
diff --git a/drivers/staging/comedi/drivers/das16m1.c b/drivers/staging/comedi/drivers/das16m1.c
index a18a887..3a37373 100644
--- a/drivers/staging/comedi/drivers/das16m1.c
+++ b/drivers/staging/comedi/drivers/das16m1.c
@@ -69,18 +69,18 @@ irq can be omitted, although the cmd interface will not work without it.
"cio-das16/m1"
- 0 a/d bits 0-3, mux start 12 bit
- 1 a/d bits 4-11 unused
- 2 status control
- 3 di 4 bit do 4 bit
- 4 unused clear interrupt
- 5 interrupt, pacer
- 6 channel/gain queue address
- 7 channel/gain queue data
- 89ab 8254
- cdef 8254
- 400 8255
- 404-407 8254
+ 0 a/d bits 0-3, mux start 12 bit
+ 1 a/d bits 4-11 unused
+ 2 status control
+ 3 di 4 bit do 4 bit
+ 4 unused clear interrupt
+ 5 interrupt, pacer
+ 6 channel/gain queue address
+ 7 channel/gain queue data
+ 89ab 8254
+ cdef 8254
+ 400 8255
+ 404-407 8254
*/
@@ -411,15 +411,18 @@ static void das16m1_handler(struct comedi_device *dev, unsigned int status)
hw_counter = comedi_8254_read(devpriv->counter, 1);
/* make sure hardware counter reading is not bogus due to initial value
* not having been loaded yet */
- if (devpriv->adc_count == 0 && hw_counter == devpriv->initial_hw_count) {
+ if (devpriv->adc_count == 0 &&
+ hw_counter == devpriv->initial_hw_count) {
num_samples = 0;
} else {
- /* The calculation of num_samples looks odd, but it uses the following facts.
- * 16 bit hardware counter is initialized with value of zero (which really
- * means 0x1000). The counter decrements by one on each conversion
- * (when the counter decrements from zero it goes to 0xffff). num_samples
- * is a 16 bit variable, so it will roll over in a similar fashion to the
- * hardware counter. Work it out, and this is what you get. */
+ /* The calculation of num_samples looks odd, but it uses the
+ * following facts. 16 bit hardware counter is initialized with
+ * value of zero (which really means 0x1000). The counter
+ * decrements by one on each conversion (when the counter
+ * decrements from zero it goes to 0xffff). num_samples is a
+ * 16 bit variable, so it will roll over in a similar fashion
+ * to the hardware counter. Work it out, and this is what you
+ * get. */
num_samples = -hw_counter - devpriv->adc_count;
}
/* check if we only need some of the points */
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: comedi: coding style fixes
2015-06-21 20:25 [PATCH] staging: comedi: coding style fixes Luis de Bethencourt
@ 2015-06-22 11:39 ` Sudip Mukherjee
0 siblings, 0 replies; 2+ messages in thread
From: Sudip Mukherjee @ 2015-06-22 11:39 UTC (permalink / raw)
To: Luis de Bethencourt
Cc: linux-kernel, Ian Abbott, H Hartley Sweeten, Greg Kroah-Hartman,
Jaime Arrocha
On Sun, Jun 21, 2015 at 09:25:30PM +0100, Luis de Bethencourt wrote:
> Warnings found by checkpatch.pl
>
> WARNING: please, no space before tabs
> /drivers/staging/comedi/drivers/das16m1.c:83
> + 404-407 ^I8254$
>
> WARNING: line over 80 characters
> /drivers/staging/comedi/drivers/das16m1.c:414
> + if (devpriv->adc_count == 0 && hw_counter == devpriv->initial_hw_count) {
That is two different type of changes. Please break them into separate
patches.
regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-22 11:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-21 20:25 [PATCH] staging: comedi: coding style fixes Luis de Bethencourt
2015-06-22 11:39 ` Sudip Mukherjee
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).