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
e3b784cf
Commit
e3b784cf
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: opl annatation
Annotated sound/drivers/opl*
parent
5851bd06
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
sound/drivers/opl3/opl3_synth.c
sound/drivers/opl3/opl3_synth.c
+5
-4
sound/drivers/opl4/opl4_proc.c
sound/drivers/opl4/opl4_proc.c
+2
-2
No files found.
sound/drivers/opl3/opl3_synth.c
View file @
e3b784cf
...
...
@@ -94,6 +94,7 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
unsigned
int
cmd
,
unsigned
long
arg
)
{
opl3_t
*
opl3
=
snd_magic_cast
(
opl3_t
,
hw
->
private_data
,
return
-
ENXIO
);
void
__user
*
argp
=
(
void
__user
*
)
arg
;
snd_assert
(
opl3
!=
NULL
,
return
-
EINVAL
);
...
...
@@ -105,7 +106,7 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
info
.
fm_mode
=
opl3
->
fm_mode
;
info
.
rhythm
=
opl3
->
rhythm
;
if
(
copy_to_user
(
(
snd_dm_fm_info_t
*
)
arg
,
&
info
,
sizeof
(
snd_dm_fm_info_t
)))
if
(
copy_to_user
(
argp
,
&
info
,
sizeof
(
snd_dm_fm_info_t
)))
return
-
EFAULT
;
return
0
;
}
...
...
@@ -123,7 +124,7 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
#endif
{
snd_dm_fm_note_t
note
;
if
(
copy_from_user
(
&
note
,
(
snd_dm_fm_note_t
*
)
arg
,
sizeof
(
snd_dm_fm_note_t
)))
if
(
copy_from_user
(
&
note
,
argp
,
sizeof
(
snd_dm_fm_note_t
)))
return
-
EFAULT
;
return
snd_opl3_play_note
(
opl3
,
&
note
);
}
...
...
@@ -134,7 +135,7 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
#endif
{
snd_dm_fm_voice_t
voice
;
if
(
copy_from_user
(
&
voice
,
(
snd_dm_fm_voice_t
*
)
arg
,
sizeof
(
snd_dm_fm_voice_t
)))
if
(
copy_from_user
(
&
voice
,
argp
,
sizeof
(
snd_dm_fm_voice_t
)))
return
-
EFAULT
;
return
snd_opl3_set_voice
(
opl3
,
&
voice
);
}
...
...
@@ -145,7 +146,7 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
#endif
{
snd_dm_fm_params_t
params
;
if
(
copy_from_user
(
&
params
,
(
snd_dm_fm_params_t
*
)
arg
,
sizeof
(
snd_dm_fm_params_t
)))
if
(
copy_from_user
(
&
params
,
argp
,
sizeof
(
snd_dm_fm_params_t
)))
return
-
EFAULT
;
return
snd_opl3_set_params
(
opl3
,
&
params
);
}
...
...
sound/drivers/opl4/opl4_proc.c
View file @
e3b784cf
...
...
@@ -50,7 +50,7 @@ static int snd_opl4_mem_proc_release(snd_info_entry_t *entry,
}
static
long
snd_opl4_mem_proc_read
(
snd_info_entry_t
*
entry
,
void
*
file_private_data
,
struct
file
*
file
,
char
*
_buf
,
long
count
)
struct
file
*
file
,
char
__user
*
_buf
,
long
count
)
{
opl4_t
*
opl4
=
snd_magic_cast
(
opl4_t
,
entry
->
private_data
,
return
-
ENXIO
);
long
size
;
...
...
@@ -76,7 +76,7 @@ static long snd_opl4_mem_proc_read(snd_info_entry_t *entry, void *file_private_d
}
static
long
snd_opl4_mem_proc_write
(
snd_info_entry_t
*
entry
,
void
*
file_private_data
,
struct
file
*
file
,
const
char
*
_buf
,
long
count
)
struct
file
*
file
,
const
char
__user
*
_buf
,
long
count
)
{
opl4_t
*
opl4
=
snd_magic_cast
(
opl4_t
,
entry
->
private_data
,
return
-
ENXIO
);
long
size
;
...
...
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