* Staging: comedi: fix code clean up issues.
@ 2012-04-26 10:02 Ravishankar Karkala Mallikarjunayya
2012-04-26 10:02 ` [PATCH 1/4] Staging: comedi: fix line over 80 character issue in cb_pcidda.c Ravishankar Karkala Mallikarjunayya
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Ravishankar Karkala Mallikarjunayya @ 2012-04-26 10:02 UTC (permalink / raw)
To: gregkh, wfp5p; +Cc: devel, linux-kernel
This patch series fixes some coding style issues found by
checkpatch.pl script.
Ravishankar Karkala Mallikarjunayya (4):
Staging: comedi: fix line over 80 character issue in cb_pcidda.c
Staging: comedi: fix line over 80 character issue in daqboard2000.c
Staging: comedi: fix line over 80 character issue in cb_pcimdas.c.
Staging: comedi: fix line over 80 character issue in ni_at_a2150.c
drivers/staging/comedi/drivers/cb_pcidda.c | 72 +++++++++++++++++--------
drivers/staging/comedi/drivers/cb_pcimdas.c | 17 ++++--
drivers/staging/comedi/drivers/daqboard2000.c | 9 ++-
drivers/staging/comedi/drivers/ni_at_a2150.c | 16 ++++--
4 files changed, 80 insertions(+), 34 deletions(-)
---
In-Reply-To:
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] Staging: comedi: fix line over 80 character issue in cb_pcidda.c
2012-04-26 10:02 Staging: comedi: fix code clean up issues Ravishankar Karkala Mallikarjunayya
@ 2012-04-26 10:02 ` Ravishankar Karkala Mallikarjunayya
2012-04-26 10:02 ` [PATCH 2/4] Staging: comedi: fix line over 80 character issue in daqboard2000.c Ravishankar Karkala Mallikarjunayya
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Ravishankar Karkala Mallikarjunayya @ 2012-04-26 10:02 UTC (permalink / raw)
To: gregkh, wfp5p; +Cc: devel, linux-kernel, Ravishankar Karkala Mallikarjunayya
This is a patch to the cb_pcidda.c file that fixes up a line over 80
character warning found by the checkpatch.pl tool
Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
---
drivers/staging/comedi/drivers/cb_pcidda.c | 72 +++++++++++++++++++--------
1 files changed, 50 insertions(+), 22 deletions(-)
diff --git a/drivers/staging/comedi/drivers/cb_pcidda.c b/drivers/staging/comedi/drivers/cb_pcidda.c
index abba220..b0561c7 100644
--- a/drivers/staging/comedi/drivers/cb_pcidda.c
+++ b/drivers/staging/comedi/drivers/cb_pcidda.c
@@ -51,9 +51,12 @@ Please report success/failure with other different cards to
#include "comedi_pci.h"
#include "8255.h"
-#define PCI_VENDOR_ID_CB 0x1307 /* PCI vendor number of ComputerBoards */
+
+/* PCI vendor number of ComputerBoards */
+#define PCI_VENDOR_ID_CB 0x1307
#define EEPROM_SIZE 128 /* number of entries in eeprom */
-#define MAX_AO_CHANNELS 8 /* maximum number of ao channels for supported boards */
+/* maximum number of ao channels for supported boards */
+#define MAX_AO_CHANNELS 8
/* PCI-DDA base addresses */
#define DIGITALIO_BADRINDEX 2
@@ -94,20 +97,26 @@ Please report success/failure with other different cards to
#define DACALIBRATION1 4 /* D/A CALIBRATION REGISTER 1 */
/* write bits */
-#define SERIAL_IN_BIT 0x1 /* serial data input for eeprom, caldacs, reference dac */
+/* serial data input for eeprom, caldacs, reference dac */
+#define SERIAL_IN_BIT 0x1
#define CAL_CHANNEL_MASK (0x7 << 1)
#define CAL_CHANNEL_BITS(channel) (((channel) << 1) & CAL_CHANNEL_MASK)
/* read bits */
#define CAL_COUNTER_MASK 0x1f
-#define CAL_COUNTER_OVERFLOW_BIT 0x20 /* calibration counter overflow status bit */
-#define AO_BELOW_REF_BIT 0x40 /* analog output is less than reference dac voltage */
+/* calibration counter overflow status bit */
+#define CAL_COUNTER_OVERFLOW_BIT 0x20
+/* analog output is less than reference dac voltage */
+#define AO_BELOW_REF_BIT 0x40
#define SERIAL_OUT_BIT 0x80 /* serial data out, for reading from eeprom */
#define DACALIBRATION2 6 /* D/A CALIBRATION REGISTER 2 */
#define SELECT_EEPROM_BIT 0x1 /* send serial data in to eeprom */
-#define DESELECT_REF_DAC_BIT 0x2 /* don't send serial data to MAX542 reference dac */
-#define DESELECT_CALDAC_BIT(n) (0x4 << (n)) /* don't send serial data to caldac n */
-#define DUMMY_BIT 0x40 /* manual says to set this bit with no explanation */
+/* don't send serial data to MAX542 reference dac */
+#define DESELECT_REF_DAC_BIT 0x2
+/* don't send serial data to caldac n */
+#define DESELECT_CALDAC_BIT(n) (0x4 << (n))
+/* manual says to set this bit with no explanation */
+#define DUMMY_BIT 0x40
#define DADATA 8 /* FIRST D/A DATA REGISTER (0) */
@@ -212,9 +221,12 @@ MODULE_DEVICE_TABLE(pci, cb_pcidda_pci_table);
*/
#define thisboard ((const struct cb_pcidda_board *)dev->board_ptr)
-/* this structure is for data unique to this hardware driver. If
- several hardware drivers keep similar information in this structure,
- feel free to suggest moving the variable to the struct comedi_device struct. */
+/*
+ * this structure is for data unique to this hardware driver. If
+ * several hardware drivers keep similar information in this structure,
+ * feel free to suggest moving the variable to the struct comedi_device
+ * struct.
+ */
struct cb_pcidda_private {
int data;
@@ -227,8 +239,10 @@ struct cb_pcidda_private {
/* unsigned long control_status; */
/* unsigned long adc_fifo; */
- unsigned int dac_cal1_bits; /* bits last written to da calibration register 1 */
- unsigned int ao_range[MAX_AO_CHANNELS]; /* current range settings for output channels */
+ /* bits last written to da calibration register 1 */
+ unsigned int dac_cal1_bits;
+ /* current range settings for output channels */
+ unsigned int ao_range[MAX_AO_CHANNELS];
u16 eeprom_data[EEPROM_SIZE]; /* software copy of board's eeprom */
};
@@ -377,7 +391,8 @@ found:
dev_dbg(dev->hw_dev, "eeprom:\n");
for (index = 0; index < EEPROM_SIZE; index++) {
devpriv->eeprom_data[index] = cb_pcidda_read_eeprom(dev, index);
- dev_dbg(dev->hw_dev, "%i:0x%x\n", index, devpriv->eeprom_data[index]);
+ dev_dbg(dev->hw_dev, "%i:0x%x\n", index,
+ devpriv->eeprom_data[index]);
}
/* set calibrations dacs */
@@ -484,7 +499,10 @@ static int cb_pcidda_ai_cmdtest(struct comedi_device *dev,
if (err)
return 1;
- /* step 2: make sure trigger sources are unique and mutually compatible */
+ /*
+ * step 2: make sure trigger sources are unique and mutually
+ * compatible
+ */
/* note that mutual compatibility is not an issue here */
if (cmd->scan_begin_src != TRIG_TIMER
@@ -696,8 +714,10 @@ static unsigned int cb_pcidda_read_eeprom(struct comedi_device *dev,
unsigned int i;
unsigned int cal2_bits;
unsigned int value;
- const int max_num_caldacs = 4; /* one caldac for every two dac channels */
- const int read_instruction = 0x6; /* bits to send to tell eeprom we want to read */
+ /* one caldac for every two dac channels */
+ const int max_num_caldacs = 4;
+ /* bits to send to tell eeprom we want to read */
+ const int read_instruction = 0x6;
const int instruction_length = 3;
const int address_length = 8;
@@ -729,9 +749,11 @@ static void cb_pcidda_write_caldac(struct comedi_device *dev,
{
unsigned int cal2_bits;
unsigned int i;
- const int num_channel_bits = 3; /* caldacs use 3 bit channel specification */
+ /* caldacs use 3 bit channel specification */
+ const int num_channel_bits = 3;
const int num_caldac_bits = 8; /* 8 bit calibration dacs */
- const int max_num_caldacs = 4; /* one caldac for every two dac channels */
+ /* one caldac for every two dac channels */
+ const int max_num_caldacs = 4;
/* write 3 bit channel */
cb_pcidda_serial_out(dev, channel, num_channel_bits);
@@ -790,14 +812,20 @@ static unsigned int offset_eeprom_address(unsigned int ao_channel,
return 0x7 + 2 * range + 12 * ao_channel;
}
-/* returns eeprom address that provides gain calibration for given ao channel and range */
+/*
+ * returns eeprom address that provides gain calibration for given ao
+ * channel and range
+ */
static unsigned int gain_eeprom_address(unsigned int ao_channel,
unsigned int range)
{
return 0x8 + 2 * range + 12 * ao_channel;
}
-/* returns upper byte of eeprom entry, which gives the coarse adjustment values */
+/*
+ * returns upper byte of eeprom entry, which gives the coarse adjustment
+ * values
+ */
static unsigned int eeprom_coarse_byte(unsigned int word)
{
return (word >> 8) & 0xff;
@@ -815,7 +843,7 @@ static void cb_pcidda_calibrate(struct comedi_device *dev, unsigned int channel,
{
unsigned int coarse_offset, fine_offset, coarse_gain, fine_gain;
- /* remember range so we can tell when we need to readjust calibration */
+ /* remember range so we can tell when we need to readjust calibration */
devpriv->ao_range[channel] = range;
/* get values from eeprom data */
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] Staging: comedi: fix line over 80 character issue in daqboard2000.c
2012-04-26 10:02 Staging: comedi: fix code clean up issues Ravishankar Karkala Mallikarjunayya
2012-04-26 10:02 ` [PATCH 1/4] Staging: comedi: fix line over 80 character issue in cb_pcidda.c Ravishankar Karkala Mallikarjunayya
@ 2012-04-26 10:02 ` Ravishankar Karkala Mallikarjunayya
2012-04-26 10:02 ` [PATCH 3/4] Staging: comedi: fix line over 80 character issue in cb_pcimdas.c Ravishankar Karkala Mallikarjunayya
2012-04-26 10:02 ` [PATCH 4/4] Staging: comedi: fix line over 80 character issue in ni_at_a2150.c Ravishankar Karkala Mallikarjunayya
3 siblings, 0 replies; 5+ messages in thread
From: Ravishankar Karkala Mallikarjunayya @ 2012-04-26 10:02 UTC (permalink / raw)
To: gregkh, wfp5p; +Cc: devel, linux-kernel, Ravishankar Karkala Mallikarjunayya
This is a patch to the daqboard2000.c file that fixes up a
line over 80 character warning found by the checkpatch.pl tool.
Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
---
drivers/staging/comedi/drivers/daqboard2000.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c
index 9958bd5..0061f12 100644
--- a/drivers/staging/comedi/drivers/daqboard2000.c
+++ b/drivers/staging/comedi/drivers/daqboard2000.c
@@ -412,9 +412,12 @@ static int daqboard2000_ai_insn_read(struct comedi_device *dev,
DAQBOARD2000_AcqResetScanListFifo |
DAQBOARD2000_AcqResetResultsFifo | DAQBOARD2000_AcqResetConfigPipe;
- /* If pacer clock is not set to some high value (> 10 us), we
- risk multiple samples to be put into the result FIFO. */
- fpga->acqPacerClockDivLow = 1000000; /* 1 second, should be long enough */
+ /*
+ * If pacer clock is not set to some high value (> 10 us), we
+ * risk multiple samples to be put into the result FIFO.
+ */
+ /* 1 second, should be long enough */
+ fpga->acqPacerClockDivLow = 1000000;
fpga->acqPacerClockDivHigh = 0;
gain = CR_RANGE(insn->chanspec);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] Staging: comedi: fix line over 80 character issue in cb_pcimdas.c.
2012-04-26 10:02 Staging: comedi: fix code clean up issues Ravishankar Karkala Mallikarjunayya
2012-04-26 10:02 ` [PATCH 1/4] Staging: comedi: fix line over 80 character issue in cb_pcidda.c Ravishankar Karkala Mallikarjunayya
2012-04-26 10:02 ` [PATCH 2/4] Staging: comedi: fix line over 80 character issue in daqboard2000.c Ravishankar Karkala Mallikarjunayya
@ 2012-04-26 10:02 ` Ravishankar Karkala Mallikarjunayya
2012-04-26 10:02 ` [PATCH 4/4] Staging: comedi: fix line over 80 character issue in ni_at_a2150.c Ravishankar Karkala Mallikarjunayya
3 siblings, 0 replies; 5+ messages in thread
From: Ravishankar Karkala Mallikarjunayya @ 2012-04-26 10:02 UTC (permalink / raw)
To: gregkh, wfp5p; +Cc: devel, linux-kernel, Ravishankar Karkala Mallikarjunayya
This is a patch to the cb_pcimdas.c file that fixes up a line
over 80 character warning found by the checkpatch.pl tool.
Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
---
drivers/staging/comedi/drivers/cb_pcimdas.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/drivers/cb_pcimdas.c b/drivers/staging/comedi/drivers/cb_pcimdas.c
index 8ba6942..dd34b1a 100644
--- a/drivers/staging/comedi/drivers/cb_pcimdas.c
+++ b/drivers/staging/comedi/drivers/cb_pcimdas.c
@@ -139,9 +139,12 @@ MODULE_DEVICE_TABLE(pci, cb_pcimdas_pci_table);
*/
#define thisboard ((const struct cb_pcimdas_board *)dev->board_ptr)
-/* this structure is for data unique to this hardware driver. If
- several hardware drivers keep similar information in this structure,
- feel free to suggest moving the variable to the struct comedi_device struct. */
+/*
+ * this structure is for data unique to this hardware driver. If
+ * several hardware drivers keep similar information in this structure,
+ * feel free to suggest moving the variable to the struct comedi_device
+ * struct.
+ */
struct cb_pcimdas_private {
int data;
@@ -317,7 +320,8 @@ found:
s->subdev_flags = SDF_WRITABLE;
s->n_chan = thisboard->ao_nchan;
s->maxdata = 1 << thisboard->ao_bits;
- s->range_table = &range_unknown; /* ranges are hardware settable, but not software readable. */
+ /* ranges are hardware settable, but not software readable. */
+ s->range_table = &range_unknown;
s->insn_write = &cb_pcimdas_ao_winsn;
s->insn_read = &cb_pcimdas_ao_rinsn;
@@ -402,7 +406,10 @@ static int cb_pcimdas_ai_rinsn(struct comedi_device *dev,
outb(0x01, devpriv->BADR3 + 6); /* set bursting off, conversions on */
outb(0x00, devpriv->BADR3 + 7); /* set range to 10V. UP/BP is controlled by a switch on the board */
- /* write channel limits to multiplexer, set Low (bits 0-3) and High (bits 4-7) channels to chan. */
+ /*
+ * write channel limits to multiplexer, set Low (bits 0-3) and
+ * High (bits 4-7) channels to chan.
+ */
chanlims = chan | (chan << 4);
outb(chanlims, devpriv->BADR3 + 0);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] Staging: comedi: fix line over 80 character issue in ni_at_a2150.c
2012-04-26 10:02 Staging: comedi: fix code clean up issues Ravishankar Karkala Mallikarjunayya
` (2 preceding siblings ...)
2012-04-26 10:02 ` [PATCH 3/4] Staging: comedi: fix line over 80 character issue in cb_pcimdas.c Ravishankar Karkala Mallikarjunayya
@ 2012-04-26 10:02 ` Ravishankar Karkala Mallikarjunayya
3 siblings, 0 replies; 5+ messages in thread
From: Ravishankar Karkala Mallikarjunayya @ 2012-04-26 10:02 UTC (permalink / raw)
To: gregkh, wfp5p; +Cc: devel, linux-kernel, Ravishankar Karkala Mallikarjunayya
This is a patch to the ni_at_a2150.c file that fixes up a line
over 80 character warning found by the checkpatch.pl tool.
Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
---
drivers/staging/comedi/drivers/ni_at_a2150.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_at_a2150.c b/drivers/staging/comedi/drivers/ni_at_a2150.c
index 32e675e..80416b6 100644
--- a/drivers/staging/comedi/drivers/ni_at_a2150.c
+++ b/drivers/staging/comedi/drivers/ni_at_a2150.c
@@ -539,7 +539,10 @@ static int a2150_ai_cmdtest(struct comedi_device *dev,
if (err)
return 1;
- /* step 2: make sure trigger sources are unique and mutually compatible */
+ /*
+ * step 2: make sure trigger sources are unique and mutually
+ * compatible
+ */
if (cmd->start_src != TRIG_NOW && cmd->start_src != TRIG_EXT)
err++;
@@ -772,7 +775,10 @@ static int a2150_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
/* start acquisition for soft trigger */
outw(0, dev->iobase + FIFO_START_REG);
- /* there is a 35.6 sample delay for data to get through the antialias filter */
+ /*
+ * there is a 35.6 sample delay for data to get through the
+ * antialias filter
+ */
for (n = 0; n < filter_delay; n++) {
for (i = 0; i < timeout; i++) {
if (inw(dev->iobase + STATUS_REG) & FNE_BIT)
@@ -813,8 +819,10 @@ static int a2150_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
return n;
}
-/* sets bits in devpriv->clock_bits to nearest approximation of requested period,
- * adjusts requested period to actual timing. */
+/*
+ * sets bits in devpriv->clock_bits to nearest approximation of requested
+ * period, adjusts requested period to actual timing.
+ */
static int a2150_get_timing(struct comedi_device *dev, unsigned int *period,
int flags)
{
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-04-26 10:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-26 10:02 Staging: comedi: fix code clean up issues Ravishankar Karkala Mallikarjunayya
2012-04-26 10:02 ` [PATCH 1/4] Staging: comedi: fix line over 80 character issue in cb_pcidda.c Ravishankar Karkala Mallikarjunayya
2012-04-26 10:02 ` [PATCH 2/4] Staging: comedi: fix line over 80 character issue in daqboard2000.c Ravishankar Karkala Mallikarjunayya
2012-04-26 10:02 ` [PATCH 3/4] Staging: comedi: fix line over 80 character issue in cb_pcimdas.c Ravishankar Karkala Mallikarjunayya
2012-04-26 10:02 ` [PATCH 4/4] Staging: comedi: fix line over 80 character issue in ni_at_a2150.c Ravishankar Karkala Mallikarjunayya
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.