[PATCH] ARM: riscpc: simplify vram_size calculation

Ethan Nelson-Moore posted 1 patch 1 month ago
arch/arm/mach-rpc/riscpc.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
[PATCH] ARM: riscpc: simplify vram_size calculation
Posted by Ethan Nelson-Moore 1 month ago
The code to calculate vram_size in parse_tag_acorn() is unnecessarily
complex and inflexible. Replace it with a simple multiplication.

Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
 arch/arm/mach-rpc/riscpc.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c
index bdad13226c6d..14d78b7f9493 100644
--- a/arch/arm/mach-rpc/riscpc.c
+++ b/arch/arm/mach-rpc/riscpc.c
@@ -43,17 +43,8 @@ static int __init parse_tag_acorn(const struct tag *tag)
 {
 	memc_ctrl_reg = tag->u.acorn.memc_control_reg;
 	number_mfm_drives = tag->u.acorn.adfsdrives;
+	vram_size = tag->u.acorn.vram_pages * PAGE_SIZE;
 
-	switch (tag->u.acorn.vram_pages) {
-	case 512:
-		vram_size += PAGE_SIZE * 256;
-		fallthrough;	/* ??? */
-	case 256:
-		vram_size += PAGE_SIZE * 256;
-		break;
-	default:
-		break;
-	}
 #if 0
 	if (vram_size) {
 		desc->video_start = 0x02000000;
-- 
2.43.0