Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1253048
| From | Ian Abbott <abbotti@mev.co.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/3] staging: comedi: make ni_tio_has_gate2_registers return boolean |
| Date | 2015-10-21 18:50 +0200 |
| Message-ID | <qm4Km-nt-1@gated-at.bofh.it> (permalink) |
| References | <qkXhT-809-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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/ )=-
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/3] staging: comedi: make ni_tio_has_gate2_registers return boolean Geliang Tang <geliangtang@163.com> - 2015-10-18 16:40 +0200 [PATCH 3/3] staging: xgifb: make XGIfb_has_VB return boolean Geliang Tang <geliangtang@163.com> - 2015-10-18 16:40 +0200 [PATCH 2/3] staging: lustre: make sptlrpc_flavor_has_bulk return boolean Geliang Tang <geliangtang@163.com> - 2015-10-18 16:40 +0200 Re: [PATCH 1/3] staging: comedi: make ni_tio_has_gate2_registers return boolean Ian Abbott <abbotti@mev.co.uk> - 2015-10-21 18:50 +0200
csiph-web