qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vl: remove dead code from set_memory_options
@ 2022-03-03  4:28 Lei Chen
  0 siblings, 0 replies; only message in thread
From: Lei Chen @ 2022-03-03  4:28 UTC (permalink / raw)
  To: chenlei0x, pbonzini; +Cc: qemu-devel, Lei Chen

ram_size has already been set @sz before if statement, so we can remove
the dead code.

Signed-off-by: Lei Chen <lennychen@tencent.com>
---
 softmmu/vl.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/softmmu/vl.c b/softmmu/vl.c
index 1fe028800f..adacbd7016 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -2105,10 +2105,6 @@ static void set_memory_options(MachineClass *mc)
         sz = mc->fixup_ram_size(sz);
     }
     ram_size = sz;
-    if (ram_size != sz) {
-        error_report("ram size too large");
-        exit(EXIT_FAILURE);
-    }
 
     maxram_size = ram_size;
 
-- 
2.27.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-03  4:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-03  4:28 [PATCH] vl: remove dead code from set_memory_options Lei Chen

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