Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
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
Commits
73a09e62
Commit
73a09e62
authored
Feb 01, 2006
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] drivers/char/watchdog/sbc_epx_c3.c __user annotations
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
dad08dfc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
drivers/char/watchdog/sbc_epx_c3.c
drivers/char/watchdog/sbc_epx_c3.c
+7
-8
No files found.
drivers/char/watchdog/sbc_epx_c3.c
View file @
73a09e62
...
@@ -92,7 +92,7 @@ static int epx_c3_release(struct inode *inode, struct file *file)
...
@@ -92,7 +92,7 @@ static int epx_c3_release(struct inode *inode, struct file *file)
return
0
;
return
0
;
}
}
static
ssize_t
epx_c3_write
(
struct
file
*
file
,
const
char
*
data
,
static
ssize_t
epx_c3_write
(
struct
file
*
file
,
const
char
__user
*
data
,
size_t
len
,
loff_t
*
ppos
)
size_t
len
,
loff_t
*
ppos
)
{
{
/* Refresh the timer. */
/* Refresh the timer. */
...
@@ -105,6 +105,7 @@ static int epx_c3_ioctl(struct inode *inode, struct file *file,
...
@@ -105,6 +105,7 @@ static int epx_c3_ioctl(struct inode *inode, struct file *file,
unsigned
int
cmd
,
unsigned
long
arg
)
unsigned
int
cmd
,
unsigned
long
arg
)
{
{
int
options
,
retval
=
-
EINVAL
;
int
options
,
retval
=
-
EINVAL
;
int
__user
*
argp
=
(
void
__user
*
)
arg
;
static
struct
watchdog_info
ident
=
{
static
struct
watchdog_info
ident
=
{
.
options
=
WDIOF_KEEPALIVEPING
|
.
options
=
WDIOF_KEEPALIVEPING
|
WDIOF_MAGICCLOSE
,
WDIOF_MAGICCLOSE
,
...
@@ -114,20 +115,19 @@ static int epx_c3_ioctl(struct inode *inode, struct file *file,
...
@@ -114,20 +115,19 @@ static int epx_c3_ioctl(struct inode *inode, struct file *file,
switch
(
cmd
)
{
switch
(
cmd
)
{
case
WDIOC_GETSUPPORT
:
case
WDIOC_GETSUPPORT
:
if
(
copy_to_user
((
struct
watchdog_info
*
)
arg
,
if
(
copy_to_user
(
argp
,
&
ident
,
sizeof
(
ident
)))
&
ident
,
sizeof
(
ident
)))
return
-
EFAULT
;
return
-
EFAULT
;
return
0
;
return
0
;
case
WDIOC_GETSTATUS
:
case
WDIOC_GETSTATUS
:
case
WDIOC_GETBOOTSTATUS
:
case
WDIOC_GETBOOTSTATUS
:
return
put_user
(
0
,
(
int
*
)
arg
);
return
put_user
(
0
,
argp
);
case
WDIOC_KEEPALIVE
:
case
WDIOC_KEEPALIVE
:
epx_c3_pet
();
epx_c3_pet
();
return
0
;
return
0
;
case
WDIOC_GETTIMEOUT
:
case
WDIOC_GETTIMEOUT
:
return
put_user
(
WATCHDOG_TIMEOUT
,
(
int
*
)
arg
);
return
put_user
(
WATCHDOG_TIMEOUT
,
argp
);
case
WDIOC_SETOPTIONS
:
{
case
WDIOC_SETOPTIONS
:
if
(
get_user
(
options
,
(
int
*
)
arg
))
if
(
get_user
(
options
,
argp
))
return
-
EFAULT
;
return
-
EFAULT
;
if
(
options
&
WDIOS_DISABLECARD
)
{
if
(
options
&
WDIOS_DISABLECARD
)
{
...
@@ -141,7 +141,6 @@ static int epx_c3_ioctl(struct inode *inode, struct file *file,
...
@@ -141,7 +141,6 @@ static int epx_c3_ioctl(struct inode *inode, struct file *file,
}
}
return
retval
;
return
retval
;
}
default:
default:
return
-
ENOIOCTLCMD
;
return
-
ENOIOCTLCMD
;
}
}
...
...
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