From: Julien Grall <julien@xen.org>
To: Julien Grall <julien.grall@arm.com>,
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: Sat, 18 Jan 2020 12:58:10 +0000 [thread overview]
Message-ID: <6f83fc13-1d44-43a2-f8ce-347aac443060@xen.org> (raw)
In-Reply-To: <b3742f94-8b53-81bd-cf60-fa41318ac21c@arm.com>
On 09/10/2019 15:56, Julien Grall wrote:
> Hi Artem,
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>
I was going through my todo list and noticed I have never committed this
patch. Apologies for that.
I have committed it with a slight change in the commit title:
"xen/char: scif-uart: Remove useless ASSERT condition"
In the future, please try to add the component in the title :).
Cheers,
>
>> ---
>> 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
next prev parent reply other threads:[~2020-01-18 12:58 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
2020-01-18 12:58 ` Julien Grall [this message]
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=6f83fc13-1d44-43a2-f8ce-347aac443060@xen.org \
--to=julien@xen.org \
--cc=Volodymyr_Babchuk@epam.com \
--cc=artem_mygaiev@epam.com \
--cc=joculator@gmail.com \
--cc=julien.grall@arm.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).