Discussion:
[lm-sensors] [PATCH] hwmon: (lm90) use proper type for update_interval
Wolfram Sang
2016-06-05 07:35:43 UTC
Permalink
The code handles this variable always as unsigned, so adapt the type.

Signed-off-by: Wolfram Sang <***@the-dreams.de>
---

Triggered by a code-checker warning. Only compile tested.

drivers/hwmon/lm90.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index c9ff08dbe10cef..e30a5939dc0d55 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -375,7 +375,7 @@ struct lm90_data {
int kind;
u32 flags;

- int update_interval; /* in milliseconds */
+ unsigned int update_interval; /* in milliseconds */

u8 config_orig; /* Original configuration register value */
u8 convrate_orig; /* Original conversion rate register value */
--
2.8.1
Guenter Roeck
2016-06-08 03:15:17 UTC
Permalink
Post by Wolfram Sang
The code handles this variable always as unsigned, so adapt the type.
Applied.

Thanks,
Guenter

Loading...