Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 85540
b: refs/heads/master
c: f1cdd63
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt committed Feb 14, 2008
1 parent 03eff73 commit 4649ffb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9109a30e5a548b39463b5a777943cf103da507af
refs/heads/master: f1cdd63fe904869310fefb0361c94c51744eada4
8 changes: 5 additions & 3 deletions trunk/arch/sh/kernel/io_trapped.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit 4649ffb

Please sign in to comment.