linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] hwmon: (it87) Add missing sysfs attribute group terminator
@ 2016-08-29 11:18 Jean Delvare
  2016-08-29 11:33 ` [PATCH 2/2] hwmon: (it87) Drop useless comments Jean Delvare
  2016-08-29 12:30 ` [PATCH 1/2] hwmon: (it87) Add missing sysfs attribute group terminator Guenter Roeck
  0 siblings, 2 replies; 5+ messages in thread
From: Jean Delvare @ 2016-08-29 11:18 UTC (permalink / raw)
  To: linux-hwmon; +Cc: Alexander Kapshuk, Martin Blumenstingl, Guenter Roeck

Attribute array it87_attributes_in lacks its NULL terminator,
causing random behavior when operating on the attribute group.

Fixes: 52929715634a ("hwmon: (it87) Use is_visible for voltage sensors")
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: stable@vger.kernel.org
---
 drivers/hwmon/it87.c |    1 +
 1 file changed, 1 insertion(+)

--- linux-4.7.orig/drivers/hwmon/it87.c	2016-07-04 08:01:00.000000000 +0200
+++ linux-4.7/drivers/hwmon/it87.c	2016-08-29 12:04:52.926911625 +0200
@@ -2015,6 +2015,7 @@ static struct attribute *it87_attributes
 	&sensor_dev_attr_in10_input.dev_attr.attr,	/* 41 */
 	&sensor_dev_attr_in11_input.dev_attr.attr,	/* 41 */
 	&sensor_dev_attr_in12_input.dev_attr.attr,	/* 41 */
+	NULL
 };
 
 static const struct attribute_group it87_group_in = {


-- 
Jean Delvare
SUSE L3 Support

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/2] hwmon: (it87) Drop useless comments
  2016-08-29 11:18 [PATCH 1/2] hwmon: (it87) Add missing sysfs attribute group terminator Jean Delvare
@ 2016-08-29 11:33 ` Jean Delvare
  2016-08-29 12:34   ` Guenter Roeck
  2016-08-29 12:30 ` [PATCH 1/2] hwmon: (it87) Add missing sysfs attribute group terminator Guenter Roeck
  1 sibling, 1 reply; 5+ messages in thread
From: Jean Delvare @ 2016-08-29 11:33 UTC (permalink / raw)
  To: linux-hwmon; +Cc: Martin Blumenstingl, Guenter Roeck

Remove the index comments at the end of it87_attributes_in. They
serve no purpose (as there is no reference to them in
it87_in_is_visible) and some of them were obviously wrong.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Guenter Roeck <linux@roeck-us.net>
---
 drivers/hwmon/it87.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- linux-4.7.orig/drivers/hwmon/it87.c	2016-08-29 12:04:52.926911625 +0200
+++ linux-4.7/drivers/hwmon/it87.c	2016-08-29 13:11:57.311949805 +0200
@@ -2011,10 +2011,10 @@ static struct attribute *it87_attributes
 	&sensor_dev_attr_in7_beep.dev_attr.attr,	/* 39 */
 
 	&sensor_dev_attr_in8_input.dev_attr.attr,	/* 40 */
-	&sensor_dev_attr_in9_input.dev_attr.attr,	/* 41 */
-	&sensor_dev_attr_in10_input.dev_attr.attr,	/* 41 */
-	&sensor_dev_attr_in11_input.dev_attr.attr,	/* 41 */
-	&sensor_dev_attr_in12_input.dev_attr.attr,	/* 41 */
+	&sensor_dev_attr_in9_input.dev_attr.attr,
+	&sensor_dev_attr_in10_input.dev_attr.attr,
+	&sensor_dev_attr_in11_input.dev_attr.attr,
+	&sensor_dev_attr_in12_input.dev_attr.attr,
 	NULL
 };
 

-- 
Jean Delvare
SUSE L3 Support

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] hwmon: (it87) Add missing sysfs attribute group terminator
  2016-08-29 11:18 [PATCH 1/2] hwmon: (it87) Add missing sysfs attribute group terminator Jean Delvare
  2016-08-29 11:33 ` [PATCH 2/2] hwmon: (it87) Drop useless comments Jean Delvare
@ 2016-08-29 12:30 ` Guenter Roeck
  2016-08-29 14:42   ` Alexander Kapshuk
  1 sibling, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2016-08-29 12:30 UTC (permalink / raw)
  To: Jean Delvare; +Cc: linux-hwmon, Alexander Kapshuk, Martin Blumenstingl

On Mon, Aug 29, 2016 at 01:18:23PM +0200, Jean Delvare wrote:
> Attribute array it87_attributes_in lacks its NULL terminator,
> causing random behavior when operating on the attribute group.
> 
> Fixes: 52929715634a ("hwmon: (it87) Use is_visible for voltage sensors")
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: stable@vger.kernel.org

Applied.

Thanks,
Guenter

