Re: [PATCH v2 1/4] Staging: comedi: fix type issue in s626.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20/05/16 07:21, 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@xxxxxxxxx>
---
Changes since V1:
- Rework
---
  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 c5e0863..6961550e 100644
--- a/drivers/staging/comedi/drivers/s626.c
+++ b/drivers/staging/comedi/drivers/s626.c
[snip]
@@ -516,12 +516,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)

There are quite a few instances of int16_t, uint8_t, uint16_t, and uint32_t that you didn't convert, including the `int16_t dacdata` above.

[snip]
@@ -1935,7 +1935,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. */

The declaration of `u16 setup` starts at the wrong indentation level.

@@ -1948,7 +1948,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);

`u16 value_latchsrc` starts at the wrong indentation level.

[snip]
@@ -2301,7 +2301,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. */

`u16 setup` starts at the wrong indentation level.

[snip]
@@ -2384,7 +2384,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. */

Ditto.

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@xxxxxxxxx> )=-
-=(                          Web: http://www.mev.co.uk/  )=-
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux