qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/scsi: remove dead code
@ 2020-10-12 13:32 Elena Afanasova
  2020-10-12 13:35 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 2+ messages in thread
From: Elena Afanasova @ 2020-10-12 13:32 UTC (permalink / raw)
  To: hare, pbonzini, fam, qemu-block; +Cc: qemu-trivial, qemu-devel

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




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-12 13:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-12 13:32 [PATCH] hw/scsi: remove dead code Elena Afanasova
2020-10-12 13:35 ` Philippe Mathieu-Daudé

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).