mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Abbott <abbotti@mev.co.uk>
To: Geliang Tang <geliangtang@163.com>,
	H Hartley Sweeten <hsweeten@visionengravers.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] staging: comedi: make ni_tio_has_gate2_registers return boolean
Date: Wed, 21 Oct 2015 17:44:01 +0100	[thread overview]
Message-ID: <5627C0D1.7060903@mev.co.uk> (raw)
In-Reply-To: <4e6aedb1c56b20e0a07ca100424860a5c46f1f18.1445178457.git.geliangtang@163.com>

On 18/10/15 15:35, Geliang Tang wrote:
> This patch makes ni_tio_has_gate2_registers return boolean, since
> this function only uses either one or zero as its return value.
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
>   drivers/staging/comedi/drivers/ni_tio.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/ni_tio.c b/drivers/staging/comedi/drivers/ni_tio.c
> index c20c51b..b74e44e 100644
> --- a/drivers/staging/comedi/drivers/ni_tio.c
> +++ b/drivers/staging/comedi/drivers/ni_tio.c
> @@ -167,15 +167,15 @@ static inline unsigned GI_HW_ARM_SEL_MASK(enum ni_gpct_variant variant)
>   	}
>   }
>
> -static int ni_tio_has_gate2_registers(const struct ni_gpct_device *counter_dev)
> +static bool ni_tio_has_gate2_registers(const struct ni_gpct_device *counter_dev)
>   {
>   	switch (counter_dev->variant) {
>   	case ni_gpct_variant_e_series:
>   	default:
> -		return 0;
> +		return false;
>   	case ni_gpct_variant_m_series:
>   	case ni_gpct_variant_660x:
> -		return 1;
> +		return true;
>   	}
>   }
>
>

Looks okay!

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

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

      parent reply	other threads:[~2015-10-21 16:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-18 14:35 Geliang Tang
2015-10-18 14:35 ` [PATCH 2/3] staging: lustre: make sptlrpc_flavor_has_bulk " Geliang Tang
2015-10-18 14:35   ` [PATCH 3/3] staging: xgifb: make XGIfb_has_VB " Geliang Tang
2015-10-21 16:44 ` 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=5627C0D1.7060903@mev.co.uk \
    --to=abbotti@mev.co.uk \
    --cc=devel@driverdev.osuosl.org \
    --cc=geliangtang@163.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hsweeten@visionengravers.com \
    --cc=linux-kernel@vger.kernel.org \
    /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