lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 20 May 2016 11:11:23 +0100
From:	Ian Abbott <abbotti@....co.uk>
To:	Ravishankar Karkala Mallikarjunayya <ravishankarkm32@...il.com>,
	hsweeten@...ionengravers.com, gregkh@...uxfoundation.org
Cc:	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/4] Staging: comedi: fix type issue in s626.c

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@...il.com>
> ---
> 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@....co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