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
nexedi
linux
Commits
9e220970
Commit
9e220970
authored
Jun 03, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Jun 03, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sparse: lp annotation
parent
3569e846
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
drivers/char/lp.c
drivers/char/lp.c
+8
-8
No files found.
drivers/char/lp.c
View file @
9e220970
...
...
@@ -291,7 +291,7 @@ static int lp_wait_ready(int minor, int nonblock)
return
error
;
}
static
ssize_t
lp_write
(
struct
file
*
file
,
const
char
*
buf
,
static
ssize_t
lp_write
(
struct
file
*
file
,
const
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
unsigned
int
minor
=
iminor
(
file
->
f_dentry
->
d_inode
);
...
...
@@ -407,7 +407,7 @@ static ssize_t lp_write(struct file * file, const char * buf,
#ifdef CONFIG_PARPORT_1284
/* Status readback conforming to ieee1284 */
static
ssize_t
lp_read
(
struct
file
*
file
,
char
*
buf
,
static
ssize_t
lp_read
(
struct
file
*
file
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
unsigned
int
minor
=
iminor
(
file
->
f_dentry
->
d_inode
);
...
...
@@ -560,6 +560,7 @@ static int lp_ioctl(struct inode *inode, struct file *file,
unsigned
int
minor
=
iminor
(
inode
);
int
status
;
int
retval
=
0
;
void
__user
*
argp
=
(
void
__user
*
)
arg
;
#ifdef LP_DEBUG
printk
(
KERN_DEBUG
"lp%d ioctl, cmd: 0x%x, arg: 0x%lx
\n
"
,
minor
,
cmd
,
arg
);
...
...
@@ -603,7 +604,7 @@ static int lp_ioctl(struct inode *inode, struct file *file,
return
-
EINVAL
;
break
;
case
LPGETIRQ
:
if
(
copy_to_user
(
(
int
*
)
arg
,
&
LP_IRQ
(
minor
),
if
(
copy_to_user
(
argp
,
&
LP_IRQ
(
minor
),
sizeof
(
int
)))
return
-
EFAULT
;
break
;
...
...
@@ -612,7 +613,7 @@ static int lp_ioctl(struct inode *inode, struct file *file,
status
=
r_str
(
minor
);
lp_release_parport
(
&
lp_table
[
minor
]);
if
(
copy_to_user
(
(
int
*
)
arg
,
&
status
,
sizeof
(
int
)))
if
(
copy_to_user
(
argp
,
&
status
,
sizeof
(
int
)))
return
-
EFAULT
;
break
;
case
LPRESET
:
...
...
@@ -620,7 +621,7 @@ static int lp_ioctl(struct inode *inode, struct file *file,
break
;
#ifdef LP_STATS
case
LPGETSTATS
:
if
(
copy_to_user
(
(
int
*
)
arg
,
&
LP_STAT
(
minor
),
if
(
copy_to_user
(
argp
,
&
LP_STAT
(
minor
),
sizeof
(
struct
lp_stats
)))
return
-
EFAULT
;
if
(
capable
(
CAP_SYS_ADMIN
))
...
...
@@ -630,13 +631,12 @@ static int lp_ioctl(struct inode *inode, struct file *file,
#endif
case
LPGETFLAGS
:
status
=
LP_F
(
minor
);
if
(
copy_to_user
(
(
int
*
)
arg
,
&
status
,
sizeof
(
int
)))
if
(
copy_to_user
(
argp
,
&
status
,
sizeof
(
int
)))
return
-
EFAULT
;
break
;
case
LPSETTIMEOUT
:
if
(
copy_from_user
(
&
par_timeout
,
(
struct
timeval
*
)
arg
,
if
(
copy_from_user
(
&
par_timeout
,
argp
,
sizeof
(
struct
timeval
)))
{
return
-
EFAULT
;
}
...
...
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