linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] Staging: comedi: Fix WARNING issue in dt2801.c
@ 2016-05-17 10:13 Ravishankar Karkala Mallikarjunayya
  2016-05-17 10:13 ` [PATCH 1/2] Staging: comedi: Fix WARNING issue in s626.c Ravishankar Karkala Mallikarjunayya
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ravishankar Karkala Mallikarjunayya @ 2016-05-17 10:13 UTC (permalink / raw)
  To: abbotti, hsweeten, gregkh
  Cc: devel, linux-kernel, Ravishankar Karkala Mallikarjunayya

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

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
---
 drivers/staging/comedi/drivers/dt2801.c | 95 +++++++++++++++++----------------
 1 file changed, 50 insertions(+), 45 deletions(-)

diff --git a/drivers/staging/comedi/drivers/dt2801.c b/drivers/staging/comedi/drivers/dt2801.c
index 6c7b4d2..c2ce1eb 100644
--- a/drivers/staging/comedi/drivers/dt2801.c
+++ b/drivers/staging/comedi/drivers/dt2801.c
@@ -4,30 +4,30 @@
  *
  */
 /*
-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"
@@ -65,9 +65,10 @@ Configuration options:
 #define DT_C_SET_AD      0xd
 #define DT_C_READ_AD     0xe
 
-/* Command modifiers (only used with read/write), EXTTRIG can be
-   used with some other commands.
-*/
+/*
+ * Command modifiers (only used with read/write), EXTTRIG can be
+ * used with some other commands.
+ */
 #define DT_MOD_DMA     BIT(4)
 #define DT_MOD_CONT    BIT(5)
 #define DT_MOD_EXTCLK  BIT(6)
@@ -135,9 +136,10 @@ struct dt2801_board {
 	int dabits;
 };
 
-/* Typeid's for the different boards of the DT2801-series
-   (taken from the test-software, that comes with the board)
-   */
+/*
+ * Typeid's for the different boards of the DT2801-series
+ * (taken from the test-software, that comes with the board)
+ */
 static const struct dt2801_board boardtypes[] = {
 	{
 	 .name = "dt2801",
@@ -209,15 +211,18 @@ struct dt2801_private {
 	const struct comedi_lrange *dac_range_types[2];
 };
 
-/* These are the low-level routines:
-   writecommand: write a command to the board
-   writedata: write data byte
-   readdata: read data byte
+/*
+ * These are the low-level routines:
+ * 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. */
+/*
+ * 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.
+ */
 static int dt2801_readdata(struct comedi_device *dev, int *data)
 {
 	int stat = 0;
@@ -517,14 +522,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;
-- 
1.9.1

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

* [PATCH 1/2] Staging: comedi: Fix WARNING issue in s626.c
  2016-05-17 10:13 [PATCH 1/1] Staging: comedi: Fix WARNING issue in dt2801.c Ravishankar Karkala Mallikarjunayya
@ 2016-05-17 10:13 ` Ravishankar Karkala Mallikarjunayya
  2016-05-18  9:27   ` Ian Abbott
  2016-05-17 10:13 ` [PATCH 2/2] Staging: comedi: fix type " Ravishankar Karkala Mallikarjunayya
  2016-05-18  8:52 ` [PATCH 1/1] Staging: comedi: Fix WARNING issue in dt2801.c Ian Abbott
  2 siblings, 1 reply; 6+ messages in thread
From: Ravishankar Karkala Mallikarjunayya @ 2016-05-17 10:13 UTC (permalink / raw)
  To: abbotti, hsweeten, gregkh
  Cc: devel, linux-kernel, Ravishankar Karkala Mallikarjunayya

This is a patch to the s626.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

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
---
 drivers/staging/comedi/drivers/s626.c | 60 +++++++++++++++++++++++------------
 1 file changed, 40 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c
index c5e0863..0e1f535 100644
--- a/drivers/staging/comedi/drivers/s626.c
+++ b/drivers/staging/comedi/drivers/s626.c
@@ -76,24 +76,38 @@ struct s626_buffer_dma {
 
 struct s626_private {
 	uint8_t ai_cmd_running;		/* ai_cmd is running */
-	unsigned int ai_sample_timer;	/* time between samples in
-					 * units of the timer */
+	unsigned int ai_sample_timer;	/*
+					 * time between samples in
+					 * units of the timer
+					 */
 	int ai_convert_count;		/* conversion counter */
-	unsigned int ai_convert_timer;	/* time between conversion in
-					 * units of the timer */
-	uint16_t counter_int_enabs;	/* counter interrupt enable mask
-					 * for MISC2 register */
+	unsigned int ai_convert_timer;	/*
+					 * time between conversion in
+					 * units of the timer
+					 */
+	u16 counter_int_enabs;	/*
+					 * counter interrupt enable mask
+					 * for MISC2 register
+					 */
 	uint8_t adc_items;		/* number of items in ADC poll list */
-	struct s626_buffer_dma rps_buf;	/* DMA buffer used to hold ADC (RPS1)
-					 * program */
-	struct s626_buffer_dma ana_buf;	/* DMA buffer used to receive ADC data
-					 * and hold DAC data */
-	uint32_t *dac_wbuf;		/* pointer to logical adrs of DMA buffer
-					 * used to hold DAC data */
+	struct s626_buffer_dma rps_buf;	/*
+					 * DMA buffer used to hold ADC (RPS1)
+					 * program
+					 */
+	struct s626_buffer_dma ana_buf;	/*
+					 * DMA buffer used to receive ADC data
+					 * and hold DAC data
+					 */
+	u32 *dac_wbuf;		/*
+					 * pointer to logical adrs of DMA buffer
+					 * used to hold DAC data
+					 */
 	uint16_t dacpol;		/* image of DAC polarity register */
 	uint8_t trim_setpoint[12];	/* images of TrimDAC setpoints */
-	uint32_t i2c_adrs;		/* I2C device address for onboard EEPROM
-					 * (board rev dependent) */
+	u32 i2c_adrs;		/*
+					 * I2C device address for onboard EEPROM
+					 * (board rev dependent)
+					 */
 };
 
 /* Counter overflow/index event flag masks for RDMISC2. */
@@ -571,12 +585,18 @@ static int s626_set_dac(struct comedi_device *dev,
 	 * to a  non-existent TrimDac channel) that serves to keep the clock
 	 * running after the packet has been sent to the target DAC.
 	 */
-	val = 0x0F000000;	/* Continue clock after target DAC data
-				 * (write to non-existent trimdac). */
-	val |= 0x00004000;	/* Address the two main dual-DAC devices
-				 * (TSL's chip select enables target device). */
-	val |= ((uint32_t)(chan & 1) << 15);	/* Address the DAC channel
-						 * within the device. */
+	val = 0x0F000000;	/*
+				 * Continue clock after target DAC data
+				 * (write to non-existent trimdac).
+				 */
+	val |= 0x00004000;	/*
+				 * Address the two main dual-DAC devices
+				 * (TSL's chip select enables target device).
+				 */
+	val |= ((uint32_t)(chan & 1) << 15);	/*
+						 * Address the DAC channel
+						 * within the device.
+						 */
 	val |= (uint32_t)dacdata;	/* Include DAC setpoint data. */
 	return s626_send_dac(dev, val);
 }
-- 
1.9.1

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

* [PATCH 2/2] Staging: comedi: fix type issue in s626.c
  2016-05-17 10:13 [PATCH 1/1] Staging: comedi: Fix WARNING issue in dt2801.c Ravishankar Karkala Mallikarjunayya
  2016-05-17 10:13 ` [PATCH 1/2] Staging: comedi: Fix WARNING issue in s626.c Ravishankar Karkala Mallikarjunayya
