mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Input: magellan: make static read-only array nibbles const
@ 2022-01-23 22:41 Colin Ian King
  0 siblings, 0 replies; only message in thread
From: Colin Ian King @ 2022-01-23 22:41 UTC (permalink / raw)
  To: Dmitry Torokhov, linux-input; +Cc: kernel-janitors, linux-kernel

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

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/input/joystick/magellan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/joystick/magellan.c b/drivers/input/joystick/magellan.c
index edb8e1982e26..653a09362a1e 100644
--- a/drivers/input/joystick/magellan.c
+++ b/drivers/input/joystick/magellan.c
@@ -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])
-- 
2.33.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-23 22:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-23 22:41 [PATCH] Input: magellan: make static read-only array nibbles const Colin Ian King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome