diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2015-11-18 12:55:06 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-21 18:58:54 -0500 |
commit | 84a185ec429fe64e5b0d81d7ac815c91578ee569 (patch) | |
tree | a68d57f122be395e491688e89fb20b057d932136 | |
parent | ed65bba31bdf038bada04415065b8d9b218b6066 (diff) |
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 <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/comedi_fops.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 94c23484284f..188a12a02ce7 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, | |||
2303 | { | 2303 | { |
2304 | struct comedi_subdevice *s; | 2304 | struct comedi_subdevice *s; |
2305 | struct comedi_async *async; | 2305 | struct comedi_async *async; |
2306 | int n, m, count = 0, retval = 0; | 2306 | unsigned int n, m; |
2307 | ssize_t count = 0; | ||
2308 | int retval = 0; | ||
2307 | DECLARE_WAITQUEUE(wait, current); | 2309 | DECLARE_WAITQUEUE(wait, current); |
2308 | struct comedi_file *cfp = file->private_data; | 2310 | struct comedi_file *cfp = file->private_data; |
2309 | struct comedi_device *dev = cfp->dev; | 2311 | struct comedi_device *dev = cfp->dev; |