[PATCH] vl: remove dead code from set_memory_options

Lei Chen posted 1 patch 2 years, 1 month ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220303042809.3437373-1-lennychen@tencent.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>
softmmu/vl.c | 4 ----
1 file changed, 4 deletions(-)
[PATCH] vl: remove dead code from set_memory_options
Posted by Lei Chen 2 years, 1 month ago
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