From: Tracey Dent <tdent48227@gmail.com>
To: greg@kroah.com, abbotti@mev.co.uk, fmhess@users.sourceforge.net
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
Tracey Dent <tdent48227@gmail.com>
Subject: [PATCH 19/28] Staging: comedi: drivers: adl_pci9111.c: Edit file so that checkpatch.pl has 30 warnings and 3 errors
Date: Tue, 5 Oct 2010 21:00:34 -0400 [thread overview]
Message-ID: <1286326843-6170-19-git-send-email-tdent48227@gmail.com> (raw)
In-Reply-To: <1286326843-6170-1-git-send-email-tdent48227@gmail.com>
Changed a few lines that made checkpatch.pl complain. Could not get ever error but
I got the warnings down to 65 less than the orignal file, The warnings and errors that are left are
WARNING: line over 80 characters, ERROR: Macros with multiple statements should be enclosed in a do - while loop,
WARNING: printk() should include KERN_ facility level.
Signed-off-by: Tracey Dent <tdent48227@gmail.com>
---
drivers/staging/comedi/drivers/adl_pci9111.c | 170 +++++++++++++-------------
1 files changed, 85 insertions(+), 85 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adl_pci9111.c b/drivers/staging/comedi/drivers/adl_pci9111.c
index b2a02b0..7fb6509 100644
--- a/drivers/staging/comedi/drivers/adl_pci9111.c
+++ b/drivers/staging/comedi/drivers/adl_pci9111.c
@@ -1,26 +1,26 @@
/*
- comedi/drivers/adl_pci9111.c
+ comedi/drivers/adl_pci9111.c
- Hardware driver for PCI9111 ADLink cards:
+ Hardware driver for PCI9111 ADLink cards:
- PCI-9111HR
+ PCI-9111HR
- Copyright (C) 2002-2005 Emmanuel Pacaud <emmanuel.pacaud@univ-poitiers.fr>
+ Copyright (C) 2002-2005 Emmanuel Pacaud <emmanuel.pacaud@univ-poitiers.fr>
- 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 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.
+ 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.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
@@ -32,46 +32,46 @@ Status: experimental
Supports:
- - ai_insn read
- - ao_insn read/write
- - di_insn read
- - do_insn read/write
- - ai_do_cmd mode with the following sources:
+ - ai_insn read
+ - ao_insn read/write
+ - di_insn read
+ - do_insn read/write
+ - ai_do_cmd mode with the following sources:
- - start_src TRIG_NOW
- - scan_begin_src TRIG_FOLLOW TRIG_TIMER TRIG_EXT
- - convert_src TRIG_TIMER TRIG_EXT
- - scan_end_src TRIG_COUNT
- - stop_src TRIG_COUNT TRIG_NONE
+ - start_src TRIG_NOW
+ - scan_begin_src TRIG_FOLLOW TRIG_TIMER TRIG_EXT
+ - convert_src TRIG_TIMER TRIG_EXT
+ - scan_end_src TRIG_COUNT
+ - stop_src TRIG_COUNT TRIG_NONE
- The scanned channels must be consecutive and start from 0. They must
- all have the same range and aref.
+ The scanned channels must be consecutive and start from 0. They must
+ all have the same range and aref.
Configuration options:
- [0] - PCI bus number (optional)
- [1] - PCI slot number (optional)
+ [0] - PCI bus number (optional)
+ [1] - PCI slot number (optional)
- If bus/slot is not specified, the first available PCI
- device will be used.
+ If bus/slot is not specified, the first available PCI
+ device will be used.
*/
/*
CHANGELOG:
- 2005/02/17 Extend AI streaming capabilities. Now, scan_begin_arg can be
- a multiple of chanlist_len*convert_arg.
- 2002/02/19 Fixed the two's complement conversion in pci9111_(hr_)ai_get_data.
- 2002/02/18 Added external trigger support for analog input.
+ 2005/02/17 Extend AI streaming capabilities. Now, scan_begin_arg can be
+ a multiple of chanlist_len*convert_arg.
+ 2002/02/19 Fixed the two's complement conversion in pci9111_(hr_)ai_get_data.
+ 2002/02/18 Added external trigger support for analog input.
TODO:
- - Really test implemented functionality.
- - Add support for the PCI-9111DG with a probe routine to identify the card
- type (perhaps with the help of the channel number readback of the A/D Data
- register).
- - Add external multiplexer support.
+ - Really test implemented functionality.
+ - Add support for the PCI-9111DG with a probe routine to identify the
+ card type (perhaps with the help of the channel number readback of
+ the A/D Data register).
+ - Add external multiplexer support.
*/
@@ -187,95 +187,95 @@ TODO:
*/
#define pci9111_trigger_and_autoscan_get() \
- (inb(PCI9111_IO_BASE+PCI9111_REGISTER_AD_MODE_INTERRUPT_READBACK)&0x0F)
+ (inb(PCI9111_IO_BASE+PCI9111_REGISTER_AD_MODE_INTERRUPT_READBACK)&0x0F)
#define pci9111_trigger_and_autoscan_set(flags) \
- outb(flags, PCI9111_IO_BASE+PCI9111_REGISTER_TRIGGER_MODE_CONTROL)
+ outb(flags, PCI9111_IO_BASE+PCI9111_REGISTER_TRIGGER_MODE_CONTROL)
#define pci9111_interrupt_and_fifo_get() \
- ((inb(PCI9111_IO_BASE+PCI9111_REGISTER_AD_MODE_INTERRUPT_READBACK) >> 4) \
- &0x03)
+ ((inb(PCI9111_IO_BASE+PCI9111_REGISTER_AD_MODE_INTERRUPT_READBACK) >> 4) \
+ &0x03)
#define pci9111_interrupt_and_fifo_set(flags) \
- outb(flags, PCI9111_IO_BASE+PCI9111_REGISTER_INTERRUPT_CONTROL)
+ outb(flags, PCI9111_IO_BASE+PCI9111_REGISTER_INTERRUPT_CONTROL)
#define pci9111_interrupt_clear() \
- outb(0, PCI9111_IO_BASE+PCI9111_REGISTER_INTERRUPT_CLEAR)
+ outb(0, PCI9111_IO_BASE+PCI9111_REGISTER_INTERRUPT_CLEAR)
#define pci9111_software_trigger() \
- outb(0, PCI9111_IO_BASE+PCI9111_REGISTER_SOFTWARE_TRIGGER)
+ outb(0, PCI9111_IO_BASE+PCI9111_REGISTER_SOFTWARE_TRIGGER)
#define pci9111_fifo_reset() do { \
- outb(PCI9111_FFEN_SET_FIFO_ENABLE, \
- PCI9111_IO_BASE+PCI9111_REGISTER_INTERRUPT_CONTROL); \
- outb(PCI9111_FFEN_SET_FIFO_DISABLE, \
- PCI9111_IO_BASE+PCI9111_REGISTER_INTERRUPT_CONTROL); \
- outb(PCI9111_FFEN_SET_FIFO_ENABLE, \
- PCI9111_IO_BASE+PCI9111_REGISTER_INTERRUPT_CONTROL); \
+ outb(PCI9111_FFEN_SET_FIFO_ENABLE, \
+ PCI9111_IO_BASE+PCI9111_REGISTER_INTERRUPT_CONTROL); \
+ outb(PCI9111_FFEN_SET_FIFO_DISABLE, \
+ PCI9111_IO_BASE+PCI9111_REGISTER_INTERRUPT_CONTROL); \
+ outb(PCI9111_FFEN_SET_FIFO_ENABLE, \
+ PCI9111_IO_BASE+PCI9111_REGISTER_INTERRUPT_CONTROL); \
} while (0)
#define pci9111_is_fifo_full() \
- ((inb(PCI9111_IO_BASE+PCI9111_REGISTER_RANGE_STATUS_READBACK)& \
- PCI9111_FIFO_FULL_MASK) == 0)
+ ((inb(PCI9111_IO_BASE+PCI9111_REGISTER_RANGE_STATUS_READBACK)& \
+ PCI9111_FIFO_FULL_MASK) == 0)
#define pci9111_is_fifo_half_full() \
- ((inb(PCI9111_IO_BASE+PCI9111_REGISTER_RANGE_STATUS_READBACK)& \
- PCI9111_FIFO_HALF_FULL_MASK) == 0)
+ ((inb(PCI9111_IO_BASE+PCI9111_REGISTER_RANGE_STATUS_READBACK)& \
+ PCI9111_FIFO_HALF_FULL_MASK) == 0)
#define pci9111_is_fifo_empty() \
- ((inb(PCI9111_IO_BASE+PCI9111_REGISTER_RANGE_STATUS_READBACK)& \
- PCI9111_FIFO_EMPTY_MASK) == 0)
+ ((inb(PCI9111_IO_BASE+PCI9111_REGISTER_RANGE_STATUS_READBACK)& \
+ PCI9111_FIFO_EMPTY_MASK) == 0)
#define pci9111_ai_channel_set(channel) \
- outb((channel)&PCI9111_CHANNEL_MASK, \
- PCI9111_IO_BASE+PCI9111_REGISTER_AD_CHANNEL_CONTROL)
+ outb((channel)&PCI9111_CHANNEL_MASK, \
+ PCI9111_IO_BASE+PCI9111_REGISTER_AD_CHANNEL_CONTROL)
#define pci9111_ai_channel_get() \
- (inb(PCI9111_IO_BASE+PCI9111_REGISTER_AD_CHANNEL_READBACK) \
- &PCI9111_CHANNEL_MASK)
+ (inb(PCI9111_IO_BASE+PCI9111_REGISTER_AD_CHANNEL_READBACK) \
+ &PCI9111_CHANNEL_MASK)
#define pci9111_ai_range_set(range) \
- outb((range)&PCI9111_RANGE_MASK, \
- PCI9111_IO_BASE+PCI9111_REGISTER_INPUT_SIGNAL_RANGE)
+ outb((range)&PCI9111_RANGE_MASK, \
+ PCI9111_IO_BASE+PCI9111_REGISTER_INPUT_SIGNAL_RANGE)
#define pci9111_ai_range_get() \
- (inb(PCI9111_IO_BASE+PCI9111_REGISTER_RANGE_STATUS_READBACK) \
- &PCI9111_RANGE_MASK)
+ (inb(PCI9111_IO_BASE+PCI9111_REGISTER_RANGE_STATUS_READBACK) \
+ &PCI9111_RANGE_MASK)
#define pci9111_ai_get_data() \
- (((inw(PCI9111_IO_BASE+PCI9111_REGISTER_AD_FIFO_VALUE)>>4) \
- &PCI9111_AI_RESOLUTION_MASK) \
- ^ PCI9111_AI_RESOLUTION_2_CMP_BIT)
+ (((inw(PCI9111_IO_BASE+PCI9111_REGISTER_AD_FIFO_VALUE)>>4) \
+ &PCI9111_AI_RESOLUTION_MASK) \
+ ^ PCI9111_AI_RESOLUTION_2_CMP_BIT)
#define pci9111_hr_ai_get_data() \
- ((inw(PCI9111_IO_BASE+PCI9111_REGISTER_AD_FIFO_VALUE) \
- & PCI9111_HR_AI_RESOLUTION_MASK) \
- ^ PCI9111_HR_AI_RESOLUTION_2_CMP_BIT)
+ ((inw(PCI9111_IO_BASE+PCI9111_REGISTER_AD_FIFO_VALUE) \
+ & PCI9111_HR_AI_RESOLUTION_MASK) \
+ ^ PCI9111_HR_AI_RESOLUTION_2_CMP_BIT)
#define pci9111_ao_set_data(data) \
- outw(data&PCI9111_AO_RESOLUTION_MASK, \
- PCI9111_IO_BASE+PCI9111_REGISTER_DA_OUTPUT)
+ outw(data&PCI9111_AO_RESOLUTION_MASK, \
+ PCI9111_IO_BASE+PCI9111_REGISTER_DA_OUTPUT)
#define pci9111_di_get_bits() \
- inw(PCI9111_IO_BASE+PCI9111_REGISTER_DIGITAL_IO)
+ inw(PCI9111_IO_BASE+PCI9111_REGISTER_DIGITAL_IO)
#define pci9111_do_set_bits(bits) \
- outw(bits, PCI9111_IO_BASE+PCI9111_REGISTER_DIGITAL_IO)
+ outw(bits, PCI9111_IO_BASE+PCI9111_REGISTER_DIGITAL_IO)
#define pci9111_8254_control_set(flags) \
- outb(flags, PCI9111_IO_BASE+PCI9111_REGISTER_8254_CONTROL)
+ outb(flags, PCI9111_IO_BASE+PCI9111_REGISTER_8254_CONTROL)
#define pci9111_8254_counter_0_set(data) \
- outb(data & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_0); \
- outb((data >> 8) & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_0)
+ outb(data & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_0); \
+ outb((data >> 8) & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_0)
#define pci9111_8254_counter_1_set(data) \
- outb(data & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_1); \
- outb((data >> 8) & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_1)
+ outb(data & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_1); \
+ outb((data >> 8) & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_1)
#define pci9111_8254_counter_2_set(data) \
- outb(data & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_2); \
- outb((data >> 8) & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_2)
+ outb(data & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_2); \
+ outb((data >> 8) & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_2)
/* Function prototypes */
@@ -342,7 +342,7 @@ static const struct pci9111_board pci9111_boards[] = {
};
#define pci9111_board_nbr \
- (sizeof(pci9111_boards)/sizeof(struct pci9111_board))
+ (sizeof(pci9111_boards)/sizeof(struct pci9111_board))
static struct comedi_driver pci9111_driver = {
.driver_name = PCI9111_DRIVER_NAME,
--
1.7.3.1.50.g1e633
next prev parent reply other threads:[~2010-10-06 1:01 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-06 1:00 [PATCH 01/28] Staging: comedi: comedi.h: Edit file so cleanpatch.pl has 0 errors and warnings Tracey Dent
2010-10-06 1:00 ` [PATCH 02/28] Staging: comedi: comedi_compat32.c: Edit file so that checkpatch.pl " Tracey Dent
2010-10-06 1:00 ` [PATCH 03/28] Staging: comedi: comedi_compat32.h: " Tracey Dent
2010-10-06 1:00 ` [PATCH 04/28] Staging: comedi: comedidev.h: " Tracey Dent
2010-10-06 1:00 ` [PATCH 05/28] Staging: comedi: comedi_fops.c: Edit file so that checkpatch.pl has 1 warnings and 0 errors Tracey Dent
2010-10-06 1:00 ` [PATCH 06/28] Staging: comedi: comedilib.h: Edit file so that checkpatch.pl has 0 errors and warnings Tracey Dent
2010-10-06 1:00 ` [PATCH 07/28] Staging: comedi: drivers.c: Edit file so that checkpatch.pl has 4 warnings and 0 errors Tracey Dent
2010-10-06 4:48 ` Dan Carpenter
2010-10-06 17:54 ` David Daney
2010-10-06 1:00 ` [PATCH 08/28] Staging: comedi: proc.c: Edit file so that checkpatch.pl has 0 errors and warnings Tracey Dent
2010-10-06 1:00 ` [PATCH 09/28] Staging: comedi: range.c: " Tracey Dent
2010-10-06 1:00 ` [PATCH 10/28] Staging: comedi: kcomedilib: kcomedilib_main.c: " Tracey Dent
2010-10-06 4:44 ` Dan Carpenter
2010-10-06 1:00 ` [PATCH 11/28] Staging: comedi: drivers: 8253.h: " Tracey Dent
2010-10-06 1:00 ` [PATCH 12/28] Staging: comedi: drivers: 8255.c: " Tracey Dent
2010-10-06 1:00 ` [PATCH 13/28] Staging: comedi: drivers: 8255.h: " Tracey Dent
2010-10-06 1:00 ` [PATCH 14/28] Staging: comedi: drivers: adl_pci2608.c: " Tracey Dent
2010-10-06 1:00 ` [PATCH 15/28] Staging: comedi: drivers: adl_pci7230.c: " Tracey Dent
2010-10-06 1:00 ` [PATCH 16/28] Staging: comedi: drivers: adl_pci7296.c: " Tracey Dent
2010-10-06 1:00 ` [PATCH 17/28] Staging: comedi: drivers: adl_pci7432.c: " Tracey Dent
2010-10-06 1:00 ` [PATCH 18/28] Staging: comedi: drivers: adl_pci8164.c: " Tracey Dent
2010-10-06 1:00 ` Tracey Dent [this message]
2010-10-06 4:34 ` [PATCH 19/28] Staging: comedi: drivers: adl_pci9111.c: Edit file so that checkpatch.pl has 30 warnings and 3 errors Dan Carpenter
2010-10-06 1:00 ` [PATCH 20/28] Staging: comedi: drivers: adl_pci9118.c: Edit file so that checkpatch.pl has 0 errors and warnings Tracey Dent
2010-10-06 1:00 ` [PATCH 21/28] Staging: comedi: drivers: adq12b.c: Edit file so that checkpatch.pl has 0 errors and 2 warnings Tracey Dent
2010-10-06 1:00 ` [PATCH 22/28] Staging: comedi: drivers: adv_pci1710.c: Edit file so that checkpatch.pl complains a little less Tracey Dent
2010-10-06 1:00 ` [PATCH 23/28] Staging: comedi: drivers: adv_pci1723.c: Edit file so that checkpatch.pl has 0 warnings and 0 errors Tracey Dent
2010-10-06 1:00 ` [PATCH 24/28] Staging: comedi: drivers: adv_pci_dio.c: Edit file so that checkpatch.pl has 3 warnings and 1 errors Tracey Dent
2010-10-06 1:00 ` [PATCH 25/28] Staging: comedi: drivers: aio_aio12_8.c: Edit file so that checkpatch.pl has 0 errors and warnings Tracey Dent
2010-10-06 1:00 ` [PATCH 26/28] Staging: comedi: drivers: aio_iiro_16.c: " Tracey Dent
2010-10-06 1:00 ` [PATCH 27/28] Staging: comedi: drivers: am9513.h: " Tracey Dent
2010-10-06 1:00 ` [PATCH 28/28] Staging: comedi: drivers: amcc_s5933.h: Edit file so that checkpatch.pl has 2 warnings and 0 errors Tracey Dent
2010-10-06 1:50 ` [PATCH 01/28] Staging: comedi: comedi.h: Edit file so cleanpatch.pl has 0 errors and warnings Greg KH
2010-10-06 2:01 ` T Dent
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=1286326843-6170-19-git-send-email-tdent48227@gmail.com \
--to=tdent48227@gmail.com \
--cc=abbotti@mev.co.uk \
--cc=fmhess@users.sourceforge.net \
--cc=greg@kroah.com \
--cc=kernel-janitors@vger.kernel.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
all inboxes | Powered by JetHome®