mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Abbott <abbotti@mev.co.uk>
To: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>,
	hsweeten@visionengravers.com, gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/4] Staging: comedi: fix type issue in s626.c
Date: Fri, 20 May 2016 11:11:23 +0100	[thread overview]
Message-ID: <573EE2CB.5000200@mev.co.uk> (raw)
In-Reply-To: <1463725286-13633-1-git-send-email-ravishankarkm32@gmail.com>

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

      reply	other threads:[~2016-05-20 10:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-20  6:21 Ravishankar Karkala Mallikarjunayya
2016-05-20 10:11 ` Ian Abbott [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=573EE2CB.5000200@mev.co.uk \
    --to=abbotti@mev.co.uk \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hsweeten@visionengravers.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ravishankarkm32@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome