Staging: comedi: Fix WARNING issue in dt2801.c
PATCH 5/6 Staging: comedi: Fix WARNING issue in dt2801.c
This is a patch to the dt2801.c file that fixes up a Block comments issues found by the checkpatch.pl tool.
i.e. Block comments use a trailing */ on a separate line
--- drivers/staging/comedi/drivers/dt2801.c | 84 ++++++++++++++++----------------- 1 file changed, 42 insertions(+), 42 deletions(-)
drivers/staging/comedi/drivers/dt2801.c +42 -42
@@ -3,31 +3,30 @@* Device Driver for DataTranslation DT2801 * */ -/* -Driver: dt2801 -Description: Data Translation DT2801 series and DT01-EZ -Author: ds -Status: works -Devices: [Data Translation] DT2801 (dt2801), DT2801-A, DT2801/5716A, -DT2805, DT2805/5716A, DT2808, DT2818, DT2809, DT01-EZ - -This driver can autoprobe the type of board. - -Configuration options: -[0] - I/O port base address -[1] - unused -[2] - A/D reference 0=differential, 1=single-ended -[3] - A/D range -0 = [-10, 10] -1 = [0,10] -[4] - D/A 0 range -0 = [-10, 10] -1 = [-5,5] -2 = [-2.5,2.5] -3 = [0,10] -4 = [0,5] -[5] - D/A 1 range (same choices) -*/ +/* Driver: dt2801 +* Description: Data Translation DT2801 series and DT01-EZ +* Author: ds +* Status: works +* Devices: [Data Translation] DT2801 (dt2801), DT2801-A, DT2801/5716A, +* DT2805, DT2805/5716A, DT2808, DT2818, DT2809, DT01-EZ + +* This driver can autoprobe the type of board. + +* Configuration options: +* [0] - I/O port base address +* [1] - unused +* [2] - A/D reference 0=differential, 1=single-ended +* [3] - A/D range +* 0 = [-10, 10] +* 1 = [0,10] +* [4] - D/A 0 range +* 0 = [-10, 10] +* 1 = [-5,5] +* 2 = [-2.5,2.5] +* 3 = [0,10] +* 4 = [0,5] +* [5] - D/A 1 range (same choices) +*/ #include <linux/module.h> #include "../comedidev.h"
@@ -66,8 +65,8 @@ Configuration options:#define DT_C_READ_AD 0xe/* Command modifiers (only used with read/write), EXTTRIG can be -used with some other commands. -*/ +* used with some other commands. +*/ #define DT_MOD_DMA BIT(4)#define DT_MOD_CONT BIT(5)#define DT_MOD_EXTCLK BIT(6)
@@ -136,8 +135,8 @@ struct dt2801_board { };/* Typeid's for the different boards of the DT2801-series -(taken from the test-software, that comes with the board) -*/ +* (taken from the test-software, that comes with the board) +*/ static const struct dt2801_board boardtypes[] = { { .name ="dt2801" ,
@@ -210,14 +209,15 @@ struct dt2801_private { };/* These are the low-level routines: -writecommand: write a command to the board -writedata: write data byte -readdata: read data byte +* writecommand: write a command to the board +* writedata: write data byte +* readdata: read data byte */ /* Only checks DataOutReady-flag, not the Ready-flag as it is done -in the examples of the manual. I don't see why this should be -necessary. */ +* in the examples of the manual. I don't see why this should be +* necessary. +*/ static int dt2801_readdata (struct comedi_device *dev,int *data) {int stat =0 ;
@@ -517,14 +517,14 @@ static int dt2801_dio_insn_config(struct comedi_device *dev, }/* -options: -[0] - i/o base -[1] - unused -[2] - a/d 0=differential, 1=single-ended -[3] - a/d range 0=[-10,10], 1=[0,10] -[4] - dac0 range 0=[-10,10], 1=[-5,5], 2=[-2.5,2.5] 3=[0,10], 4=[0,5] -[5] - dac1 range 0=[-10,10], 1=[-5,5], 2=[-2.5,2.5] 3=[0,10], 4=[0,5] -*/ +* options: +* [0] - i/o base +* [1] - unused +* [2] - a/d 0=differential, 1=single-ended +* [3] - a/d range 0=[-10,10], 1=[0,10] +* [4] - dac0 range 0=[-10,10], 1=[-5,5], 2=[-2.5,2.5] 3=[0,10], 4=[0,5] +* [5] - dac1 range 0=[-10,10], 1=[-5,5], 2=[-2.5,2.5] 3=[0,10], 4=[0,5] +*/ static int dt2801_attach (struct comedi_device *dev,struct comedi_devconfig *it) {const struct dt2801_board *board;
Signature · 1 line
1.9.1
PATCH 6/6 Staging: comedi: Fix CHECK:Avoid CamelCase issue in daqboard2000.c
This is a patch to the daqboard2000.c file that fixes up a issues found by the checkpatch.pl tool.
--- drivers/staging/comedi/drivers/daqboard2000.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/comedi/drivers/daqboard2000.c +6 -6
@@ -116,12 +116,12 @@#define DAQBOARD2000_SUBSYSTEM_IDS4 0x0004/* Daqboard/2000 - 4 Dacs */ /* Initialization bits for the Serial EEPROM Control Register */ -#define DAQBOARD2000_SECRProgPinHi 0x8001767e -#define DAQBOARD2000_SECRProgPinLo 0x8000767e -#define DAQBOARD2000_SECRLocalBusHi 0xc000767e -#define DAQBOARD2000_SECRLocalBusLo 0x8000767e -#define DAQBOARD2000_SECRReloadHi 0xa000767e -#define DAQBOARD2000_SECRReloadLo 0x8000767e +#define DAQBOARD2000_SECRPROGPINHI 0x8001767e +#define DAQBOARD2000_SECRPROGPINLO 0x8000767e +#define DAQBOARD2000_SECRLOCALBUSHI 0xc000767e +#define DAQBOARD2000_SECRLOCALBUSLO 0x8000767e +#define DAQBOARD2000_SECRRELOADHI 0xa000767e +#define DAQBOARD2000_SECRRELOADLO 0x8000767e/* SECR status bits */ #define DAQBOARD2000_EEPROM_PRESENT 0x10000000
Signature · 1 line
1.9.1
Re: [PATCH 6/6] Staging: comedi: Fix CHECK:Avoid CamelCase issue in daqboard2000.c
Quoted 22 lines · Ravishankar Karkala Mallikarjunayya
This is a patch to the
daqboard2000.cfile that fixes up a issues found by the checkpatch.pl tool.Signed-off-by Ravishankar Karkala Mallikarjunayya <[email protected]>--- drivers/staging/comedi/drivers/daqboard2000.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)drivers/staging/comedi/drivers/daqboard2000.c +0
-5@@ -116,12 +116,12 @@#define DAQBOARD2000_SUBSYSTEM_IDS4 0x0004/* Daqboard/2000 - 4 Dacs */ /* Initialization bits for the Serial EEPROM Control Register */ -#define DAQBOARD2000_SECRProgPinHi 0x8001767e -#define DAQBOARD2000_SECRProgPinLo 0x8000767e -#define DAQBOARD2000_SECRLocalBusHi 0xc000767e -#define DAQBOARD2000_SECRLocalBusLo 0x8000767e -#define DAQBOARD2000_SECRReloadHi 0xa000767e
drivers/staging/comedi/drivers/daqboard2000.c line 127
Quoted 10 lines
drivers/staging/comedi/drivers/daqboard2000.c +6
-1-#define DAQBOARD2000_SECRReloadLo 0x8000767e +#define DAQBOARD2000_SECRPROGPINHI 0x8001767e +#define DAQBOARD2000_SECRPROGPINLO 0x8000767e +#define DAQBOARD2000_SECRLOCALBUSHI 0xc000767e +#define DAQBOARD2000_SECRLOCALBUSLO 0x8000767e +#define DAQBOARD2000_SECRRELOADHI 0xa000767e +#define DAQBOARD2000_SECRRELOADLO 0x8000767e/* SECR status bits */ #define DAQBOARD2000_EEPROM_PRESENT 0x10000000
This doesn't compile. Also, there are several other CamelCase issues in this driver, although probably too many to deal with in a single patch.
I'll have a shot at a slightly more extensive clean-up.
Signature · 2 lines
-=( Ian Abbott @ MEV Ltd. E-mail: <[email protected]> )=- -=( Web: http://www.mev.co.uk/ )=-
Quoted 10 lines · Ravishankar Karkala Mallikarjunayya
This is a patch to the
dt2801.cfile that fixes up a Block comments issues found by the checkpatch.pl tool.i.e. Block comments use a trailing */ on a separate line
Signed-off-by Ravishankar Karkala Mallikarjunayya <[email protected]>--- drivers/staging/comedi/drivers/dt2801.c | 84 ++++++++++++++++----------------- 1 file changed, 42 insertions(+), 42 deletions(-)
Patch series should start at 1, not 5. In this case, your two patches PATCH 5/6 and PATCH 6/6 look independent from one another, and could be posted as individual patches, not in a series.
Quoted 47 lines
drivers/staging/comedi/drivers/dt2801.c +14
-25@@ -3,31 +3,30 @@* Device Driver for DataTranslation DT2801 * */ -/* -Driver: dt2801 -Description: Data Translation DT2801 series and DT01-EZ -Author: ds -Status: works -Devices: [Data Translation] DT2801 (dt2801), DT2801-A, DT2801/5716A, -DT2805, DT2805/5716A, DT2808, DT2818, DT2809, DT01-EZ - -This driver can autoprobe the type of board. - -Configuration options: -[0] - I/O port base address -[1] - unused -[2] - A/D reference 0=differential, 1=single-ended -[3] - A/D range -0 = [-10, 10] -1 = [0,10] -[4] - D/A 0 range -0 = [-10, 10] -1 = [-5,5] -2 = [-2.5,2.5] -3 = [0,10] -4 = [0,5] -[5] - D/A 1 range (same choices) -*/ +/* Driver: dt2801 +* Description: Data Translation DT2801 series and DT01-EZ +* Author: ds +* Status: works +* Devices: [Data Translation] DT2801 (dt2801), DT2801-A, DT2801/5716A, +* DT2805, DT2805/5716A, DT2808, DT2818, DT2809, DT01-EZ + +* This driver can autoprobe the type of board. + +* Configuration options: +* [0] - I/O port base address +* [1] - unused +* [2] - A/D reference 0=differential, 1=single-ended +* [3] - A/D range
drivers/staging/comedi/drivers/dt2801.c line 29
Quoted 10 lines
drivers/staging/comedi/drivers/dt2801.c +10
-0+* 0 = [-10, 10] +* 1 = [0,10] +* [4] - D/A 0 range +* 0 = [-10, 10] +* 1 = [-5,5] +* 2 = [-2.5,2.5] +* 3 = [0,10] +* 4 = [0,5] +* [5] - D/A 1 range (same choices) +*/
Our usual block comment style is:
/*
* blah blah
* blah blah
*/
i.e. the opening '/*' is on a line by itself. If you could fix up the block comments to conform to that style, that would be great!
Signature · 2 lines
-=( Ian Abbott @ MEV Ltd. E-mail: <[email protected]> )=- -=( Web: http://www.mev.co.uk/ )=-