Skip to contentSkip to conversation

hwmon: lineage-pem: Add missing terminating entry for pem_[input|fan]_attributes

PATCH In review Axel Lin 3 participants 4 messages Mar 14, 2013 Hardware monitoring

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 hwmon: lineage-pem: Add missing terminating entry for pem_[input|fan]_attributes

---
 drivers/hwmon/lineage-pem.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/hwmon/lineage-pem.c +2 -0
index 41df29f..ebbb9f4 100644
@@ -422,6 +422,7 @@ static struct attribute *pem_input_attributes[] = {
 	&sensor_dev_attr_in2_input.dev_attr.attr,
 	&sensor_dev_attr_curr1_input.dev_attr.attr,
 	&sensor_dev_attr_power1_input.dev_attr.attr,
+	NULL
 };
 
 static const struct attribute_group pem_input_group = {
@@ -432,6 +433,7 @@ static struct attribute *pem_fan_attributes[] = {
 	&sensor_dev_attr_fan1_input.dev_attr.attr,
 	&sensor_dev_attr_fan2_input.dev_attr.attr,
 	&sensor_dev_attr_fan3_input.dev_attr.attr,
+	NULL
 };
 
 static const struct attribute_group pem_fan_group = {
Signature · 9 lines
1.7.9.5




_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Acked-by on v1 1/1
#1 lore raw

Hi Axel,

Quoted 18 lines · Axel Lin
---
 drivers/hwmon/lineage-pem.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/hwmon/lineage-pem.c +1 -0
index 41df29f..ebbb9f4 100644
@@ -422,6 +422,7 @@ static struct attribute *pem_input_attributes[] = {
 	&sensor_dev_attr_in2_input.dev_attr.attr,
 	&sensor_dev_attr_curr1_input.dev_attr.attr,
 	&sensor_dev_attr_power1_input.dev_attr.attr,
+	NULL
 };
 
 static const struct attribute_group pem_input_group = {

drivers/hwmon/lineage-pem.c static struct attribute *pem_fan_attributes[] = { · line 439

Quoted 7 lines
drivers/hwmon/lineage-pem.c +1 -0
@@ -432,6 +433,7 @@ static struct attribute *pem_fan_attributes[] = {
 	&sensor_dev_attr_fan1_input.dev_attr.attr,
 	&sensor_dev_attr_fan2_input.dev_attr.attr,
 	&sensor_dev_attr_fan3_input.dev_attr.attr,
+	NULL
 };
 
 static const struct attribute_group pem_fan_group = {

Good catch.

I'll let Guenter pick the fix as this is his driver. This should go to stable too.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
maintainer
#2 lore raw
Quoted 27 lines · Jean Delvare

Hi Axel,

Quoted 24 lines · Axel Lin
---
 drivers/hwmon/lineage-pem.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/hwmon/lineage-pem.c +2 -0
index 41df29f..ebbb9f4 100644
@@ -422,6 +422,7 @@ static struct attribute *pem_input_attributes[] = {
 	&sensor_dev_attr_in2_input.dev_attr.attr,
 	&sensor_dev_attr_curr1_input.dev_attr.attr,
 	&sensor_dev_attr_power1_input.dev_attr.attr,
+	NULL
 };
 
 static const struct attribute_group pem_input_group = {
@@ -432,6 +433,7 @@ static struct attribute *pem_fan_attributes[] = {
 	&sensor_dev_attr_fan1_input.dev_attr.attr,
 	&sensor_dev_attr_fan2_input.dev_attr.attr,
 	&sensor_dev_attr_fan3_input.dev_attr.attr,
+	NULL
 };
 
Quoted 9 lines

drivers/hwmon/lineage-pem.c static struct attribute *pem_fan_attributes[] = { · line 439

Quoted 1 line
drivers/hwmon/lineage-pem.c +0 -0
 static const struct attribute_group pem_fan_group = {

Good catch.

I'll let Guenter pick the fix as this is his driver. This should go to stable too.

Will do. Just wonder why this never blew up in my face, as we use that driver in my previous company :).

Thanks,
Guenter

#3 lore raw
Quoted 32 lines · Guenter Roeck
Quoted 31 lines · Jean Delvare

Hi Axel,

Quoted 18 lines · Axel Lin
---
 drivers/hwmon/lineage-pem.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/hwmon/lineage-pem.c +1 -0
index 41df29f..ebbb9f4 100644
@@ -422,6 +422,7 @@ static struct attribute *pem_input_attributes[] = {
 	&sensor_dev_attr_in2_input.dev_attr.attr,
 	&sensor_dev_attr_curr1_input.dev_attr.attr,
 	&sensor_dev_attr_power1_input.dev_attr.attr,
+	NULL
 };
 
 static const struct attribute_group pem_input_group = {

drivers/hwmon/lineage-pem.c static struct attribute *pem_fan_attributes[] = { · line 439

Quoted 7 lines
drivers/hwmon/lineage-pem.c +1 -0
@@ -432,6 +433,7 @@ static struct attribute *pem_fan_attributes[] = {
 	&sensor_dev_attr_fan1_input.dev_attr.attr,
 	&sensor_dev_attr_fan2_input.dev_attr.attr,
 	&sensor_dev_attr_fan3_input.dev_attr.attr,
+	NULL
 };
 
 static const struct attribute_group pem_fan_group = {

Good catch.

Quoted 7 lines
Quoted 4 lines

I'll let Guenter pick the fix as this is his driver. This should go to stable too.

Will do. Just wonder why this never blew up in my face, as we use that driver in my previous company :).

I've seen it before. I suspect we are saved by the fact that the first member of struct attribute_group is const char *name, which is almost never set in the hwmon drivers.

Signature · 6 lines
Jean Delvare

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