> ---
>  drivers/hwmon/it87.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> --- linux-4.7.orig/drivers/hwmon/it87.c	2016-07-04 08:01:00.000000000 +0200
> +++ linux-4.7/drivers/hwmon/it87.c	2016-08-29 12:04:52.926911625 +0200
> @@ -2015,6 +2015,7 @@ static struct attribute *it87_attributes
>  	&sensor_dev_attr_in10_input.dev_attr.attr,	/* 41 */
>  	&sensor_dev_attr_in11_input.dev_attr.attr,	/* 41 */
>  	&sensor_dev_attr_in12_input.dev_attr.attr,	/* 41 */
> +	NULL
>  };
>  
>  static const struct attribute_group it87_group_in = {
> 
> 
> -- 
> Jean Delvare
> SUSE L3 Support

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] hwmon: (it87) Drop useless comments
  2016-08-29 11:33 ` [PATCH 2/2] hwmon: (it87) Drop useless comments Jean Delvare
@ 2016-08-29 12:34   ` Guenter Roeck
  0 siblings, 0 replies; 5+ messages in thread
From: Guenter Roeck @ 2016-08-29 12:34 UTC (permalink / raw)
  To: Jean Delvare; +Cc: linux-hwmon, Martin Blumenstingl

On Mon, Aug 29, 2016 at 01:33:29PM +0200, Jean Delvare wrote:
> Remove the index comments at the end of it87_attributes_in. They
> serve no purpose (as there is no reference to them in
> it87_in_is_visible) and some of them were obviously wrong.
> 
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Cc: Guenter Roeck <linux@roeck-us.net>

Applied to -next.

Thanks,
Guenter

> ---
>  drivers/hwmon/it87.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> --- linux-4.7.orig/drivers/hwmon/it87.c	2016-08-29 12:04:52.926911625 +0200
> +++ linux-4.7/drivers/hwmon/it87.c	2016-08-29 13:11:57.311949805 +0200
> @@ -2011,10 +2011,10 @@ static struct attribute *it87_attributes
>  	&sensor_dev_attr_in7_beep.dev_attr.attr,	/* 39 */
>  
>  	&sensor_dev_attr_in8_input.dev_attr.attr,	/* 40 */
> -	&sensor_dev_attr_in9_input.dev_attr.attr,	/* 41 */
> -	&sensor_dev_attr_in10_input.dev_attr.attr,	/* 41 */
> -	&sensor_dev_attr_in11_input.dev_attr.attr,	/* 41 */
> -	&sensor_dev_attr_in12_input.dev_attr.attr,	/* 41 */
> +	&sensor_dev_attr_in9_input.dev_attr.attr,
> +	&sensor_dev_attr_in10_input.dev_attr.attr,
> +	&sensor_dev_attr_in11_input.dev_attr.attr,
> +	&sensor_dev_attr_in12_input.dev_attr.attr,
>  	NULL
>  };
>  
> 
> -- 
> Jean Delvare
> SUSE L3 Support

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] hwmon: (it87) Add missing sysfs attribute group terminator
  2016-08-29 12:30 ` [PATCH 1/2] hwmon: (it87) Add missing sysfs attribute group terminator Guenter Roeck
@ 2016-08-29 14:42   ` Alexander Kapshuk
  0 siblings, 0 replies; 5+ messages in thread
From: Alexander Kapshuk @ 2016-08-29 14:42 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Jean Delvare, linux-hwmon, Martin Blumenstingl

On Mon, Aug 29, 2016 at 3:30 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> On Mon, Aug 29, 2016 at 01:18:23PM +0200, Jean Delvare wrote:
>> Attribute array it87_attributes_in lacks its NULL terminator,
>> causing random behavior when operating on the attribute group.
>>
>> Fixes: 52929715634a ("hwmon: (it87) Use is_visible for voltage sensors")
>> Signed-off-by: Jean Delvare <jdelvare@suse.de>
>> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
>> Cc: Guenter Roeck <linux@roeck-us.net>
>> Cc: stable@vger.kernel.org
>
> Applied.
>
> Thanks,
> Guenter
>
>> ---
>>  drivers/hwmon/it87.c |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> --- linux-4.7.orig/drivers/hwmon/it87.c       2016-07-04 08:01:00.000000000 +0200
>> +++ linux-4.7/drivers/hwmon/it87.c    2016-08-29 12:04:52.926911625 +0200
>> @@ -2015,6 +2015,7 @@ static struct attribute *it87_attributes
>>       &sensor_dev_attr_in10_input.dev_attr.attr,      /* 41 */
>>       &sensor_dev_attr_in11_input.dev_attr.attr,      /* 41 */
>>       &sensor_dev_attr_in12_input.dev_attr.attr,      /* 41 */
>> +     NULL
>>  };
>>
>>  static const struct attribute_group it87_group_in = {
>>
>>
>> --
>> Jean Delvare
>> SUSE L3 Support

Just a quick note to confirm that the above patch does fix the it87.ko
oops issue for me.

Thanks very much.

Alexander.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-08-29 14:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-29 11:18 [PATCH 1/2] hwmon: (it87) Add missing sysfs attribute group terminator Jean Delvare
2016-08-29 11:33 ` [PATCH 2/2] hwmon: (it87) Drop useless comments Jean Delvare
2016-08-29 12:34   ` Guenter Roeck
2016-08-29 12:30 ` [PATCH 1/2] hwmon: (it87) Add missing sysfs attribute group terminator Guenter Roeck
2016-08-29 14:42   ` Alexander Kapshuk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).