lkml.org 
[lkml]   [2015]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] comedi: ni_6527: Fix coding style - use BIT macro
From
Date
On 14/11/15 13:13, Ranjith Thangavel wrote:
> BIT macro is used for defining BIT location instead of
> shifting operator - coding style issue
>
> Signed-off-by: Ranjith Thangavel <ranjithece24@gmail.com>
> ---
> drivers/staging/comedi/drivers/ni_6527.c | 27 ++++++++++++++-------------
> 1 file changed, 14 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/ni_6527.c b/drivers/staging/comedi/drivers/ni_6527.c
> index b340b98..1903d64 100644
> --- a/drivers/staging/comedi/drivers/ni_6527.c
> +++ b/drivers/staging/comedi/drivers/ni_6527.c
> @@ -32,6 +32,8 @@
>
> #include "../comedi_pci.h"
>
> +#include "comedi_fc.h"
> +

That part seems to have been added in by mistake.

> /*
> * PCI BAR1 - Register memory map
> *
> @@ -52,13 +54,13 @@
> #define NI6527_FILT_ENA_REG(x) (0x0c + (x))
> #define NI6527_STATUS_REG 0x14
> #define NI6527_STATUS_IRQ BIT(2)
> -#define NI6527_STATUS_OVERFLOW BIT(1)
> +#define NI6527_STATUS_OVERFLOW BIT(1)
> #define NI6527_STATUS_EDGE BIT(0)
> #define NI6527_CTRL_REG 0x15
> #define NI6527_CTRL_FALLING BIT(4)
> #define NI6527_CTRL_RISING BIT(3)
> #define NI6527_CTRL_IRQ BIT(2)
> -#define NI6527_CTRL_OVERFLOW BIT(1)
> +#define NI6527_CTRL_OVERFLOW BIT(1)
> #define NI6527_CTRL_EDGE BIT(0)
> #define NI6527_CTRL_DISABLE_IRQS 0
> #define NI6527_CTRL_ENABLE_IRQS (NI6527_CTRL_FALLING | \

That part seems to be based on top of your previous patch that had
whitespace issues.

> @@ -221,11 +223,11 @@ static int ni6527_intr_cmdtest(struct comedi_device *dev,
>
> /* Step 1 : check if triggers are trivially valid */
>
> - err |= comedi_check_trigger_src(&cmd->start_src, TRIG_NOW);
> - err |= comedi_check_trigger_src(&cmd->scan_begin_src, TRIG_OTHER);
> - err |= comedi_check_trigger_src(&cmd->convert_src, TRIG_FOLLOW);
> - err |= comedi_check_trigger_src(&cmd->scan_end_src, TRIG_COUNT);
> - err |= comedi_check_trigger_src(&cmd->stop_src, TRIG_COUNT);
> + err |= cfc_check_trigger_src(&cmd->start_src, TRIG_NOW);
> + err |= cfc_check_trigger_src(&cmd->scan_begin_src, TRIG_OTHER);
> + err |= cfc_check_trigger_src(&cmd->convert_src, TRIG_FOLLOW);
> + err |= cfc_check_trigger_src(&cmd->scan_end_src, TRIG_COUNT);
> + err |= cfc_check_trigger_src(&cmd->stop_src, TRIG_COUNT);
>
> if (err)
> return 1;
> @@ -235,12 +237,11 @@ static int ni6527_intr_cmdtest(struct comedi_device *dev,
>
> /* Step 3: check if arguments are trivially valid */
>
> - err |= comedi_check_trigger_arg_is(&cmd->start_arg, 0);
> - err |= comedi_check_trigger_arg_is(&cmd->scan_begin_arg, 0);
> - err |= comedi_check_trigger_arg_is(&cmd->convert_arg, 0);
> - err |= comedi_check_trigger_arg_is(&cmd->scan_end_arg,
> - cmd->chanlist_len);
> - err |= comedi_check_trigger_arg_is(&cmd->stop_arg, 0);
> + err |= cfc_check_trigger_arg_is(&cmd->start_arg, 0);
> + err |= cfc_check_trigger_arg_is(&cmd->scan_begin_arg, 0);
> + err |= cfc_check_trigger_arg_is(&cmd->convert_arg, 0);
> + err |= cfc_check_trigger_arg_is(&cmd->scan_end_arg, cmd->chanlist_len);
> + err |= cfc_check_trigger_arg_is(&cmd->stop_arg, 0);
>
> if (err)
> return 3;
>

As Dan Carpenter pointed out, this part has been added by mistake.

The parts added by mistake seem to be a throwback to an earlier kernel
version.

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


\
 
 \ /
  Last update: 2015-11-18 17:21    [W:0.055 / U:2.828 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site