Re: [PATCH v2] net: dsa: use DEVICE_ATTR_RW to declare temp1_max

2015-04-17 Thread David Miller
From: Guenter Roeck Date: Fri, 17 Apr 2015 12:40:06 -0700 > On Fri, Apr 17, 2015 at 03:12:25PM -0400, Vivien Didelot wrote: >> Since commit da4759c (sysfs: Use only return value from is_visible for >> the file mode), it is possible to reduce the permissions of a file. >> >> So declare temp1_max

Re: [PATCH v2] net: dsa: use DEVICE_ATTR_RW to declare temp1_max

2015-04-17 Thread Guenter Roeck
On Fri, Apr 17, 2015 at 03:12:25PM -0400, Vivien Didelot wrote: > Since commit da4759c (sysfs: Use only return value from is_visible for > the file mode), it is possible to reduce the permissions of a file. > > So declare temp1_max with the DEVICE_ATTR_RW macro and remove the write > permission

[PATCH v2] net: dsa: use DEVICE_ATTR_RW to declare temp1_max

2015-04-17 Thread Vivien Didelot
Since commit da4759c (sysfs: Use only return value from is_visible for the file mode), it is possible to reduce the permissions of a file. So declare temp1_max with the DEVICE_ATTR_RW macro and remove the write permission in dsa_hwmon_attrs_visible if set_temp_limit isn't provided.

Re: [PATCH v2] net: dsa: use DEVICE_ATTR_RW to declare temp1_max

2015-04-17 Thread Guenter Roeck
On Fri, Apr 17, 2015 at 03:12:25PM -0400, Vivien Didelot wrote: Since commit da4759c (sysfs: Use only return value from is_visible for the file mode), it is possible to reduce the permissions of a file. So declare temp1_max with the DEVICE_ATTR_RW macro and remove the write permission in

[PATCH v2] net: dsa: use DEVICE_ATTR_RW to declare temp1_max

2015-04-17 Thread Vivien Didelot
Since commit da4759c (sysfs: Use only return value from is_visible for the file mode), it is possible to reduce the permissions of a file. So declare temp1_max with the DEVICE_ATTR_RW macro and remove the write permission in dsa_hwmon_attrs_visible if set_temp_limit isn't provided.

Re: [PATCH v2] net: dsa: use DEVICE_ATTR_RW to declare temp1_max

2015-04-17 Thread David Miller
From: Guenter Roeck li...@roeck-us.net Date: Fri, 17 Apr 2015 12:40:06 -0700 On Fri, Apr 17, 2015 at 03:12:25PM -0400, Vivien Didelot wrote: Since commit da4759c (sysfs: Use only return value from is_visible for the file mode), it is possible to reduce the permissions of a file. So declare