All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Stefan Weil <sw@weilnetz.de>, QEMU Trivial <qemu-trivial@nongnu.org>
Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>,
	QEMU Developer <qemu-devel@nongnu.org>
Subject: Re: [Qemu-trivial] [PATCH] target-tricore: Fix check which was always false
Date: Wed, 25 Mar 2015 18:20:00 +0300	[thread overview]
Message-ID: <5512D220.2020303@msgid.tls.msk.ru> (raw)
In-Reply-To: <1426945498-29777-1-git-send-email-sw@weilnetz.de>

21.03.2015 16:44, Stefan Weil wrote:
> With a mask value of 0x00400000, the result will never be 1.
> This fixes a Coverity warning.

Might be a bit risky if the whole thing wasn't a complete no-op.
I wonder maybe the whole this if statement should be removed..

But anyway, applied to -trivial, thank you!

/mjt

> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  target-tricore/op_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target-tricore/op_helper.c b/target-tricore/op_helper.c
> index 0e7b4e8..b7d18b2 100644
> --- a/target-tricore/op_helper.c
> +++ b/target-tricore/op_helper.c
> @@ -2593,7 +2593,7 @@ void helper_rslcx(CPUTriCoreState *env)
>          /* CSU trap */
>      }
>      /* if (PCXI.UL == 1) then trap(CTYP); */
> -    if ((env->PCXI & MASK_PCXI_UL) == 1) {
> +    if ((env->PCXI & MASK_PCXI_UL) != 0) {
>          /* CTYP trap */
>      }
>      /* EA = {PCXI.PCXS, 6'b0, PCXI.PCXO, 6'b0}; */
> 



WARNING: multiple messages have this Message-ID (diff)
From: Michael Tokarev <mjt@tls.msk.ru>
To: Stefan Weil <sw@weilnetz.de>, QEMU Trivial <qemu-trivial@nongnu.org>
Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>,
	QEMU Developer <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] target-tricore: Fix check which was always false
Date: Wed, 25 Mar 2015 18:20:00 +0300	[thread overview]
Message-ID: <5512D220.2020303@msgid.tls.msk.ru> (raw)
In-Reply-To: <1426945498-29777-1-git-send-email-sw@weilnetz.de>

21.03.2015 16:44, Stefan Weil wrote:
> With a mask value of 0x00400000, the result will never be 1.
> This fixes a Coverity warning.

Might be a bit risky if the whole thing wasn't a complete no-op.
I wonder maybe the whole this if statement should be removed..

But anyway, applied to -trivial, thank you!

/mjt

> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  target-tricore/op_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target-tricore/op_helper.c b/target-tricore/op_helper.c
> index 0e7b4e8..b7d18b2 100644
> --- a/target-tricore/op_helper.c
> +++ b/target-tricore/op_helper.c
> @@ -2593,7 +2593,7 @@ void helper_rslcx(CPUTriCoreState *env)
>          /* CSU trap */
>      }
>      /* if (PCXI.UL == 1) then trap(CTYP); */
> -    if ((env->PCXI & MASK_PCXI_UL) == 1) {
> +    if ((env->PCXI & MASK_PCXI_UL) != 0) {
>          /* CTYP trap */
>      }
>      /* EA = {PCXI.PCXS, 6'b0, PCXI.PCXO, 6'b0}; */
> 

  parent reply	other threads:[~2015-03-25 15:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-21 13:44 [Qemu-trivial] [PATCH] target-tricore: Fix check which was always false Stefan Weil
2015-03-21 13:44 ` [Qemu-devel] " Stefan Weil
2015-03-25  8:26 ` [Qemu-trivial] " Bastian Koppelmann
2015-03-25  8:26   ` Bastian Koppelmann
2015-03-25 15:20 ` Michael Tokarev [this message]
2015-03-25 15:20   ` Michael Tokarev
2015-03-25 15:39   ` [Qemu-trivial] " Bastian Koppelmann
2015-03-25 15:39     ` Bastian Koppelmann

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=5512D220.2020303@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=sw@weilnetz.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 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.