All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>,
	linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] [media] hackrf: harmless off by one in debug code
Date: Wed, 24 Sep 2014 10:48:47 +0000	[thread overview]
Message-ID: <5422A18F.9090106@iki.fi> (raw)
In-Reply-To: <20140924103639.GB15107@mwanda>

Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>

Antti

On 09/24/2014 01:36 PM, Dan Carpenter wrote:
> My static checker complains that "i" could be one element beyond the end
> of the array.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/media/usb/hackrf/hackrf.c b/drivers/media/usb/hackrf/hackrf.c
> index 328b5ba..fd1fa41 100644
> --- a/drivers/media/usb/hackrf/hackrf.c
> +++ b/drivers/media/usb/hackrf/hackrf.c
> @@ -932,7 +932,7 @@ static int hackrf_set_bandwidth(struct hackrf_dev *dev)
>   	dev->bandwidth->val = bandwidth;
>   	dev->bandwidth->cur.val = bandwidth;
>
> -	dev_dbg(dev->dev, "bandwidth selected=%d\n", bandwidth_lut[i].freq);
> +	dev_dbg(dev->dev, "bandwidth selected=%d\n", bandwidth);
>
>   	u16tmp = 0;
>   	u16tmp |= ((bandwidth >> 0) & 0xff) << 0;
>

-- 
http://palosaari.fi/

WARNING: multiple messages have this Message-ID (diff)
From: Antti Palosaari <crope@iki.fi>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>,
	linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] [media] hackrf: harmless off by one in debug code
Date: Wed, 24 Sep 2014 13:48:47 +0300	[thread overview]
Message-ID: <5422A18F.9090106@iki.fi> (raw)
In-Reply-To: <20140924103639.GB15107@mwanda>

Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>

Antti

On 09/24/2014 01:36 PM, Dan Carpenter wrote:
> My static checker complains that "i" could be one element beyond the end
> of the array.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/media/usb/hackrf/hackrf.c b/drivers/media/usb/hackrf/hackrf.c
> index 328b5ba..fd1fa41 100644
> --- a/drivers/media/usb/hackrf/hackrf.c
> +++ b/drivers/media/usb/hackrf/hackrf.c
> @@ -932,7 +932,7 @@ static int hackrf_set_bandwidth(struct hackrf_dev *dev)
>   	dev->bandwidth->val = bandwidth;
>   	dev->bandwidth->cur.val = bandwidth;
>
> -	dev_dbg(dev->dev, "bandwidth selected=%d\n", bandwidth_lut[i].freq);
> +	dev_dbg(dev->dev, "bandwidth selected=%d\n", bandwidth);
>
>   	u16tmp = 0;
>   	u16tmp |= ((bandwidth >> 0) & 0xff) << 0;
>

-- 
http://palosaari.fi/

  reply	other threads:[~2014-09-24 10:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-24 10:36 [patch] [media] hackrf: harmless off by one in debug code Dan Carpenter
2014-09-24 10:36 ` Dan Carpenter
2014-09-24 10:48 ` Antti Palosaari [this message]
2014-09-24 10:48   ` Antti Palosaari

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=5422A18F.9090106@iki.fi \
    --to=crope@iki.fi \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    /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.