stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] staging: comedi: ni_tiocmd:  change mistaken use of start_src for start_arg
       [not found] <56951A9A.8060409@mev.co.uk>
@ 2016-01-12 17:33 ` Spencer E. Olson
  2016-01-12 17:56   ` Ian Abbott
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Spencer E. Olson @ 2016-01-12 17:33 UTC (permalink / raw)
  To: devel
  Cc: Spencer E. Olson, Ian Abbott, H Hartley Sweeten,
	Greg Kroah-Hartman, stable

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")
Cc: <stable@vger.kernel.org> # 3.17+
Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
---
 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(-)

diff --git a/drivers/staging/comedi/drivers/ni_tiocmd.c b/drivers/staging/comedi/drivers/ni_tiocmd.c
index 437f723..823e479 100644
--- a/drivers/staging/comedi/drivers/ni_tiocmd.c
+++ b/drivers/staging/comedi/drivers/ni_tiocmd.c
@@ -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);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] staging: comedi: ni_tiocmd: change mistaken use of start_src for start_arg
  2016-01-12 17:33 ` [PATCH v2] staging: comedi: ni_tiocmd: change mistaken use of start_src for start_arg Spencer E. Olson
@ 2016-01-12 17:56   ` Ian Abbott
       [not found]     ` <CAOx9PeiUWp6DPw+PFKDyZXc1s3kF9pGfhW1oc+JSZ3nGf-5_Mw@mail.gmail.com>
  2016-01-12 22:12   ` Dan Carpenter
  2016-01-13 10:37   ` Ian Abbott
  2 siblings, 1 reply; 6+ messages in thread
From: Ian Abbott @ 2016-01-12 17:56 UTC (permalink / raw)
  To: Spencer E. Olson, devel; +Cc: H Hartley Sweeten, Greg Kroah-Hartman, stable

On 12/01/16 17:33, Spencer E. Olson wrote:
> 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")
> Cc: <stable@vger.kernel.org> # 3.17+
> Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
> ---
>   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.)

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] staging: comedi: ni_tiocmd: change mistaken use of start_src for start_arg
  2016-01-12 17:33 ` [PATCH v2] staging: comedi: ni_tiocmd: change mistaken use of start_src for start_arg Spencer E. Olson
  2016-01-12 17:56   ` Ian Abbott
@ 2016-01-12 22:12   ` Dan Carpenter
  2016-01-13 10:37   ` Ian Abbott
  2 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2016-01-12 22:12 UTC (permalink / raw)
  To: Spencer E. Olson; +Cc: devel, Ian Abbott, stable, Greg Kroah-Hartman

Thanks!

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] staging: comedi: ni_tiocmd: change mistaken use of start_src for start_arg
       [not found]     ` <CAOx9PeiUWp6DPw+PFKDyZXc1s3kF9pGfhW1oc+JSZ3nGf-5_Mw@mail.gmail.com>
@ 2016-01-13 10:36       ` Ian Abbott
  2016-01-13 10:56         ` Dan Carpenter
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Abbott @ 2016-01-13 10:36 UTC (permalink / raw)
  To: Spencer Olson; +Cc: devel, H Hartley Sweeten, Greg Kroah-Hartman, stable

On 12/01/16 18:01, Spencer Olson wrote:
> 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

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] staging: comedi: ni_tiocmd: change mistaken use of start_src for start_arg
  2016-01-12 17:33 ` [PATCH v2] staging: comedi: ni_tiocmd: change mistaken use of start_src for start_arg Spencer E. Olson
  2016-01-12 17:56   ` Ian Abbott
  2016-01-12 22:12   ` Dan Carpenter
@ 2016-01-13 10:37   ` Ian Abbott
  2 siblings, 0 replies; 6+ messages in thread
From: Ian Abbott @ 2016-01-13 10:37 UTC (permalink / raw)
  To: Spencer E. Olson, devel; +Cc: H Hartley Sweeten, Greg Kroah-Hartman, stable

On 12/01/16 17:33, Spencer E. Olson wrote:
> 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")
> Cc: <stable@vger.kernel.org> # 3.17+
> Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
> ---
>   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(-)
>
> diff --git a/drivers/staging/comedi/drivers/ni_tiocmd.c b/drivers/staging/comedi/drivers/ni_tiocmd.c
> index 437f723..823e479 100644
> --- a/drivers/staging/comedi/drivers/ni_tiocmd.c
> +++ b/drivers/staging/comedi/drivers/ni_tiocmd.c
> @@ -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!

Reviewed-by: Ian Abbott <abbotti@mev.co.uk>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] staging: comedi: ni_tiocmd: change mistaken use of start_src for start_arg
  2016-01-13 10:36       ` Ian Abbott
@ 2016-01-13 10:56         ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2016-01-13 10:56 UTC (permalink / raw)
  To: Ian Abbott; +Cc: Spencer Olson, devel, stable, Greg Kroah-Hartman

It doesn't matter much, but I feel it's better to go long.

(The Fixes tag was my invention so I'm an authority on this).

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-13 10:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <56951A9A.8060409@mev.co.uk>
2016-01-12 17:33 ` [PATCH v2] staging: comedi: ni_tiocmd: change mistaken use of start_src for start_arg Spencer E. Olson
2016-01-12 17:56   ` Ian Abbott
     [not found]     ` <CAOx9PeiUWp6DPw+PFKDyZXc1s3kF9pGfhW1oc+JSZ3nGf-5_Mw@mail.gmail.com>
2016-01-13 10:36       ` Ian Abbott
2016-01-13 10:56         ` Dan Carpenter
2016-01-12 22:12   ` Dan Carpenter
2016-01-13 10:37   ` Ian Abbott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).