Skip to contentSkip to conversation

Input: magellan: make static read-only array nibbles const

PATCH New Colin Ian King 1 participant 1 message Jan 23, 2022

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

PATCH 1/1 Input: magellan: make static read-only array nibbles const

The static array nibbles is read-only so it make sense to make it const.

---
 drivers/input/joystick/magellan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/joystick/magellan.c +1 -1
index edb8e1982e26..653a09362a1e 100644
@@ -51,7 +51,7 @@ struct magellan {
 
 static int magellan_crunch_nibbles(unsigned char *data, int count)
 {
-	static unsigned char nibbles[16] = "0AB3D56GH9:K<MN?";
+	static const unsigned char nibbles[16] = "0AB3D56GH9:K<MN?";
 
 	do {
 		if (data[count] == nibbles[data[count] & 0xf])
Signature · 1 line
2.33.1