qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Henrique Barboza <danielhb413@gmail.com>
To: qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, danielhb413@gmail.com,
	peter.maydell@linaro.org, "BALATON Zoltan" <balaton@eik.bme.hu>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PULL 1/6] hw/display/sm501: Remove unneeded increment from loop
Date: Fri,  5 May 2023 13:34:39 -0300	[thread overview]
Message-ID: <20230505163444.347006-2-danielhb413@gmail.com> (raw)
In-Reply-To: <20230505163444.347006-1-danielhb413@gmail.com>

From: BALATON Zoltan <balaton@eik.bme.hu>

As Coverity points out (CID 1508621) the calculation to increment i in
the fill fallback loop is ineffective as it is overwritten in next
statement. This was left there by mistake from a previous version but
is not needed in the current approach so remove the superfluous
increment statement.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230405161234.6EF0A74633D@zero.eik.bme.hu>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 hw/display/sm501.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/display/sm501.c b/hw/display/sm501.c
index dbabbc4339..0eecd00701 100644
--- a/hw/display/sm501.c
+++ b/hw/display/sm501.c
@@ -901,7 +901,7 @@ static void sm501_2d_operation(SM501State *s)
             /* fallback when pixman failed or we don't want to call it */
             uint8_t *d = s->local_mem + dst_base;
             unsigned int x, y, i;
-            for (y = 0; y < height; y++, i += dst_pitch * bypp) {
+            for (y = 0; y < height; y++) {
                 i = (dst_x + (dst_y + y) * dst_pitch) * bypp;
                 for (x = 0; x < width; x++, i += bypp) {
                     stn_he_p(&d[i], bypp, color);
-- 
2.40.1



  reply	other threads:[~2023-05-05 16:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05 16:34 [PULL 0/6] ppc queue Daniel Henrique Barboza
2023-05-05 16:34 ` Daniel Henrique Barboza [this message]
2023-05-05 16:34 ` [PULL 2/6] ppc: spapr: cleanup cr get/set with helpers Daniel Henrique Barboza
2023-05-05 16:34 ` [PULL 3/6] MAINTAINERS: Adding myself in the list for ppc/spapr Daniel Henrique Barboza
2023-05-05 16:34 ` [PULL 4/6] tcg: ppc64: Fix mask generation for vextractdm Daniel Henrique Barboza
2023-05-05 16:34 ` [PULL 5/6] tests: tcg: ppc64: Add tests for Vector Extract Mask Instructions Daniel Henrique Barboza
2023-05-05 16:34 ` [PULL 6/6] hw/ppc/Kconfig: NVDIMM is a hard requirement for the pseries machine Daniel Henrique Barboza
2023-05-06  7:10 ` [PULL 0/6] ppc queue Richard Henderson

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=20230505163444.347006-2-danielhb413@gmail.com \
    --to=danielhb413@gmail.com \
    --cc=balaton@eik.bme.hu \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.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).