Skip to contentSkip to conversation

ARM: riscpc: simplify vram_size calculation

PATCH New Ethan Nelson-Moore 1 participant 1 message May 10

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: riscpc: simplify vram_size calculation

The code to calculate vram_size in parse_tag_acorn() is unnecessarily complex and inflexible. Replace it with a simple multiplication.

---
 arch/arm/mach-rpc/riscpc.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
arch/arm/mach-rpc/riscpc.c +1 -10
index bdad13226c6d..14d78b7f9493 100644
@@ -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;
Signature · 1 line
2.43.0