From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755498AbcETKLb (ORCPT ); Fri, 20 May 2016 06:11:31 -0400 Received: from smtp145.dfw.emailsrvr.com ([67.192.241.145]:52447 "EHLO smtp145.dfw.emailsrvr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753111AbcETKLa (ORCPT ); Fri, 20 May 2016 06:11:30 -0400 X-Auth-ID: abbotti@mev.co.uk X-Sender-Id: abbotti@mev.co.uk Subject: Re: [PATCH v2 1/4] Staging: comedi: fix type issue in s626.c To: Ravishankar Karkala Mallikarjunayya , hsweeten@visionengravers.com, gregkh@linuxfoundation.org References: <1463725286-13633-1-git-send-email-ravishankarkm32@gmail.com> Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org From: Ian Abbott Message-ID: <573EE2CB.5000200@mev.co.uk> Date: Fri, 20 May 2016 11:11:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0 MIME-Version: 1.0 In-Reply-To: <1463725286-13633-1-git-send-email-ravishankarkm32@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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: )=- -=( Web: http://www.mev.co.uk/ )=-