mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Bo Shen <voice.shen@atmel.com>
To: Lucas Stach <dev@lynxeye.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 6/7] i2c: at91: fix invalid length check
Date: Tue, 21 Oct 2014 10:01:10 +0800	[thread overview]
Message-ID: <5445BE66.8020803@atmel.com> (raw)
In-Reply-To: <1413828961-12605-6-git-send-email-dev@lynxeye.de>

Hi Lucas,

On 10/21/2014 02:16 AM, Lucas Stach wrote:
> Signed-off-by: Lucas Stach <dev@lynxeye.de>

Acked-by: Bo Shen <voice.shen@atmel.com>

> ---
>   drivers/i2c/busses/i2c-at91.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c
> index deb4ea4..3a644cf 100644
> --- a/drivers/i2c/busses/i2c-at91.c
> +++ b/drivers/i2c/busses/i2c-at91.c
> @@ -140,7 +140,7 @@ static void at91_calc_twi_clock(struct at91_twi_dev *dev, int twi_clk)
>
>   static void at91_twi_write_next_byte(struct at91_twi_dev *dev)
>   {
> -	if (dev->buf_len <= 0)
> +	if (!dev->buf_len)
>   		return;
>
>   	at91_twi_write(dev, AT91_TWI_THR, *dev->buf);
> @@ -156,7 +156,7 @@ static void at91_twi_write_next_byte(struct at91_twi_dev *dev)
>
>   static void at91_twi_read_next_byte(struct at91_twi_dev *dev)
>   {
> -	if (dev->buf_len <= 0)
> +	if (!dev->buf_len)
>   		return;
>
>   	*dev->buf = at91_twi_read(dev, AT91_TWI_RHR) & 0xff;
>

Best Regards,
Bo Shen


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2014-10-21  2:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20 18:15 [PATCH 1/7] imx: ipu-v3: fix typo leading to build warning Lucas Stach
2014-10-20 18:15 ` [PATCH 2/7] dfu: fix possible usage of uninitialized var Lucas Stach
2014-10-20 18:15 ` [PATCH 3/7] arm: boards: variscite-mx6: check i2c return value Lucas Stach
2014-10-20 18:15 ` [PATCH 4/7] arm: at91: remove unused variable Lucas Stach
2014-10-21  1:56   ` Bo Shen
2014-10-20 18:15 ` [PATCH 5/7] sha2: fix invalid length check Lucas Stach
2014-10-20 21:06   ` Alexander Aring
2014-10-21 11:09     ` Sascha Hauer
2014-10-20 18:16 ` [PATCH 6/7] i2c: at91: " Lucas Stach
2014-10-21  2:01   ` Bo Shen [this message]
2014-10-20 18:16 ` [PATCH 7/7] clk: gate: remove superfluous code Lucas Stach
2014-10-21 11:09 ` [PATCH 1/7] imx: ipu-v3: fix typo leading to build warning Sascha Hauer

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=5445BE66.8020803@atmel.com \
    --to=voice.shen@atmel.com \
    --cc=barebox@lists.infradead.org \
    --cc=dev@lynxeye.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox