Skip to contentSkip to conversation

drivers: staging: comedi: drivers: ni_mio_common.c: removed no-effect right hand operand

PATCH In review Tolga Ceylan 2 participants 2 messages May 13, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: staging: comedi: drivers: ni_mio_common.c: removed no-effect right hand operand

In ni_ai_cmd() bitwise or construction of ai_trig in case of TRIG_NOW is faulty. Register address is accidentally in the expression, but this has no effect. This is an accidental left-over code that used to call a function with register address as one of the arguments.

---
 drivers/staging/comedi/drivers/ni_mio_common.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/comedi/drivers/ni_mio_common.c +1 -2
index c741dde..9dfd4e6 100644
@@ -2268,8 +2268,7 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 	case TRIG_INT:
 	case TRIG_NOW:
 		ai_trig |= NISTC_AI_TRIG_START1_EDGE |
-			   NISTC_AI_TRIG_START1_SEL(0),
-			   NISTC_AI_TRIG_SEL_REG;
+			   NISTC_AI_TRIG_START1_SEL(0);
 		break;
 	case TRIG_EXT:
 		ai_trig |= NISTC_AI_TRIG_START1_SEL(CR_CHAN(cmd->start_arg) +
Signature · 1 line
2.4.0
#1 lore raw
Quoted 17 lines · Tolga Ceylan

In ni_ai_cmd() bitwise or construction of ai_trig in case of TRIG_NOW is faulty. Register address is accidentally in the expression, but this has no effect. This is an accidental left-over code that used to call a function with register address as one of the arguments.

---
  drivers/staging/comedi/drivers/ni_mio_common.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/comedi/drivers/ni_mio_common.c +0 -0
index c741dde..9dfd4e6 100644

drivers/staging/comedi/drivers/ni_mio_common.c static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) · line 2274

Quoted 9 lines
drivers/staging/comedi/drivers/ni_mio_common.c +1 -2
@@ -2268,8 +2268,7 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
  	case TRIG_INT:
  	case TRIG_NOW:
  		ai_trig |= NISTC_AI_TRIG_START1_EDGE |
-			   NISTC_AI_TRIG_START1_SEL(0),
-			   NISTC_AI_TRIG_SEL_REG;
+			   NISTC_AI_TRIG_START1_SEL(0);
  		break;
  	case TRIG_EXT:
  		ai_trig |= NISTC_AI_TRIG_START1_SEL(CR_CHAN(cmd->start_arg) +

Thanks. The patch is fine, but Hartley has already sent the same fix to <[email protected]>, and Greg was intending to apply that one.

Signature · 2 lines
-=( Ian Abbott @ MEV Ltd.    E-mail: <[email protected]> )=-
-=(                          Web: http://www.mev.co.uk/  )=-