Skip to contentSkip to conversation

staging: comedi: ni_tiocmd: change mistaken use of start_src for start_arg

PATCH In review Spencer E. Olson 3 participants 6 messages Jan 12, 2016 – Jan 13, 2016 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw

PATCH v2 1/1 staging: comedi: ni_tiocmd: change mistaken use of start_src for start_arg

In reply to a message not in the archive

This fixes a bug in function ni_tio_input_inttrig(). The trigger number should be compared to cmd->start_arg, not cmd->start_src.

Fixes 6a760394d7eb ("staging: comedi: ni_tiocmd: clarify the

cmd->start_arg validation and use")

---
Added description suggested by Ian and Dan. Added Fixes:, CC: tags as suggested by Ian.

 drivers/staging/comedi/drivers/ni_tiocmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/comedi/drivers/ni_tiocmd.c +1 -1
index 437f723..823e479 100644
@@ -92,7 +92,7 @@ static int ni_tio_input_inttrig(struct comedi_device *dev,
 	unsigned long flags;
 	int ret = 0;
 
-	if (trig_num != cmd->start_src)
+	if (trig_num != cmd->start_arg)
 		return -EINVAL;
 
 	spin_lock_irqsave(&counter->lock, flags);
Signature · 1 line
1.9.1
#2 lore raw
Quoted 5 lines · Spencer E. Olson

This fixes a bug in function ni_tio_input_inttrig(). The trigger number should be compared to cmd->start_arg, not cmd->start_src.

Fixes 6a760394d7eb ("staging: comedi: ni_tiocmd: clarify the

cmd->start_arg validation and use")

Quoted 8 lines

---
Added description suggested by Ian and Dan. Added Fixes:, CC: tags as suggested by Ian.

  drivers/staging/comedi/drivers/ni_tiocmd.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

It's okay, except that I don't think you can split the Fixes: line like that. (Maybe you can split it by prefixing the continuation lines with whitespace, but it's easier to grep if it's all on one line, and this is a valid exemption to checkpatch warnings about line lengths in the description.)

Signature · 2 lines
-=( Ian Abbott @ MEV Ltd.    E-mail: <[email protected]> )=-
-=(                          Web: http://www.mev.co.uk/  )=-
#4 lore raw
In reply to a message not in the archive
Quoted 5 lines · Spencer Olson

I looked through commit messages in the repository that also had Fixes:
tags that were long. The ones I looked at were all split. I was going to say everything, but I just noticed that I was looking at some commits from 2014. I don't mind resubmitting if current tools require that or it is better for some other reason...

Yes, you're correct. This command shows quite a few that are presumably split over more than one line:

git log | grep '^ *Fixes: [0-9a-f]* (.*[^)]$' | more

Signature · 2 lines
-=( Ian Abbott @ MEV Ltd.    E-mail: <[email protected]> )=-
-=(                          Web: http://www.mev.co.uk/  )=-
Reviewed-by on v2 1/1
#7 lore raw
In reply to Spencer E. Olson
Quoted 20 lines · Spencer E. Olson

This fixes a bug in function ni_tio_input_inttrig(). The trigger number should be compared to cmd->start_arg, not cmd->start_src.

Fixes 6a760394d7eb ("staging: comedi: ni_tiocmd: clarify the

cmd->start_arg validation and use")

---
Added description suggested by Ian and Dan. Added Fixes:, CC: tags as suggested by Ian.

  drivers/staging/comedi/drivers/ni_tiocmd.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/comedi/drivers/ni_tiocmd.c +0 -0
index 437f723..823e479 100644

drivers/staging/comedi/drivers/ni_tiocmd.c static int ni_tio_input_inttrig(struct comedi_device *dev, · line 98

Quoted 8 lines
drivers/staging/comedi/drivers/ni_tiocmd.c +1 -1
@@ -92,7 +92,7 @@ static int ni_tio_input_inttrig(struct comedi_device *dev,
  	unsigned long flags;
  	int ret = 0;
 
-	if (trig_num != cmd->start_src)
+	if (trig_num != cmd->start_arg)
  		return -EINVAL;
 
  	spin_lock_irqsave(&counter->lock, flags);

Thanks!

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