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
144b6300
Commit
144b6300
authored
Jun 21, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Jun 21, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sparse: the rest of ieee1394 annotation
parent
bdf69a4f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
16 deletions
+18
-16
drivers/ieee1394/amdtp.c
drivers/ieee1394/amdtp.c
+2
-2
drivers/ieee1394/dv1394.c
drivers/ieee1394/dv1394.c
+6
-5
drivers/ieee1394/video1394.c
drivers/ieee1394/video1394.c
+10
-9
No files found.
drivers/ieee1394/amdtp.c
View file @
144b6300
...
...
@@ -1095,7 +1095,7 @@ void stream_free(struct stream *s)
/* File operations */
static
ssize_t
amdtp_write
(
struct
file
*
file
,
const
char
*
buffer
,
size_t
count
,
static
ssize_t
amdtp_write
(
struct
file
*
file
,
const
char
__user
*
buffer
,
size_t
count
,
loff_t
*
offset_is_ignored
)
{
struct
stream
*
s
=
file
->
private_data
;
...
...
@@ -1150,7 +1150,7 @@ static int amdtp_ioctl(struct inode *inode, struct file *file,
{
case
AMDTP_IOC_PLUG
:
case
AMDTP_IOC_CHANNEL
:
if
(
copy_from_user
(
&
cfg
,
(
struct
amdtp_ioctl
*
)
arg
,
sizeof
cfg
))
if
(
copy_from_user
(
&
cfg
,
(
struct
amdtp_ioctl
__user
*
)
arg
,
sizeof
cfg
))
return
-
EFAULT
;
else
return
stream_configure
(
s
,
cmd
,
&
cfg
);
...
...
drivers/ieee1394/dv1394.c
View file @
144b6300
...
...
@@ -1333,7 +1333,7 @@ static int dv1394_fasync(int fd, struct file *file, int on)
return
0
;
}
static
ssize_t
dv1394_write
(
struct
file
*
file
,
const
char
*
buffer
,
size_t
count
,
loff_t
*
ppos
)
static
ssize_t
dv1394_write
(
struct
file
*
file
,
const
char
__user
*
buffer
,
size_t
count
,
loff_t
*
ppos
)
{
struct
video_card
*
video
=
file_to_video_card
(
file
);
DECLARE_WAITQUEUE
(
wait
,
current
);
...
...
@@ -1430,7 +1430,7 @@ static ssize_t dv1394_write(struct file *file, const char *buffer, size_t count,
}
static
ssize_t
dv1394_read
(
struct
file
*
file
,
char
*
buffer
,
size_t
count
,
loff_t
*
ppos
)
static
ssize_t
dv1394_read
(
struct
file
*
file
,
char
__user
*
buffer
,
size_t
count
,
loff_t
*
ppos
)
{
struct
video_card
*
video
=
file_to_video_card
(
file
);
DECLARE_WAITQUEUE
(
wait
,
current
);
...
...
@@ -1549,6 +1549,7 @@ static int dv1394_ioctl(struct inode *inode, struct file *file,
struct
video_card
*
video
=
file_to_video_card
(
file
);
unsigned
long
flags
;
int
ret
=
-
EINVAL
;
void
__user
*
argp
=
(
void
__user
*
)
arg
;
DECLARE_WAITQUEUE
(
wait
,
current
);
...
...
@@ -1718,10 +1719,10 @@ static int dv1394_ioctl(struct inode *inode, struct file *file,
case
DV1394_IOC_INIT
:
{
struct
dv1394_init
init
;
if
(
arg
==
(
unsigned
long
)
NULL
)
{
if
(
!
argp
)
{
ret
=
do_dv1394_init_default
(
video
);
}
else
{
if
(
copy_from_user
(
&
init
,
(
void
*
)
arg
,
sizeof
(
init
)))
{
if
(
copy_from_user
(
&
init
,
argp
,
sizeof
(
init
)))
{
ret
=
-
EFAULT
;
goto
out
;
}
...
...
@@ -1767,7 +1768,7 @@ static int dv1394_ioctl(struct inode *inode, struct file *file,
spin_unlock_irqrestore
(
&
video
->
spinlock
,
flags
);
if
(
copy_to_user
(
(
void
*
)
arg
,
&
status
,
sizeof
(
status
)))
{
if
(
copy_to_user
(
argp
,
&
status
,
sizeof
(
status
)))
{
ret
=
-
EFAULT
;
goto
out
;
}
...
...
drivers/ieee1394/video1394.c
View file @
144b6300
...
...
@@ -705,6 +705,7 @@ static int video1394_ioctl(struct inode *inode, struct file *file,
struct
file_ctx
*
ctx
=
(
struct
file_ctx
*
)
file
->
private_data
;
struct
ti_ohci
*
ohci
=
ctx
->
ohci
;
unsigned
long
flags
;
void
__user
*
argp
=
(
void
__user
*
)
arg
;
switch
(
cmd
)
{
...
...
@@ -716,7 +717,7 @@ static int video1394_ioctl(struct inode *inode, struct file *file,
struct
dma_iso_ctx
*
d
;
int
i
;
if
(
copy_from_user
(
&
v
,
(
void
*
)
arg
,
sizeof
(
v
)))
if
(
copy_from_user
(
&
v
,
argp
,
sizeof
(
v
)))
return
-
EFAULT
;
/* if channel < 0, find lowest available one */
...
...
@@ -813,7 +814,7 @@ static int video1394_ioctl(struct inode *inode, struct file *file,
v
.
channel
);
}
if
(
copy_to_user
(
(
void
*
)
arg
,
&
v
,
sizeof
(
v
)))
if
(
copy_to_user
(
argp
,
&
v
,
sizeof
(
v
)))
return
-
EFAULT
;
return
0
;
...
...
@@ -825,7 +826,7 @@ static int video1394_ioctl(struct inode *inode, struct file *file,
u64
mask
;
struct
dma_iso_ctx
*
d
;
if
(
copy_from_user
(
&
channel
,
(
void
*
)
arg
,
sizeof
(
int
)))
if
(
copy_from_user
(
&
channel
,
argp
,
sizeof
(
int
)))
return
-
EFAULT
;
if
(
channel
<
0
||
channel
>
(
ISO_CHANNELS
-
1
))
{
...
...
@@ -860,7 +861,7 @@ static int video1394_ioctl(struct inode *inode, struct file *file,
struct
video1394_wait
v
;
struct
dma_iso_ctx
*
d
;
if
(
copy_from_user
(
&
v
,
(
void
*
)
arg
,
sizeof
(
v
)))
if
(
copy_from_user
(
&
v
,
argp
,
sizeof
(
v
)))
return
-
EFAULT
;
d
=
find_ctx
(
&
ctx
->
context_list
,
OHCI_ISO_RECEIVE
,
v
.
channel
);
...
...
@@ -923,7 +924,7 @@ static int video1394_ioctl(struct inode *inode, struct file *file,
struct
dma_iso_ctx
*
d
;
int
i
;
if
(
copy_from_user
(
&
v
,
(
void
*
)
arg
,
sizeof
(
v
)))
if
(
copy_from_user
(
&
v
,
argp
,
sizeof
(
v
)))
return
-
EFAULT
;
d
=
find_ctx
(
&
ctx
->
context_list
,
OHCI_ISO_RECEIVE
,
v
.
channel
);
...
...
@@ -994,7 +995,7 @@ static int video1394_ioctl(struct inode *inode, struct file *file,
spin_unlock_irqrestore
(
&
d
->
lock
,
flags
);
v
.
buffer
=
i
;
if
(
copy_to_user
(
(
void
*
)
arg
,
&
v
,
sizeof
(
v
)))
if
(
copy_to_user
(
argp
,
&
v
,
sizeof
(
v
)))
return
-
EFAULT
;
return
0
;
...
...
@@ -1007,7 +1008,7 @@ static int video1394_ioctl(struct inode *inode, struct file *file,
qv
.
packet_sizes
=
NULL
;
if
(
copy_from_user
(
&
v
,
(
void
*
)
arg
,
sizeof
(
v
)))
if
(
copy_from_user
(
&
v
,
argp
,
sizeof
(
v
)))
return
-
EFAULT
;
d
=
find_ctx
(
&
ctx
->
context_list
,
OHCI_ISO_TRANSMIT
,
v
.
channel
);
...
...
@@ -1023,7 +1024,7 @@ static int video1394_ioctl(struct inode *inode, struct file *file,
unsigned
int
*
psizes
;
int
buf_size
=
d
->
nb_cmd
*
sizeof
(
unsigned
int
);
if
(
copy_from_user
(
&
qv
,
(
void
*
)
arg
,
sizeof
(
qv
)))
if
(
copy_from_user
(
&
qv
,
argp
,
sizeof
(
qv
)))
return
-
EFAULT
;
psizes
=
kmalloc
(
buf_size
,
GFP_KERNEL
);
...
...
@@ -1111,7 +1112,7 @@ static int video1394_ioctl(struct inode *inode, struct file *file,
struct
video1394_wait
v
;
struct
dma_iso_ctx
*
d
;
if
(
copy_from_user
(
&
v
,
(
void
*
)
arg
,
sizeof
(
v
)))
if
(
copy_from_user
(
&
v
,
argp
,
sizeof
(
v
)))
return
-
EFAULT
;
d
=
find_ctx
(
&
ctx
->
context_list
,
OHCI_ISO_TRANSMIT
,
v
.
channel
);
...
...
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