@ 2016-05-17 10:13 ` Ravishankar Karkala Mallikarjunayya
  2016-05-18  9:36   ` Ian Abbott
  2016-05-18  8:52 ` [PATCH 1/1] Staging: comedi: Fix WARNING issue in dt2801.c Ian Abbott
  2 siblings, 1 reply; 6+ messages in thread
From: Ravishankar Karkala Mallikarjunayya @ 2016-05-17 10:13 UTC (permalink / raw)
  To: abbotti, hsweeten, gregkh
  Cc: devel, linux-kernel, Ravishankar Karkala Mallikarjunayya

This is a patch to the s626.c file that fixes up a type issues
found by the checkpatch.pl tool.

i.e Prefer kernel type 'u8' over 'uint8_t'
    Prefer kernel type 'u16' over 'uint16_t'
    Prefer kernel type 'u32' over 'uint32_t'
    Prefer kernel type 's16' over 'int16_t'
    Prefer kernel type 's32' over 'int32_t'

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
---
 drivers/staging/comedi/drivers/s626.c | 152 +++++++++++++++++-----------------
 1 file changed, 76 insertions(+), 76 deletions(-)

diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c
index 0e1f535..c91ed53 100644
--- a/drivers/staging/comedi/drivers/s626.c
+++ b/drivers/staging/comedi/drivers/s626.c
@@ -75,7 +75,7 @@ struct s626_buffer_dma {
 };
 
 struct s626_private {
-	uint8_t ai_cmd_running;		/* ai_cmd is running */
+	u8 ai_cmd_running;		/* ai_cmd is running */
 	unsigned int ai_sample_timer;	/*
 					 * time between samples in
 					 * units of the timer
@@ -85,11 +85,11 @@ struct s626_private {
 					 * time between conversion in
 					 * units of the timer
 					 */
-	uint16_t counter_int_enabs;	/*
+	u16 counter_int_enabs;		/*
 					 * counter interrupt enable mask
 					 * for MISC2 register
 					 */
-	uint8_t adc_items;		/* number of items in ADC poll list */
+	u8 adc_items;			/* number of items in ADC poll list */
 	struct s626_buffer_dma rps_buf;	/*
 					 * DMA buffer used to hold ADC (RPS1)
 					 * program
@@ -98,13 +98,13 @@ struct s626_private {
 					 * DMA buffer used to receive ADC data
 					 * and hold DAC data
 					 */
-	uint32_t *dac_wbuf;		/*
+	u32 *dac_wbuf;			/*
 					 * pointer to logical adrs of DMA buffer
 					 * used to hold DAC data
 					 */
-	uint16_t dacpol;		/* image of DAC polarity register */
-	uint8_t trim_setpoint[12];	/* images of TrimDAC setpoints */
-	uint32_t i2c_adrs;		/*
+	u16 dacpol;			/* image of DAC polarity register */
+	u8 trim_setpoint[12];		/* images of TrimDAC setpoints */
+	u32 i2c_adrs;			/*
 					 * I2C device address for onboard EEPROM
 					 * (board rev dependent)
 					 */
@@ -318,10 +318,10 @@ static uint8_t s626_i2c_read(struct comedi_device *dev, uint8_t addr)
 /* ***********  DAC FUNCTIONS *********** */
 
 /* TrimDac LogicalChan-to-PhysicalChan mapping table. */
-static const uint8_t s626_trimchan[] = { 10, 9, 8, 3, 2, 7, 6, 1, 0, 5, 4 };
+static const u8 s626_trimchan[] = { 10, 9, 8, 3, 2, 7, 6, 1, 0, 5, 4 };
 
 /* TrimDac LogicalChan-to-EepromAdrs mapping table. */
-static const uint8_t s626_trimadrs[] = {
+static const u8 s626_trimadrs[] = {
 	0x40, 0x41, 0x42, 0x50, 0x51, 0x52, 0x53, 0x60, 0x61, 0x62, 0x63
 };
 
@@ -530,12 +530,12 @@ static int s626_send_dac(struct comedi_device *dev, uint32_t val)
  * Private helper function: Write setpoint to an application DAC channel.
  */
 static int s626_set_dac(struct comedi_device *dev,
-			uint16_t chan, int16_t dacdata)
+			u16 chan, int16_t dacdata)
 {
 	struct s626_private *devpriv = dev->private;
-	uint16_t signmask;
-	uint32_t ws_image;
-	uint32_t val;
+	u16 signmask;
+	u32 ws_image;
+	u32 val;
 
 	/*
 	 * Adjust DAC data polarity and set up Polarity Control Register image.
@@ -602,16 +602,16 @@ static int s626_set_dac(struct comedi_device *dev,
 }
 
 static int s626_write_trim_dac(struct comedi_device *dev,
-			       uint8_t logical_chan, uint8_t dac_data)
+			       u8 logical_chan, u8 dac_data)
 {
 	struct s626_private *devpriv = dev->private;
-	uint32_t chan;
+	u32 chan;
 
 	/*
 	 * Save the new setpoint in case the application needs to read it back
 	 * later.
 	 */
-	devpriv->trim_setpoint[logical_chan] = (uint8_t)dac_data;
+	devpriv->trim_setpoint[logical_chan] = (u8)dac_data;
 
 	/* Map logical channel number to physical channel number. */
 	chan = s626_trimchan[logical_chan];
@@ -653,7 +653,7 @@ static int s626_write_trim_dac(struct comedi_device *dev,
 
 static int s626_load_trim_dacs(struct comedi_device *dev)
 {
-	uint8_t i;
+	u8 i;
 	int ret;
 
 	/* Copy TrimDac setpoint values from EEPROM to TrimDacs. */
@@ -706,7 +706,7 @@ static void s626_preload(struct comedi_device *dev,
 static void s626_reset_cap_flags(struct comedi_device *dev,
 				 unsigned int chan)
 {
-	uint16_t set;
+	u16 set;
 
 	set = S626_SET_CRB_INTRESETCMD(1);
 	if (chan < 3)
@@ -725,9 +725,9 @@ static void s626_reset_cap_flags(struct comedi_device *dev,
 static uint16_t s626_get_mode_a(struct comedi_device *dev,
 				unsigned int chan)
 {
-	uint16_t cra;
-	uint16_t crb;
-	uint16_t setup;
+	u16 cra;
+	u16 crb;
+	u16 setup;
 	unsigned cntsrc, clkmult, clkpol, encmode;
 
 	/* Fetch CRA and CRB register images. */
@@ -780,9 +780,9 @@ static uint16_t s626_get_mode_a(struct comedi_device *dev,
 static uint16_t s626_get_mode_b(struct comedi_device *dev,
 				unsigned int chan)
 {
-	uint16_t cra;
-	uint16_t crb;
-	uint16_t setup;
+	u16 cra;
+	u16 crb;
+	u16 setup;
 	unsigned cntsrc, clkmult, clkpol, encmode;
 
 	/* Fetch CRA and CRB register images. */
@@ -856,8 +856,8 @@ static void s626_set_mode_a(struct comedi_device *dev,
 			    uint16_t disable_int_src)
 {
 	struct s626_private *devpriv = dev->private;
-	uint16_t cra;
-	uint16_t crb;
+	u16 cra;
+	u16 crb;
 	unsigned cntsrc, clkmult, clkpol;
 
 	/* Initialize CRA and CRB images. */
@@ -934,8 +934,8 @@ static void s626_set_mode_b(struct comedi_device *dev,
 			    uint16_t disable_int_src)
 {
 	struct s626_private *devpriv = dev->private;
-	uint16_t cra;
-	uint16_t crb;
+	u16 cra;
+	u16 crb;
 	unsigned cntsrc, clkmult, clkpol;
 
 	/* Initialize CRA and CRB images. */
@@ -1016,7 +1016,7 @@ static void s626_set_mode_b(struct comedi_device *dev,
 
 static void s626_set_mode(struct comedi_device *dev,
 			  unsigned int chan,
-			  uint16_t setup, uint16_t disable_int_src)
+			  u16 setup, u16 disable_int_src)
 {
 	if (chan < 3)
 		s626_set_mode_a(dev, chan, setup, disable_int_src);
@@ -1047,7 +1047,7 @@ static void s626_set_enable(struct comedi_device *dev,
 static uint16_t s626_get_enable(struct comedi_device *dev,
 				unsigned int chan)
 {
-	uint16_t crb = s626_debi_read(dev, S626_LP_CRB(chan));
+	u16 crb = s626_debi_read(dev, S626_LP_CRB(chan));
 
 	return (chan < 3) ? S626_GET_CRB_CLKENAB_A(crb)
 			  : S626_GET_CRB_CLKENAB_B(crb);
@@ -1070,9 +1070,9 @@ static uint16_t s626_get_latch_source(struct comedi_device *dev,
 static void s626_set_load_trig(struct comedi_device *dev,
 			       unsigned int chan, uint16_t trig)
 {
-	uint16_t reg;
-	uint16_t mask;
-	uint16_t set;
+	u16 reg;
+	u16 mask;
+	u16 set;
 
 	if (chan < 3) {
 		reg = S626_LP_CRA(chan);
@@ -1108,8 +1108,8 @@ static void s626_set_int_src(struct comedi_device *dev,
 			     unsigned int chan, uint16_t int_source)
 {
 	struct s626_private *devpriv = dev->private;
-	uint16_t cra_reg = S626_LP_CRA(chan);
-	uint16_t crb_reg = S626_LP_CRB(chan);
+	u16 cra_reg = S626_LP_CRA(chan);
+	u16 crb_reg = S626_LP_CRB(chan);
 
 	if (chan < 3) {
 		/* Reset any pending counter overflow or index captures */
@@ -1121,7 +1121,7 @@ static void s626_set_int_src(struct comedi_device *dev,
 		s626_debi_replace(dev, cra_reg, ~S626_CRAMSK_INTSRC_A,
 				  S626_SET_CRA_INTSRC_A(int_source));
 	} else {
-		uint16_t crb;
+		u16 crb;
 
 		/* Cache writeable CRB register image */
 		crb = s626_debi_read(dev, crb_reg);
@@ -1178,7 +1178,7 @@ static uint16_t s626_get_int_src(struct comedi_device *dev,
 static void s626_set_clk_mult(struct comedi_device *dev,
 			      unsigned int chan, uint16_t value)
 {
-	uint16_t mode;
+	u16 mode;
 
 	mode = s626_get_mode(dev, chan);
 	mode &= ~S626_STDMSK_CLKMULT;
@@ -1193,7 +1193,7 @@ static void s626_set_clk_mult(struct comedi_device *dev,
 static void s626_set_clk_pol(struct comedi_device *dev,
 			     unsigned int chan, uint16_t value)
 {
-	uint16_t mode;
+	u16 mode;
 
 	mode = s626_get_mode(dev, chan);
 	mode &= ~S626_STDMSK_CLKPOL;
@@ -1208,7 +1208,7 @@ static void s626_set_clk_pol(struct comedi_device *dev,
 static void s626_set_enc_mode(struct comedi_device *dev,
 			      unsigned int chan, uint16_t value)
 {
-	uint16_t mode;
+	u16 mode;
 
 	mode = s626_get_mode(dev, chan);
 	mode &= ~S626_STDMSK_ENCMODE;
@@ -1229,7 +1229,7 @@ static uint16_t s626_get_index_pol(struct comedi_device *dev,
 static void s626_set_index_src(struct comedi_device *dev,
 			       unsigned int chan, uint16_t value)
 {
-	uint16_t mode;
+	u16 mode;
 
 	mode = s626_get_mode(dev, chan);
 	mode &= ~S626_STDMSK_INDXSRC;
@@ -1252,7 +1252,7 @@ static void s626_pulse_index(struct comedi_device *dev,
 			     unsigned int chan)
 {
 	if (chan < 3) {
-		uint16_t cra;
+		u16 cra;
 
 		cra = s626_debi_read(dev, S626_LP_CRA(chan));
 
@@ -1261,7 +1261,7 @@ static void s626_pulse_index(struct comedi_device *dev,
 				(cra ^ S626_CRAMSK_INDXPOL_A));
 		s626_debi_write(dev, S626_LP_CRA(chan), cra);
 	} else {
-		uint16_t crb;
+		u16 crb;
 
 		crb = s626_debi_read(dev, S626_LP_CRB(chan));
 		crb &= ~S626_CRBMSK_INTCTRL;
@@ -1329,7 +1329,7 @@ static int s626_dio_clear_irq(struct comedi_device *dev)
 }
 
 static void s626_handle_dio_interrupt(struct comedi_device *dev,
-				      uint16_t irqbit, uint8_t group)
+				      u16 irqbit, uint8_t group)
 {
 	struct s626_private *devpriv = dev->private;
 	struct comedi_subdevice *s = dev->read_subdev;
@@ -1377,8 +1377,8 @@ static void s626_handle_dio_interrupt(struct comedi_device *dev,
 
 static void s626_check_dio_interrupts(struct comedi_device *dev)
 {
-	uint16_t irqbit;
-	uint8_t group;
+	u16 irqbit;
+	u8 group;
 
 	for (group = 0; group < S626_DIO_BANKS; group++) {
 		/* read interrupt type */
@@ -1398,7 +1398,7 @@ static void s626_check_counter_interrupts(struct comedi_device *dev)
 	struct comedi_subdevice *s = dev->read_subdev;
 	struct comedi_async *async = s->async;
 	struct comedi_cmd *cmd = &async->cmd;
-	uint16_t irqbit;
+	u16 irqbit;
 
 	/* read interrupt type */
 	irqbit = s626_debi_read(dev, S626_LP_RDMISC2);
@@ -1463,7 +1463,7 @@ static bool s626_handle_eos_interrupt(struct comedi_device *dev)
 	 * first uint16_t in the buffer because it contains junk data
 	 * from the final ADC of the previous poll list scan.
 	 */
-	uint32_t *readaddr = (uint32_t *)devpriv->ana_buf.logical_base + 1;
+	u32 *readaddr = (u32 *)devpriv->ana_buf.logical_base + 1;
 	int i;
 
 	/* get the data and hand it over to comedi */
@@ -1498,7 +1498,7 @@ static irqreturn_t s626_irq_handler(int irq, void *d)
 {
 	struct comedi_device *dev = d;
 	unsigned long flags;
-	uint32_t irqtype, irqstatus;
+	u32 irqtype, irqstatus;
 
 	if (!dev->attached)
 		return IRQ_NONE;
@@ -1544,11 +1544,11 @@ static void s626_reset_adc(struct comedi_device *dev, uint8_t *ppl)
 	struct s626_private *devpriv = dev->private;
 	struct comedi_subdevice *s = dev->read_subdev;
 	struct comedi_cmd *cmd = &s->async->cmd;
-	uint32_t *rps;
-	uint32_t jmp_adrs;
-	uint16_t i;
-	uint16_t n;
-	uint32_t local_ppl;
+	u32 *rps;
+	u32 jmp_adrs;
+	u16 i;
+	u16 n;
+	u32 local_ppl;
 
 	/* Stop RPS program in case it is currently running */
 	s626_mc_disable(dev, S626_MC1_ERPS1, S626_P_MC1);
@@ -1744,8 +1744,8 @@ static int s626_ai_rinsn(struct comedi_device *dev,
 			 unsigned int *data)
 {
 	struct s626_private *devpriv = dev->private;
-	uint8_t i;
-	int32_t *readaddr;
+	u8 i;
+	s32 *readaddr;
 
 	/* Trigger ADC scan loop start */
 	s626_mc_enable(dev, S626_MC2_ADC_RPS, S626_P_MC2);
@@ -1792,11 +1792,11 @@ static int s626_ai_insn_read(struct comedi_device *dev,
 			     struct comedi_insn *insn,
 			     unsigned int *data)
 {
-	uint16_t chan = CR_CHAN(insn->chanspec);
-	uint16_t range = CR_RANGE(insn->chanspec);
-	uint16_t adc_spec = 0;
-	uint32_t gpio_image;
-	uint32_t tmp;
+	u16 chan = CR_CHAN(insn->chanspec);
+	u16 range = CR_RANGE(insn->chanspec);
+	u16 adc_spec = 0;
+	u32 gpio_image;
+	u32 tmp;
 	int ret;
 	int n;
 
@@ -1889,7 +1889,7 @@ static int s626_ai_insn_read(struct comedi_device *dev,
 	return n;
 }
 
-static int s626_ai_load_polllist(uint8_t *ppl, struct comedi_cmd *cmd)
+static int s626_ai_load_polllist(u8 *ppl, struct comedi_cmd *cmd)
 {
 	int n;
 
@@ -1955,7 +1955,7 @@ static int s626_ns_to_timer(unsigned int *nanosec, unsigned int flags)
 static void s626_timer_load(struct comedi_device *dev,
 			    unsigned int chan, int tick)
 {
-	uint16_t setup =
+	u16 setup =
 		/* Preload upon index. */
 		S626_SET_STD_LOADSRC(S626_LOADSRC_INDX) |
 		/* Disable hardware index. */
@@ -1968,7 +1968,7 @@ static void s626_timer_load(struct comedi_device *dev,
 		S626_SET_STD_CLKMULT(S626_CLKMULT_1X) |
 		/* Enabled by index */
 		S626_SET_STD_CLKENAB(S626_CLKENAB_INDEX);
-	uint16_t value_latchsrc = S626_LATCHSRC_A_INDXA;
+	u16 value_latchsrc = S626_LATCHSRC_A_INDXA;
 	/* uint16_t enab = S626_CLKENAB_ALWAYS; */
 
 	s626_set_mode(dev, chan, setup, false);
@@ -1997,7 +1997,7 @@ static void s626_timer_load(struct comedi_device *dev,
 static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 {
 	struct s626_private *devpriv = dev->private;
-	uint8_t ppl[16];
+	u8 ppl[16];
 	struct comedi_cmd *cmd = &s->async->cmd;
 	int tick;
 
@@ -2232,7 +2232,7 @@ static int s626_ao_insn_write(struct comedi_device *dev,
 	int i;
 
 	for (i = 0; i < insn->n; i++) {
-		int16_t dacdata = (int16_t)data[i];
+		s16 dacdata = (s16)data[i];
 		int ret;
 
 		dacdata -= (0x1fff);
@@ -2257,7 +2257,7 @@ static int s626_ao_insn_write(struct comedi_device *dev,
 
 static void s626_dio_init(struct comedi_device *dev)
 {
-	uint16_t group;
+	u16 group;
 
 	/* Prepare to treat writes to WRCapSel as capture disables. */
 	s626_debi_write(dev, S626_LP_MISC1, S626_MISC1_NOEDCAP);
@@ -2321,7 +2321,7 @@ static int s626_enc_insn_config(struct comedi_device *dev,
 				struct comedi_insn *insn, unsigned int *data)
 {
 	unsigned int chan = CR_CHAN(insn->chanspec);
-	uint16_t setup =
+	u16 setup =
 		/* Preload upon index. */
 		S626_SET_STD_LOADSRC(S626_LOADSRC_INDX) |
 		/* Disable hardware index. */
@@ -2336,8 +2336,8 @@ static int s626_enc_insn_config(struct comedi_device *dev,
 		S626_SET_STD_CLKENAB(S626_CLKENAB_INDEX);
 	/* uint16_t disable_int_src = true; */
 	/* uint32_t Preloadvalue;              //Counter initial value */
-	uint16_t value_latchsrc = S626_LATCHSRC_AB_READ;
-	uint16_t enab = S626_CLKENAB_ALWAYS;
+	u16 value_latchsrc = S626_LATCHSRC_AB_READ;
+	u16 enab = S626_CLKENAB_ALWAYS;
 
 	/* (data==NULL) ? (Preloadvalue=0) : (Preloadvalue=data[0]); */
 
@@ -2356,7 +2356,7 @@ static int s626_enc_insn_read(struct comedi_device *dev,
 			      unsigned int *data)
 {
 	unsigned int chan = CR_CHAN(insn->chanspec);
-	uint16_t cntr_latch_reg = S626_LP_CNTR(chan);
+	u16 cntr_latch_reg = S626_LP_CNTR(chan);
 	int i;
 
 	for (i = 0; i < insn->n; i++) {
@@ -2404,7 +2404,7 @@ static void s626_write_misc2(struct comedi_device *dev, uint16_t new_image)
 static void s626_counters_init(struct comedi_device *dev)
 {
 	int chan;
-	uint16_t setup =
+	u16 setup =
 		/* Preload upon index. */
 		S626_SET_STD_LOADSRC(S626_LOADSRC_INDX) |
 		/* Disable hardware index. */
@@ -2473,7 +2473,7 @@ static int s626_initialize(struct comedi_device *dev)
 {
 	struct s626_private *devpriv = dev->private;
 	dma_addr_t phys_buf;
-	uint16_t chan;
+	u16 chan;
 	int i;
 	int ret;
 
@@ -2570,10 +2570,10 @@ static int s626_initialize(struct comedi_device *dev)
 	 */
 	{
 		struct comedi_subdevice *s = dev->read_subdev;
-		uint8_t poll_list;
-		uint16_t adc_data;
-		uint16_t start_val;
-		uint16_t index;
+		u8 poll_list;
+		u16 adc_data;
+		u16 start_val;
+		u16 index;
 		unsigned int data[16];
 
 		/* Create a simple polling list for analog input channel 0 */
-- 
1.9.1

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

* Re: [PATCH 1/1] Staging: comedi: Fix WARNING issue in dt2801.c
  2016-05-17 10:13 [PATCH 1/1] Staging: comedi: Fix WARNING issue in dt2801.c Ravishankar Karkala Mallikarjunayya
  2016-05-17 10:13 ` [PATCH 1/2] Staging: comedi: Fix WARNING issue in s626.c Ravishankar Karkala Mallikarjunayya
  2016-05-17 10:13 ` [PATCH 2/2] Staging: comedi: fix type " Ravishankar Karkala Mallikarjunayya
@ 2016-05-18  8:52 ` Ian Abbott
  2 siblings, 0 replies; 6+ messages in thread
