Re: [PATCH] comedi: ni_6527: Fix coding style - use BIT macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
  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@xxxxxxxxx> )=-
-=(                          Web: http://www.mev.co.uk/  )=-
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux