Skip to contentSkip to conversation

staging: unisys: visorbus: variable adjustment should be a u64

PATCH New David Kershner 1 participant 1 message Mar 3, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: unisys: visorbus: variable adjustment should be a u64

This patch fixes the smatch error:

drivers/staging/unisys/visorbus/visorchipset.c:2217 visorchipset_ioctl()
warn: user controlled 'adjustment' cast to postive rl = 's64min-s64max'

This is because we read a s64 and pass it to a function as u64.

---
 drivers/staging/unisys/visorbus/visorchipset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/unisys/visorbus/visorchipset.c +1 -1
index 5515845..5fbda7b 100644
@@ -2248,7 +2248,7 @@ static inline int issue_vmcall_update_physical_time(u64 adjustment)
 static long visorchipset_ioctl(struct file *file, unsigned int cmd,
 			       unsigned long arg)
 {
-	s64 adjustment;
+	u64 adjustment;
 	s64 vrtc_offset;
 
 	switch (cmd) {
Signature · 1 line
1.9.1