Thread (2 messages) 2 messages, 2 authors, 2011-08-08

Re: [PATCH V2] viafb: replace strict_strtoul to kstrto* and check

flat view

From: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Date: 2011-08-08 00:11:11
Also in: lkml

On 08/07/2011 11:42 PM, stufever@gmail.com wrote:
quoted hunk ↗ jump to hunk
diff --git drivers/video/via/viafbdev.c drivers/video/via/viafbdev.c
Um, you did something different this time, causing another (not critical) 
checkpatch warning
WARNING: patch prefix 'drivers' exists, appears to be a -p0 patch
quoted hunk ↗ jump to hunk
@@ -1325,7 +1328,8 @@ static ssize_t viafb_dfpl_proc_write(struct file *file,
  	if (copy_from_user(&buf[0], buffer, length))
  		return -EFAULT;
  	buf[length - 1] = '\0';	/*Ensure end string */
-	strict_strtoul(&buf[0], 0, (unsigned long *)&reg_val);
+	if (kstrtou8(buf, -1,&reg_val)<  0)
Did you miss my comment about the -1 above last time? Why it is there?
quoted hunk ↗ jump to hunk
+		return -EINVAL;
  	viafb_write_reg_mask(CR99, VIACR, reg_val, 0x0f);
  	return count;
  }
Thanks,

Florian Tobias Schandinat
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help