Commit 9dbc7acd authored by Maximilian Attems's avatar Maximilian Attems Committed by Linus Torvalds

[PATCH] drivers/char/pcxx.c MIN/MAX removal

Signed-off-by: default avatarMaximilian Attems <janitor@sternwelten.at>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a9765660
...@@ -130,7 +130,6 @@ static struct channel *digi_channels; ...@@ -130,7 +130,6 @@ static struct channel *digi_channels;
int pcxx_ncook=sizeof(pcxx_cook); int pcxx_ncook=sizeof(pcxx_cook);
int pcxx_nbios=sizeof(pcxx_bios); int pcxx_nbios=sizeof(pcxx_bios);
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define pcxxassert(x, msg) if(!(x)) pcxx_error(__LINE__, msg) #define pcxxassert(x, msg) if(!(x)) pcxx_error(__LINE__, msg)
#define FEPTIMEOUT 200000 #define FEPTIMEOUT 200000
...@@ -620,7 +619,7 @@ static int pcxe_write(struct tty_struct * tty, int from_user, const unsigned cha ...@@ -620,7 +619,7 @@ static int pcxe_write(struct tty_struct * tty, int from_user, const unsigned cha
tail &= (size - 1); tail &= (size - 1);
stlen = (head >= tail) ? (size - (head - tail) - 1) : (tail - head - 1); stlen = (head >= tail) ? (size - (head - tail) - 1) : (tail - head - 1);
count = MIN(stlen, count); count = min(stlen, count);
memoff(ch); memoff(ch);
restore_flags(flags); restore_flags(flags);
...@@ -652,11 +651,11 @@ static int pcxe_write(struct tty_struct * tty, int from_user, const unsigned cha ...@@ -652,11 +651,11 @@ static int pcxe_write(struct tty_struct * tty, int from_user, const unsigned cha
remain = tail - head - 1; remain = tail - head - 1;
stlen = remain; stlen = remain;
} }
count = MIN(remain, count); count = min(remain, count);
txwinon(ch); txwinon(ch);
while (count > 0) { while (count > 0) {
stlen = MIN(count, stlen); stlen = min(count, stlen);
memcpy(ch->txptr + head, buf, stlen); memcpy(ch->txptr + head, buf, stlen);
buf += stlen; buf += stlen;
count -= stlen; count -= stlen;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment