lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20260208100049.46449-1-trunixcodes@zohomail.com>
Date: Sun,  8 Feb 2026 02:00:49 -0800
From: trunix-creator <trunixcodes@...omail.com>
To: bleung@...omium.org,
	tzungbi@...nel.org
Cc: chrome-platform@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	trunix-creator <trunixcodes@...omail.com>
Subject: [PATCH] platform/chrome: cros_ec_lightbar: fix const correctness of seqname array

The seqname array was declared as 'char const *seqname[]',
And since the array is intended to be fully immutable, It is now corrected
to 'const char * const seqname[]' to mark both the strings and the pointer array as read-only.

This improves const correctness and matches the intended usage of the
sequence name table.

Signed-off-by: trunix-creator <trunixcodes@...omail.com>
---
 drivers/platform/chrome/cros_ec_lightbar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/chrome/cros_ec_lightbar.c b/drivers/platform/chrome/cros_ec_lightbar.c
index 8352e9732791..922758c2cec1 100644
--- a/drivers/platform/chrome/cros_ec_lightbar.c
+++ b/drivers/platform/chrome/cros_ec_lightbar.c
@@ -283,7 +283,7 @@ static ssize_t led_rgb_store(struct device *dev, struct device_attribute *attr,
 	return (ok && i == 0) ? count : -EINVAL;
 }
 
-static char const *seqname[] = {
+static const char * const seqname[] = {
 	"ERROR", "S5", "S3", "S0", "S5S3", "S3S0",
 	"S0S3", "S3S5", "STOP", "RUN", "KONAMI",
 	"TAP", "PROGRAM",
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