From: Ian Abbott @ 2016-05-18  8:52 UTC (permalink / raw)
  To: Ravishankar Karkala Mallikarjunayya, hsweeten, gregkh; +Cc: devel, linux-kernel

On 17/05/16 11:13, Ravishankar Karkala Mallikarjunayya wrote:
> 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
>
> Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
> ---
>   drivers/staging/comedi/drivers/dt2801.c | 95 +++++++++++++++++----------------
>   1 file changed, 50 insertions(+), 45 deletions(-)

Thanks!

Reviewed-by: Ian Abbott <abbotti@mev.co.uk>

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

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

* Re: [PATCH 1/2] Staging: comedi: Fix WARNING issue in s626.c
  2016-05-17 10:13 ` [PATCH 1/2] Staging: comedi: Fix WARNING issue in s626.c Ravishankar Karkala Mallikarjunayya
@ 2016-05-18  9:27   ` Ian Abbott
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Abbott @ 2016-05-18  9:27 UTC (permalink / raw)
  To: Ravishankar Karkala Mallikarjunayya, hsweeten, gregkh; +Cc: devel, linux-kernel

On 17/05/16 11:13, Ravishankar Karkala Mallikarjunayya wrote:
> This is a patch to the s626.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
>
> Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
> ---
>   drivers/staging/comedi/drivers/s626.c | 60 +++++++++++++++++++++++------------
>   1 file changed, 40 insertions(+), 20 deletions(-)
>


