Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
99573298
Commit
99573298
authored
Oct 26, 2006
by
Russell King
Committed by
Russell King
Oct 28, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] Add __must_check to uaccess functions
Signed-off-by:
Russell King
<
rmk+kernel@arm.linux.org.uk
>
parent
a233bf9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
include/asm-arm/uaccess.h
include/asm-arm/uaccess.h
+10
-10
No files found.
include/asm-arm/uaccess.h
View file @
99573298
...
...
@@ -383,19 +383,19 @@ do { \
#ifdef CONFIG_MMU
extern
unsigned
long
__copy_from_user
(
void
*
to
,
const
void
__user
*
from
,
unsigned
long
n
);
extern
unsigned
long
__copy_to_user
(
void
__user
*
to
,
const
void
*
from
,
unsigned
long
n
);
extern
unsigned
long
__clear_user
(
void
__user
*
addr
,
unsigned
long
n
);
extern
unsigned
long
__
must_check
__
copy_from_user
(
void
*
to
,
const
void
__user
*
from
,
unsigned
long
n
);
extern
unsigned
long
__
must_check
__
copy_to_user
(
void
__user
*
to
,
const
void
*
from
,
unsigned
long
n
);
extern
unsigned
long
__
must_check
__
clear_user
(
void
__user
*
addr
,
unsigned
long
n
);
#else
#define __copy_from_user(to,from,n) (memcpy(to, (void __force *)from, n), 0)
#define __copy_to_user(to,from,n) (memcpy((void __force *)to, from, n), 0)
#define __clear_user(addr,n) (memset((void __force *)addr, 0, n), 0)
#endif
extern
unsigned
long
__strncpy_from_user
(
char
*
to
,
const
char
__user
*
from
,
unsigned
long
count
);
extern
unsigned
long
__strnlen_user
(
const
char
__user
*
s
,
long
n
);
extern
unsigned
long
__
must_check
__
strncpy_from_user
(
char
*
to
,
const
char
__user
*
from
,
unsigned
long
count
);
extern
unsigned
long
__
must_check
__
strnlen_user
(
const
char
__user
*
s
,
long
n
);
static
inline
unsigned
long
copy_from_user
(
void
*
to
,
const
void
__user
*
from
,
unsigned
long
n
)
static
inline
unsigned
long
__must_check
copy_from_user
(
void
*
to
,
const
void
__user
*
from
,
unsigned
long
n
)
{
if
(
access_ok
(
VERIFY_READ
,
from
,
n
))
n
=
__copy_from_user
(
to
,
from
,
n
);
...
...
@@ -404,7 +404,7 @@ static inline unsigned long copy_from_user(void *to, const void __user *from, un
return
n
;
}
static
inline
unsigned
long
copy_to_user
(
void
__user
*
to
,
const
void
*
from
,
unsigned
long
n
)
static
inline
unsigned
long
__must_check
copy_to_user
(
void
__user
*
to
,
const
void
*
from
,
unsigned
long
n
)
{
if
(
access_ok
(
VERIFY_WRITE
,
to
,
n
))
n
=
__copy_to_user
(
to
,
from
,
n
);
...
...
@@ -414,14 +414,14 @@ static inline unsigned long copy_to_user(void __user *to, const void *from, unsi
#define __copy_to_user_inatomic __copy_to_user
#define __copy_from_user_inatomic __copy_from_user
static
inline
unsigned
long
clear_user
(
void
__user
*
to
,
unsigned
long
n
)
static
inline
unsigned
long
__must_check
clear_user
(
void
__user
*
to
,
unsigned
long
n
)
{
if
(
access_ok
(
VERIFY_WRITE
,
to
,
n
))
n
=
__clear_user
(
to
,
n
);
return
n
;
}
static
inline
long
strncpy_from_user
(
char
*
dst
,
const
char
__user
*
src
,
long
count
)
static
inline
long
__must_check
strncpy_from_user
(
char
*
dst
,
const
char
__user
*
src
,
long
count
)
{
long
res
=
-
EFAULT
;
if
(
access_ok
(
VERIFY_READ
,
src
,
1
))
...
...
@@ -431,7 +431,7 @@ static inline long strncpy_from_user(char *dst, const char __user *src, long cou
#define strlen_user(s) strnlen_user(s, ~0UL >> 1)
static
inline
long
strnlen_user
(
const
char
__user
*
s
,
long
n
)
static
inline
long
__must_check
strnlen_user
(
const
char
__user
*
s
,
long
n
)
{
unsigned
long
res
=
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