* [PATCH] hwmon: (w83795) temp4_type has writable permission
@ 2018-11-15 2:44 Huacai Chen
2018-11-15 5:23 ` Guenter Roeck
2018-11-18 22:41 ` Guenter Roeck
0 siblings, 2 replies; 4+ messages in thread
From: Huacai Chen @ 2018-11-15 2:44 UTC (permalink / raw)
To: Jean Delvare
Cc: Guenter Roeck, linux-hwmon, Fuxin Zhang, Huacai Chen, Yao Wang
Signed-off-by: Yao Wang <wangyao@lemote.com>
Signed-off-by: Huacai Chen <chenhc@lemote.com>
---
drivers/hwmon/w83795.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/w83795.c b/drivers/hwmon/w83795.c
index 49276bb..1bb80f9 100644
--- a/drivers/hwmon/w83795.c
+++ b/drivers/hwmon/w83795.c
@@ -1691,7 +1691,7 @@ store_sf_setup(struct device *dev, struct device_attribute *attr,
* somewhere else in the code
*/
#define SENSOR_ATTR_TEMP(index) { \
- SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 4 ? S_IWUSR : 0), \
+ SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 5 ? S_IWUSR : 0), \
show_temp_mode, store_temp_mode, NOT_USED, index - 1), \
SENSOR_ATTR_2(temp##index##_input, S_IRUGO, show_temp, \
NULL, TEMP_READ, index - 1), \
--
2.7.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] hwmon: (w83795) temp4_type has writable permission
2018-11-15 2:44 [PATCH] hwmon: (w83795) temp4_type has writable permission Huacai Chen
@ 2018-11-15 5:23 ` Guenter Roeck
2018-11-15 8:11 ` 陈华才
2018-11-18 22:41 ` Guenter Roeck
1 sibling, 1 reply; 4+ messages in thread
From: Guenter Roeck @ 2018-11-15 5:23 UTC (permalink / raw)
To: Huacai Chen; +Cc: Jean Delvare, linux-hwmon, Fuxin Zhang, Yao Wang
On Thu, Nov 15, 2018 at 10:44:57AM +0800, Huacai Chen wrote:
> Signed-off-by: Yao Wang <wangyao@lemote.com>
> Signed-off-by: Huacai Chen <chenhc@lemote.com>
Sorry, that really lacks context. Please add some details.
Guenter
> ---
> drivers/hwmon/w83795.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/w83795.c b/drivers/hwmon/w83795.c
> index 49276bb..1bb80f9 100644
> --- a/drivers/hwmon/w83795.c
> +++ b/drivers/hwmon/w83795.c
> @@ -1691,7 +1691,7 @@ store_sf_setup(struct device *dev, struct device_attribute *attr,
> * somewhere else in the code
> */
> #define SENSOR_ATTR_TEMP(index) { \
> - SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 4 ? S_IWUSR : 0), \
> + SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 5 ? S_IWUSR : 0), \
> show_temp_mode, store_temp_mode, NOT_USED, index - 1), \
> SENSOR_ATTR_2(temp##index##_input, S_IRUGO, show_temp, \
> NULL, TEMP_READ, index - 1), \
> --
> 2.7.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] hwmon: (w83795) temp4_type has writable permission
2018-11-15 5:23 ` Guenter Roeck
@ 2018-11-15 8:11 ` 陈华才
0 siblings, 0 replies; 4+ messages in thread
From: 陈华才 @ 2018-11-15 8:11 UTC (permalink / raw)
To: Guenter Roeck; +Cc: Jean Delvare, linux-hwmon, Fuxin Zhang, Yao Wang
Both datasheet and the comments of store_temp_mode() tell us that temp1~4 is writable, so fix it.
Huacai
------------------ Original ------------------
From: "Guenter Roeck"<linux@roeck-us.net>;
Date: Thu, Nov 15, 2018 01:23 PM
To: "Huacai Chen"<chenhc@lemote.com>;
Cc: "Jean Delvare"<jdelvare@suse.com>; "linux-hwmon"<linux-hwmon@vger.kernel.org>; "Fuxin Zhang"<zhangfx@lemote.com>; "Yao Wang"<wangyao@lemote.com>;
Subject: Re: [PATCH] hwmon: (w83795) temp4_type has writable permission
On Thu, Nov 15, 2018 at 10:44:57AM +0800, Huacai Chen wrote:
> Signed-off-by: Yao Wang <wangyao@lemote.com>
> Signed-off-by: Huacai Chen <chenhc@lemote.com>
Sorry, that really lacks context. Please add some details.
Guenter
> ---
> drivers/hwmon/w83795.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/w83795.c b/drivers/hwmon/w83795.c
> index 49276bb..1bb80f9 100644
> --- a/drivers/hwmon/w83795.c
> +++ b/drivers/hwmon/w83795.c
> @@ -1691,7 +1691,7 @@ store_sf_setup(struct device *dev, struct device_attribute *attr,
> * somewhere else in the code
> */
> #define SENSOR_ATTR_TEMP(index) { \
> - SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 4 ? S_IWUSR : 0), \
> + SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 5 ? S_IWUSR : 0), \
> show_temp_mode, store_temp_mode, NOT_USED, index - 1), \
> SENSOR_ATTR_2(temp##index##_input, S_IRUGO, show_temp, \
> NULL, TEMP_READ, index - 1), \
> --
> 2.7.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] hwmon: (w83795) temp4_type has writable permission
2018-11-15 2:44 [PATCH] hwmon: (w83795) temp4_type has writable permission Huacai Chen
2018-11-15 5:23 ` Guenter Roeck
@ 2018-11-18 22:41 ` Guenter Roeck
1 sibling, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2018-11-18 22:41 UTC (permalink / raw)
To: Huacai Chen; +Cc: Jean Delvare, linux-hwmon, Fuxin Zhang, Yao Wang
On Thu, Nov 15, 2018 at 10:44:57AM +0800, Huacai Chen wrote:
> Signed-off-by: Yao Wang <wangyao@lemote.com>
> Signed-off-by: Huacai Chen <chenhc@lemote.com>
Applied, after adding separately sent description / rationale.
For future submission I would kindly suggest to send patches with
complete descriptions.
Thanks,
Guenter
> ---
> drivers/hwmon/w83795.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/w83795.c b/drivers/hwmon/w83795.c
> index 49276bb..1bb80f9 100644
> --- a/drivers/hwmon/w83795.c
> +++ b/drivers/hwmon/w83795.c
> @@ -1691,7 +1691,7 @@ store_sf_setup(struct device *dev, struct device_attribute *attr,
> * somewhere else in the code
> */
> #define SENSOR_ATTR_TEMP(index) { \
> - SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 4 ? S_IWUSR : 0), \
> + SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 5 ? S_IWUSR : 0), \
> show_temp_mode, store_temp_mode, NOT_USED, index - 1), \
> SENSOR_ATTR_2(temp##index##_input, S_IRUGO, show_temp, \
> NULL, TEMP_READ, index - 1), \
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-19 9:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-15 2:44 [PATCH] hwmon: (w83795) temp4_type has writable permission Huacai Chen
2018-11-15 5:23 ` Guenter Roeck
2018-11-15 8:11 ` 陈华才
2018-11-18 22:41 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox