Skip to contentSkip to conversation

hwmon: (it87) Constify fixed string arrays

PATCH Superseded Guenter Roeck 2 participants 2 messages Jan 24, 2012

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 78/79 hwmon: (it87) Constify fixed string arrays

From: Guenter Roeck <[email protected]>

Make checkpatch happy by constifying fixed string arrays.

---
 drivers/hwmon/it87.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/hwmon/it87.c +3 -3
index 93a197b..0b204e4 100644
@@ -1341,12 +1341,12 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid_reg, NULL);
 static ssize_t show_label(struct device *dev, struct device_attribute *attr,
 		char *buf)
 {
-	static const char *labels[] = {
+	static const char * const labels[] = {
 		"+5V",
 		"5VSB",
 		"Vbat",
 	};
-	static const char *labels_it8721[] = {
+	static const char * const labels_it8721[] = {
 		"+3.3V",
 		"3VSB",
 		"Vbat",
@@ -1815,7 +1815,7 @@ static int __devinit it87_probe(struct platform_device *pdev)
 	int err = 0, i;
 	int enable_pwm_interface;
 	int fan_beep_need_rw;
-	static const char *names[] = {
+	static const char * const names[] = {
 		"it87",
 		"it8712",
 		"it8716",
Signature · 7 lines
1.7.3.1


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Acked-by on v1 78/79
#1 lore raw
Quoted 30 lines · Guenter Roeck

From: Guenter Roeck <[email protected]>

Make checkpatch happy by constifying fixed string arrays.

---
 drivers/hwmon/it87.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/hwmon/it87.c +2 -2
index 93a197b..0b204e4 100644
@@ -1341,12 +1341,12 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid_reg, NULL);
 static ssize_t show_label(struct device *dev, struct device_attribute *attr,
 		char *buf)
 {
-	static const char *labels[] = {
+	static const char * const labels[] = {
 		"+5V",
 		"5VSB",
 		"Vbat",
 	};
-	static const char *labels_it8721[] = {
+	static const char * const labels_it8721[] = {
 		"+3.3V",
 		"3VSB",
 		"Vbat",

drivers/hwmon/it87.c static int __devinit it87_probe(struct platform_device *pdev) · line 1821

Quoted 8 lines
drivers/hwmon/it87.c +1 -1
@@ -1815,7 +1815,7 @@ static int __devinit it87_probe(struct platform_device *pdev)
 	int err = 0, i;
 	int enable_pwm_interface;
 	int fan_beep_need_rw;
-	static const char *names[] = {
+	static const char * const names[] = {
 		"it87",
 		"it8712",
 		"it8716",

Looks good.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors