qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: Jamin Lin <jamin_lin@aspeedtech.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Steven Lee <steven_lee@aspeedtech.com>,
	Troy Lee <leetroy@gmail.com>,
	Andrew Jeffery <andrew@codeconstruct.com.au>,
	Joel Stanley <joel@jms.id.au>,
	"open list:ASPEED BMCs" <qemu-arm@nongnu.org>,
	"open list:All patches CC here" <qemu-devel@nongnu.org>
Cc: troy_lee@aspeedtech.com, yunlin.tang@aspeedtech.com
Subject: Re: [PATCH v1 2/2] aspeed/sdmc: fix coverity issue
Date: Mon, 24 Jun 2024 10:45:26 +0200	[thread overview]
Message-ID: <3b9f1e20-75b0-4192-828d-47e769ef3de9@kaod.org> (raw)
In-Reply-To: <20240619093508.2528537-3-jamin_lin@aspeedtech.com>

On 6/19/24 11:35 AM, Jamin Lin wrote:
> Fix coverity defect: Control flow issues (DEADCODE)

     aspeed/sdmc: Remove extra R_MAIN_STATUS case
     
     Coverity reports that the newly added 'case R_MAIN_STATUS' is DEADCODE
     because it can not be reached. This is because R_MAIN_STATUS is handled
     before in the "Unprotected registers" switch statement. Remove it.
     
     Fixes: Coverity CID 1547112
     
with that,


Reviewed-by: Cédric Le Goater <clg@redhat.com>

Thanks,

C.



> 
> Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
> ---
>   hw/misc/aspeed_sdmc.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/hw/misc/aspeed_sdmc.c b/hw/misc/aspeed_sdmc.c
> index 93e2e29ead..94eed9264d 100644
> --- a/hw/misc/aspeed_sdmc.c
> +++ b/hw/misc/aspeed_sdmc.c
> @@ -589,7 +589,6 @@ static void aspeed_2700_sdmc_write(AspeedSDMCState *s, uint32_t reg,
>       case R_INT_STATUS:
>       case R_INT_CLEAR:
>       case R_INT_MASK:
> -    case R_MAIN_STATUS:
>       case R_ERR_STATUS:
>       case R_ECC_FAIL_STATUS:
>       case R_ECC_FAIL_ADDR:



      reply	other threads:[~2024-06-24  8:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19  9:35 [PATCH v1 0/2] Fix coverity issues for AST2700 Jamin Lin via
2024-06-19  9:35 ` [PATCH v1 1/2] aspeed/soc: fix coverity issue Jamin Lin via
2024-06-24  8:44   ` Cédric Le Goater
2024-06-24 12:18   ` Peter Maydell
2024-06-24 13:58     ` Cédric Le Goater
2024-06-24 14:01       ` Peter Maydell
2024-06-24 14:30         ` Cédric Le Goater
2024-06-25  1:55       ` Jamin Lin
2024-06-25  6:05         ` Cédric Le Goater
2024-06-19  9:35 ` [PATCH v1 2/2] aspeed/sdmc: " Jamin Lin via
2024-06-24  8:45   ` Cédric Le Goater [this message]

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=3b9f1e20-75b0-4192-828d-47e769ef3de9@kaod.org \
    --to=clg@kaod.org \
    --cc=andrew@codeconstruct.com.au \
    --cc=jamin_lin@aspeedtech.com \
    --cc=joel@jms.id.au \
    --cc=leetroy@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=steven_lee@aspeedtech.com \
    --cc=troy_lee@aspeedtech.com \
    --cc=yunlin.tang@aspeedtech.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 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).