I guess this is patch is a replacement for your earlier
"[PATCH 1/4] Staging: comedi: Fix WARNING issue in s626.c". The usual 
practice is to keep the same patch numbering and to add a "v2" like 
this: "[PATCH v2 1/4] Staging: comedi: Fix WARNING issue in s626.c". 
Then add a comment below the "---" line describing what has changed in 
version 2 of the patch. Remember that Greg and the other higher up 
maintainers have to sift through hundreds (or at least a large number) 
of patches a day, so the easier you make it for them, the better.

> diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c
> index c5e0863..0e1f535 100644
> --- a/drivers/staging/comedi/drivers/s626.c
> +++ b/drivers/staging/comedi/drivers/s626.c
> @@ -76,24 +76,38 @@ struct s626_buffer_dma {
>
>   struct s626_private {
>   	uint8_t ai_cmd_running;		/* ai_cmd is running */
> -	unsigned int ai_sample_timer;	/* time between samples in
> -					 * units of the timer */
> +	unsigned int ai_sample_timer;	/*
> +					 * time between samples in
> +					 * units of the timer
> +					 */
>   	int ai_convert_count;		/* conversion counter */
> -	unsigned int ai_convert_timer;	/* time between conversion in
> -					 * units of the timer */
> -	uint16_t counter_int_enabs;	/* counter interrupt enable mask
> -					 * for MISC2 register */
> +	unsigned int ai_convert_timer;	/*
> +					 * time between conversion in
> +					 * units of the timer
> +					 */
> +	u16 counter_int_enabs;	/*
> +					 * counter interrupt enable mask
> +					 * for MISC2 register
> +					 */
>   	uint8_t adc_items;		/* number of items in ADC poll list */
> -	struct s626_buffer_dma rps_buf;	/* DMA buffer used to hold ADC (RPS1)
> -					 * program */
> -	struct s626_buffer_dma ana_buf;	/* DMA buffer used to receive ADC data
> -					 * and hold DAC data */
> -	uint32_t *dac_wbuf;		/* pointer to logical adrs of DMA buffer
> -					 * used to hold DAC data */
> +	struct s626_buffer_dma rps_buf;	/*
> +					 * DMA buffer used to hold ADC (RPS1)
> +					 * program
> +					 */
> +	struct s626_buffer_dma ana_buf;	/*
> +					 * DMA buffer used to receive ADC data
> +					 * and hold DAC data
> +					 */
> +	u32 *dac_wbuf;		/*
> +					 * pointer to logical adrs of DMA buffer
> +					 * used to hold DAC data
> +					 */
>   	uint16_t dacpol;		/* image of DAC polarity register */
>   	uint8_t trim_setpoint[12];	/* images of TrimDAC setpoints */
> -	uint32_t i2c_adrs;		/* I2C device address for onboard EEPROM
> -					 * (board rev dependent) */
> +	u32 i2c_adrs;		/*
> +					 * I2C device address for onboard EEPROM
> +					 * (board rev dependent)
> +					 */
>   };

There's something weird going on above.  In addition to reformatting the 
comments, it's also replacing the type descriptors of some of the 
members (using `u32` instead of `uint32_t` etc.).  It looks like bits of 
the patches from your earlier series have crept into this one.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

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

* Re: [PATCH 2/2] Staging: comedi: fix type issue in s626.c
  2016-05-17 10:13 ` [PATCH 2/2] Staging: comedi: fix type " Ravishankar Karkala Mallikarjunayya
@ 2016-05-18  9:36   ` Ian Abbott
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Abbott @ 2016-05-18  9:36 UTC (permalink / raw)
  To: Ravishankar Karkala Mallikarjunayya, hsweeten, gregkh; +Cc: devel, linux-kernel

On 17/05/16 11:13, Ravishankar Karkala Mallikarjunayya wrote:
> This is a patch to the s626.c file that fixes up a type issues
> found by the checkpatch.pl tool.
>
> i.e Prefer kernel type 'u8' over 'uint8_t'
>      Prefer kernel type 'u16' over 'uint16_t'
>      Prefer kernel type 'u32' over 'uint32_t'
>      Prefer kernel type 's16' over 'int16_t'
>      Prefer kernel type 's32' over 'int32_t'
>
> Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
> ---
>   drivers/staging/comedi/drivers/s626.c | 152 +++++++++++++++++-----------------
>   1 file changed, 76 insertions(+), 76 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c
> index 0e1f535..c91ed53 100644
> --- a/drivers/staging/comedi/drivers/s626.c
> +++ b/drivers/staging/comedi/drivers/s626.c
> @@ -75,7 +75,7 @@ struct s626_buffer_dma {
>   };
>
>   struct s626_private {
> -	uint8_t ai_cmd_running;		/* ai_cmd is running */
> +	u8 ai_cmd_running;		/* ai_cmd is running */
>   	unsigned int ai_sample_timer;	/*
>   					 * time between samples in
>   					 * units of the timer
> @@ -85,11 +85,11 @@ struct s626_private {
>   					 * time between conversion in
>   					 * units of the timer
>   					 */
> -	uint16_t counter_int_enabs;	/*
> +	u16 counter_int_enabs;		/*
>   					 * counter interrupt enable mask
>   					 * for MISC2 register
>   					 */
> -	uint8_t adc_items;		/* number of items in ADC poll list */
> +	u8 adc_items;			/* number of items in ADC poll list */
>   	struct s626_buffer_dma rps_buf;	/*
>   					 * DMA buffer used to hold ADC (RPS1)
>   					 * program
> @@ -98,13 +98,13 @@ struct s626_private {
>   					 * DMA buffer used to receive ADC data
>   					 * and hold DAC data
>   					 */
> -	uint32_t *dac_wbuf;		/*
> +	u32 *dac_wbuf;			/*
>   					 * pointer to logical adrs of DMA buffer
>   					 * used to hold DAC data
>   					 */
> -	uint16_t dacpol;		/* image of DAC polarity register */
> -	uint8_t trim_setpoint[12];	/* images of TrimDAC setpoints */
> -	uint32_t i2c_adrs;		/*
> +	u16 dacpol;			/* image of DAC polarity register */
> +	u8 trim_setpoint[12];		/* images of TrimDAC setpoints */
> +	u32 i2c_adrs;			/*
>   					 * I2C device address for onboard EEPROM
>   					 * (board rev dependent)
>   					 */

This part of the patch fails to apply after your "[PATCH 1/2] Staging: 
comedi: Fix WARNING issue in s626.c" patch, because that patch already 
changed some of the types of the structure members.

At this point, it's probably best if you start again, and repost an 
updated, and self-consistent, version 2 of your original series of 4 
patches, tagged as "[PATCH v2 1/4]" etc.  At the moment, everything is 
too messed up.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

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

end of thread, other threads:[~2016-05-18  9:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-17 10:13 [PATCH 1/1] Staging: comedi: Fix WARNING issue in dt2801.c Ravishankar Karkala Mallikarjunayya
2016-05-17 10:13 ` [PATCH 1/2] Staging: comedi: Fix WARNING issue in s626.c Ravishankar Karkala Mallikarjunayya
2016-05-18  9:27   ` Ian Abbott
2016-05-17 10:13 ` [PATCH 2/2] Staging: comedi: fix type " Ravishankar Karkala Mallikarjunayya
2016-05-18  9:36   ` Ian Abbott
2016-05-18  8:52 ` [PATCH 1/1] Staging: comedi: Fix WARNING issue in dt2801.c Ian Abbott

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