xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Artem Mygaiev <joculator@gmail.com>, xen-devel@lists.xenproject.org
Cc: Artem Mygaiev <artem_mygaiev@epam.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [Xen-devel] [PATCH 2/3] Remove useless ASSERT condition
Date: Wed, 9 Oct 2019 15:56:54 +0100	[thread overview]
Message-ID: <b3742f94-8b53-81bd-cf60-fa41318ac21c@arm.com> (raw)
In-Reply-To: <bfa088ac3fc17b90c2ba953e56294e9b26e8f5cc.1570628924.git.artem_mygaiev@epam.com>

Hi Artem,

On 09/10/2019 15:20, Artem Mygaiev wrote:
> cnt is unsigned, so always >=0
> 
> Coverity-ID: 1381848
> Signed-off-by: Artem Mygaiev <artem_mygaiev@epam.com>

Acked-by: Julien Grall <julien.grall@arm.com>

> ---
>   xen/drivers/char/scif-uart.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/drivers/char/scif-uart.c b/xen/drivers/char/scif-uart.c
> index fa0b8274ca..9d3f66b55b 100644
> --- a/xen/drivers/char/scif-uart.c
> +++ b/xen/drivers/char/scif-uart.c
> @@ -205,7 +205,7 @@ static int scif_uart_tx_ready(struct serial_port *port)
>   
>        /* Check number of data bytes stored in TX FIFO */
>       cnt = scif_readw(uart, SCIF_SCFDR) >> 8;
> -    ASSERT( cnt >= 0 && cnt <= params->fifo_size );
> +    ASSERT( cnt <= params->fifo_size );
>   
>       return (params->fifo_size - cnt);
>   }
> 

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-10-09 14:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-09 14:20 [Xen-devel] [PATCH 0/3] Minor Coverity fixes Artem Mygaiev
2019-10-09 14:20 ` [Xen-devel] [PATCH 1/3] Consistent use for lock variable Artem Mygaiev
2020-01-18 13:09   ` Julien Grall
2019-10-09 14:20 ` [Xen-devel] [PATCH 2/3] Remove useless ASSERT condition Artem Mygaiev
2019-10-09 14:56   ` Julien Grall [this message]
2020-01-18 12:58     ` Julien Grall
2019-10-09 14:20 ` [Xen-devel] [PATCH 3/3] Free allocated resource on error Artem Mygaiev
2019-10-09 15:24   ` Julien Grall

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=b3742f94-8b53-81bd-cf60-fa41318ac21c@arm.com \
    --to=julien.grall@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=artem_mygaiev@epam.com \
    --cc=joculator@gmail.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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 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).