From: Ian Abbott Date: Wed, 18 Nov 2015 17:55:06 +0000 (+0000) Subject: staging: comedi: make some variables unsigned in comedi_write() X-Git-Tag: v4.5-rc1~122^2~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=84a185ec429fe64e5b0d81d7ac815c91578ee569;p=platform%2Fkernel%2Flinux-exynos.git staging: comedi: make some variables unsigned in comedi_write() In `comedi_write()`, the `n` and `m` variables are of type `int`. Change them to `unsigned int` as they are used to measure a positive number of bytes. The `count` variable is also of type `int` and holds the returned number of bytes written. Change it to type `ssize_t` to match the function's return type. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 94c2348..188a12a 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -2303,7 +2303,9 @@ static ssize_t comedi_write(struct file *file, const char __user *buf, { struct comedi_subdevice *s; struct comedi_async *async; - int n, m, count = 0, retval = 0; + unsigned int n, m; + ssize_t count = 0; + int retval = 0; DECLARE_WAITQUEUE(wait, current); struct comedi_file *cfp = file->private_data; struct comedi_device *dev = cfp->dev;