Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
f1cdd63f
Commit
f1cdd63f
authored
Feb 09, 2008
by
Paul Mundt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sh: Use max_t in io_trapped.
Signed-off-by:
Paul Mundt
<
lethal@linux-sh.org
>
parent
9109a30e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
arch/sh/kernel/io_trapped.c
arch/sh/kernel/io_trapped.c
+5
-3
No files found.
arch/sh/kernel/io_trapped.c
View file @
f1cdd63f
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment