projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e687e8
)
hwmon: (w83793) Clean up a signedness issue
author
Dan Carpenter
<
[email protected]
>
Sat, 19 Oct 2013 09:12:22 +0000
(12:12 +0300)
committer
Guenter Roeck
<
[email protected]
>
Sat, 19 Oct 2013 16:04:25 +0000
(09:04 -0700)
We cap the upper bound of "mtimeout" but since it's signed we should
check for negative values as well. The mistake is harmless. But I have
changed it to unsigned as a cleanup.
Signed-off-by: Dan Carpenter <
[email protected]
>
Signed-off-by: Guenter Roeck <
[email protected]
>
drivers/hwmon/w83793.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/w83793.c
b/drivers/hwmon/w83793.c
index b6470ecda8fc9d9dfa1f841952491689919ca656..9d63d71214cade1cddad0b8bfbbbbae726c4dda5 100644
(file)
--- a/
drivers/hwmon/w83793.c
+++ b/
drivers/hwmon/w83793.c
@@
-1199,7
+1199,8
@@
static void w83793_init_client(struct i2c_client *client)
static int watchdog_set_timeout(struct w83793_data *data, int timeout)
{
- int ret, mtimeout;
+ unsigned int mtimeout;
+ int ret;
mtimeout = DIV_ROUND_UP(timeout, 60);