From: Elena Afanasova <eafanasova@gmail.com>
To: hare@suse.com, pbonzini@redhat.com, fam@euphon.net,
qemu-block@nongnu.org
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: [PATCH] hw/scsi: remove dead code
Date: Mon, 12 Oct 2020 06:32:42 -0700 [thread overview]
Message-ID: <ea41618a040224242fced25fc3d09d3b1f75a06a.camel@gmail.com> (raw)
Since MEGASAS_MAX_SGE is defined to be 128 the following if statement can be removed.
Spotted by PVS-Studio.
Signed-off-by: Elena Afanasova <eafanasova@gmail.com>
---
hw/scsi/megasas.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index e24c12d7ee..6dcaad55fa 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -2393,8 +2393,6 @@ static void megasas_scsi_realize(PCIDevice *dev, Error **errp)
}
if (s->fw_sge >= MEGASAS_MAX_SGE - MFI_PASS_FRAME_SIZE) {
s->fw_sge = MEGASAS_MAX_SGE - MFI_PASS_FRAME_SIZE;
- } else if (s->fw_sge >= 128 - MFI_PASS_FRAME_SIZE) {
- s->fw_sge = 128 - MFI_PASS_FRAME_SIZE;
} else {
s->fw_sge = 64 - MFI_PASS_FRAME_SIZE;
}
--
2.25.1
next reply other threads:[~2020-10-12 13:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-12 13:32 Elena Afanasova [this message]
2020-10-12 13:35 ` [PATCH] hw/scsi: remove dead code Philippe Mathieu-Daudé
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=ea41618a040224242fced25fc3d09d3b1f75a06a.camel@gmail.com \
--to=eafanasova@gmail.com \
--cc=fam@euphon.net \
--cc=hare@suse.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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).