diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:17:27 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:17:27 -0800 |
| commit | 932f485f76f33b46e302fc390ee8e66529a2e5b4 (patch) | |
| tree | 80745a1b1c96c768c7ea1a2278b99a0b5ec0ab7d /drivers/char/ppdev.c | |
| parent | 7df131525f431f502873361fa2f8da2039d96c79 (diff) | |
v2.4.9.7 -> v2.4.9.8
- Christoph Hellwig: clean up personality handling a bit
- Robert Love: update sysctl/vm documentation
- make the three-argument (that everybody hates) "min()" be "min_t()",
and introduce a type-anal "min()" that complains about arguments of
different types.
Diffstat (limited to 'drivers/char/ppdev.c')
| -rw-r--r-- | drivers/char/ppdev.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c index d4c94cc492f2..8152f7e6b8f7 100644 --- a/drivers/char/ppdev.c +++ b/drivers/char/ppdev.c @@ -118,7 +118,7 @@ static ssize_t pp_read (struct file * file, char * buf, size_t count, return -EINVAL; } - kbuffer = kmalloc(min(unsigned int, count, PP_BUFFER_SIZE), GFP_KERNEL); + kbuffer = kmalloc(min_t(size_t, count, PP_BUFFER_SIZE), GFP_KERNEL); if (!kbuffer) { return -ENOMEM; } @@ -126,7 +126,7 @@ static ssize_t pp_read (struct file * file, char * buf, size_t count, mode = pport->ieee1284.mode & ~(IEEE1284_DEVICEID | IEEE1284_ADDR); while (bytes_read < count) { - ssize_t need = min(unsigned long, count - bytes_read, PP_BUFFER_SIZE); + ssize_t need = min_t(unsigned long, count - bytes_read, PP_BUFFER_SIZE); if (mode == IEEE1284_MODE_EPP) { /* various specials for EPP mode */ @@ -198,7 +198,7 @@ static ssize_t pp_write (struct file * file, const char * buf, size_t count, return -EINVAL; } - kbuffer = kmalloc(min(unsigned int, count, PP_BUFFER_SIZE), GFP_KERNEL); + kbuffer = kmalloc(min_t(size_t, count, PP_BUFFER_SIZE), GFP_KERNEL); if (!kbuffer) { return -ENOMEM; } @@ -206,7 +206,7 @@ static ssize_t pp_write (struct file * file, const char * buf, size_t count, mode = pport->ieee1284.mode & ~(IEEE1284_DEVICEID | IEEE1284_ADDR); while (bytes_written < count) { - ssize_t n = min(unsigned long, count - bytes_written, PP_BUFFER_SIZE); + ssize_t n = min_t(unsigned long, count - bytes_written, PP_BUFFER_SIZE); if (copy_from_user (kbuffer, buf + bytes_written, n)) { bytes_written = -EFAULT; |
