2015-05-12 21:04:14

by Adrian Remonda

[permalink] [raw]
Subject: [PATCH] Staging: comedi: Removed expression that has no effect

This patch remove a register from an '|' expression.
It is wrong since after in the code, the variable ai_trig gets
written back to that register.


modified: drivers/staging/comedi/drivers/ni_mio_common.c

Signed-off-by: Adrian Remonda <[email protected]>
---
drivers/staging/comedi/drivers/ni_mio_common.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
index c741dde9c0bb..9dfd4e6e6ced 100644
--- a/drivers/staging/comedi/drivers/ni_mio_common.c
+++ b/drivers/staging/comedi/drivers/ni_mio_common.c
@@ -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) +
--
2.1.4


2015-05-12 21:19:13

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] Staging: comedi: Removed expression that has no effect

On Tue, May 12, 2015 at 11:03:52PM +0200, Adrian Remonda wrote:
> This patch remove a register from an '|' expression.
> It is wrong since after in the code, the variable ai_trig gets
> written back to that register.
>
>
> modified: drivers/staging/comedi/drivers/ni_mio_common.c

What does this line mean here?

And Hartley sent a fix for this yesterday, I haven't had a chance to
apply it yet...

thanks,

greg k-h

2015-05-14 13:58:08

by Adrian Remonda

[permalink] [raw]
Subject: Re: [PATCH] Staging: comedi: Removed expression that has no effect

On Tue, May 12, 2015 at 02:19:01PM -0700, Greg Kroah-Hartman wrote:
> On Tue, May 12, 2015 at 11:03:52PM +0200, Adrian Remonda wrote:
> > This patch remove a register from an '|' expression.
> > It is wrong since after in the code, the variable ai_trig gets
> > written back to that register.
> >
> >
> > modified: drivers/staging/comedi/drivers/ni_mio_common.c
>
> What does this line mean here?
>
> And Hartley sent a fix for this yesterday, I haven't had a chance to
> apply it yet...
>
> thanks,
>
> greg k-h

Sorry I did't see that there was a previous fix.