All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: Ian Abbott <abbotti@mev.co.uk>, stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	H Hartley Sweeten <hsweeten@visionengravers.com>
Subject: Re: [PATCH stable 3.9 to 3.16] staging: comedi: quatech_daqp_cs: fix no-op loop daqp_ao_insn_write()
Date: Fri, 09 Nov 2018 23:44:31 +0000	[thread overview]
Message-ID: <a3fb7ad592d7b38a088bca8b8e1ffbcbe7881723.camel@decadent.org.uk> (raw)
In-Reply-To: <20180710170226.23969-1-abbotti@mev.co.uk>

[-- Attachment #1: Type: text/plain, Size: 1553 bytes --]

On Tue, 2018-07-10 at 18:02 +0100, Ian Abbott wrote:
> From: Dan Carpenter <dan.carpenter@oracle.com>
> 
> [ Upstream commit 1376b0a2160319125c3a2822e8c09bd283cd8141 ]
> 
> There is a '>' vs '<' typo so this loop is a no-op.

Thanks, but this driver seems to have lots of other bugs in 3.16, like
it only ever accesses data[0] in this loop.  I don't think there's much
point in applying just this one.  But if you think it's worth fixing
then I can apply all the necessary fixes.

Ben.

> Fixes: d35dcc89fc93 ("staging: comedi: quatech_daqp_cs: fix daqp_ao_insn_write()")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  drivers/staging/comedi/drivers/quatech_daqp_cs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c
> index b3bbec0a0d23..f89a863ea04c 100644
> --- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c
> +++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c
> @@ -649,7 +649,7 @@ static int daqp_ao_insn_write(struct comedi_device *dev,
>  	/* Make sure D/A update mode is direct update */
>  	outb(0, dev->iobase + DAQP_AUX);
>  
> -	for (i = 0; i > insn->n; i++) {
> +	for (i = 0; i < insn->n; i++) {
>  		val = data[0];
>  		val &= 0x0fff;
>  		val ^= 0x0800;		/* Flip the sign */
-- 
Ben Hutchings
Knowledge is power.  France is bacon.



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-11-10  9:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-10 17:02 [PATCH stable 3.9 to 3.16] staging: comedi: quatech_daqp_cs: fix no-op loop daqp_ao_insn_write() Ian Abbott
2018-11-09 23:44 ` Ben Hutchings [this message]
2018-11-12 11:56   ` Ian Abbott
2018-11-12 12:36     ` [PATCH 1/3] staging: comedi: quatech_daqp_cs: fix bug in daqp_ao_insn_write() Ian Abbott
2018-11-12 12:36       ` [PATCH 2/3] staging: comedi: quatech_daqp_cs: use comedi_timeout() in ao (*insn_write) Ian Abbott
2018-11-12 12:36       ` [PATCH 3/3] staging: comedi: quatech_daqp_cs: fix no-op loop daqp_ao_insn_write() Ian Abbott
2019-01-02 17:48     ` [PATCH stable 3.9 to 3.16] " Ben Hutchings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a3fb7ad592d7b38a088bca8b8e1ffbcbe7881723.camel@decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=abbotti@mev.co.uk \
    --cc=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hsweeten@visionengravers.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.