summaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2008-02-09 19:10:52 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-02-14 14:22:10 +0900
commitf1cdd63fe904869310fefb0361c94c51744eada4 (patch)
treedbd51dbcddf9317781db3081dc8284ecc4dead51 /arch/sh
parent9109a30e5a548b39463b5a777943cf103da507af (diff)
downloadop-kernel-dev-f1cdd63fe904869310fefb0361c94c51744eada4.zip
op-kernel-dev-f1cdd63fe904869310fefb0361c94c51744eada4.tar.gz
sh: Use max_t in io_trapped.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/kernel/io_trapped.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/sh/kernel/io_trapped.c b/arch/sh/kernel/io_trapped.c
index 0bfdc9a..227547b 100644
--- a/arch/sh/kernel/io_trapped.c
+++ b/arch/sh/kernel/io_trapped.c
@@ -20,7 +20,6 @@
#include <asm/io_trapped.h>
#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;
OpenPOWER on IntegriCloud