Skip to contentSkip to conversation

staging: rtl8192u: make const array queuetopipe const, reduces object code size

PATCH New Colin Ian King 1 participant 1 message May 7, 2022

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

PATCH 1/1 staging: rtl8192u: make const array queuetopipe const, reduces object code size

Don't populate the const array queuetopipe on the stack, instead make it static. Also makes the object code smaller.

---
 drivers/staging/rtl8192u/r8192U_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192u/r8192U_core.c +1 -1
index ce807c9d4219..2ca925f35830 100644
@@ -2537,7 +2537,7 @@ static short rtl8192_init(struct net_device *dev)
 	}
 #else
 	{
-		const u8 queuetopipe[] = {3, 2, 1, 0, 4, 4, 0, 4, 4};
+		static const u8 queuetopipe[] = {3, 2, 1, 0, 4, 4, 0, 4, 4};
 
 		memcpy(priv->txqueue_to_outpipemap, queuetopipe, 9);
 	}
Signature · 1 line
2.35.1