From 4649ffb83b9f677060612ce0d0c6094fa4378f21 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Sat, 9 Feb 2008 19:10:52 +0900 Subject: [PATCH] --- yaml --- r: 85540 b: refs/heads/master c: f1cdd63fe904869310fefb0361c94c51744eada4 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/sh/kernel/io_trapped.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index ef2e7f81d741..3625757d608a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9109a30e5a548b39463b5a777943cf103da507af +refs/heads/master: f1cdd63fe904869310fefb0361c94c51744eada4 diff --git a/trunk/arch/sh/kernel/io_trapped.c b/trunk/arch/sh/kernel/io_trapped.c index 0bfdc9a34e1a..227547bae548 100644 --- a/trunk/arch/sh/kernel/io_trapped.c +++ b/trunk/arch/sh/kernel/io_trapped.c @@ -20,7 +20,6 @@ #include #define TRAPPED_PAGES_MAX 16 -#define MAX(a, b) (((a) >= (b)) ? (a) : (b)) #ifdef CONFIG_HAS_IOPORT LIST_HEAD(trapped_io); @@ -211,7 +210,9 @@ static unsigned long from_device(void *dst, const void *src, unsigned long cnt) if (!src_addr) return cnt; - tmp = copy_word(src_addr, MAX(cnt, (tiop->minimum_bus_width / 8)), + tmp = copy_word(src_addr, + max_t(unsigned long, cnt, + (tiop->minimum_bus_width / 8)), (unsigned long)dst, cnt); pr_debug("trapped io read 0x%08lx -> 0x%08llx\n", src_addr, tmp); @@ -233,7 +234,8 @@ static unsigned long to_device(void *dst, const void *src, unsigned long cnt) return cnt; tmp = copy_word((unsigned long)src, cnt, - dst_addr, MAX(cnt, (tiop->minimum_bus_width / 8))); + dst_addr, max_t(unsigned long, cnt, + (tiop->minimum_bus_width / 8))); pr_debug("trapped io write 0x%08lx -> 0x%08llx\n", dst_addr, tmp); return 0;