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
7606f3c8
Commit
7606f3c8
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: sb annotation
sb annotation (both ALSA and OSS drivers)
parent
5a1c7700
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
17 deletions
+20
-17
sound/isa/sb/emu8000_patch.c
sound/isa/sb/emu8000_patch.c
+3
-3
sound/isa/sb/emu8000_pcm.c
sound/isa/sb/emu8000_pcm.c
+2
-2
sound/isa/sb/sb16_csp.c
sound/isa/sb/sb16_csp.c
+10
-10
sound/oss/sb_audio.c
sound/oss/sb_audio.c
+1
-1
sound/oss/sb_common.c
sound/oss/sb_common.c
+4
-1
No files found.
sound/isa/sb/emu8000_patch.c
View file @
7606f3c8
...
@@ -87,14 +87,14 @@ read_word(const void __user *buf, int offset, int mode)
...
@@ -87,14 +87,14 @@ read_word(const void __user *buf, int offset, int mode)
unsigned
short
c
;
unsigned
short
c
;
if
(
mode
&
SNDRV_SFNT_SAMPLE_8BITS
)
{
if
(
mode
&
SNDRV_SFNT_SAMPLE_8BITS
)
{
unsigned
char
cc
;
unsigned
char
cc
;
get_user
(
cc
,
(
unsigned
char
*
)
buf
+
offset
);
get_user
(
cc
,
(
unsigned
char
__user
*
)
buf
+
offset
);
c
=
cc
<<
8
;
/* convert 8bit -> 16bit */
c
=
cc
<<
8
;
/* convert 8bit -> 16bit */
}
else
{
}
else
{
#ifdef SNDRV_LITTLE_ENDIAN
#ifdef SNDRV_LITTLE_ENDIAN
get_user
(
c
,
(
unsigned
short
*
)
buf
+
offset
);
get_user
(
c
,
(
unsigned
short
__user
*
)
buf
+
offset
);
#else
#else
unsigned
short
cc
;
unsigned
short
cc
;
get_user
(
cc
,
(
unsigned
short
*
)
buf
+
offset
);
get_user
(
cc
,
(
unsigned
short
__user
*
)
buf
+
offset
);
c
=
swab16
(
cc
);
c
=
swab16
(
cc
);
#endif
#endif
}
}
...
...
sound/isa/sb/emu8000_pcm.c
View file @
7606f3c8
...
@@ -515,12 +515,12 @@ static int emu8k_pcm_silence(snd_pcm_substream_t *subs,
...
@@ -515,12 +515,12 @@ static int emu8k_pcm_silence(snd_pcm_substream_t *subs,
static
int
emu8k_pcm_copy
(
snd_pcm_substream_t
*
subs
,
static
int
emu8k_pcm_copy
(
snd_pcm_substream_t
*
subs
,
int
voice
,
int
voice
,
snd_pcm_uframes_t
pos
,
snd_pcm_uframes_t
pos
,
void
*
src
,
void
__user
*
src
,
snd_pcm_uframes_t
count
)
snd_pcm_uframes_t
count
)
{
{
emu8k_pcm_t
*
rec
=
subs
->
runtime
->
private_data
;
emu8k_pcm_t
*
rec
=
subs
->
runtime
->
private_data
;
emu8000_t
*
emu
=
rec
->
emu
;
emu8000_t
*
emu
=
rec
->
emu
;
unsigned
short
*
buf
=
src
;
unsigned
short
__user
*
buf
=
src
;
snd_emu8000_write_wait
(
emu
,
1
);
snd_emu8000_write_wait
(
emu
,
1
);
EMU8000_SMALW_WRITE
(
emu
,
pos
+
rec
->
loop_start
[
0
]);
EMU8000_SMALW_WRITE
(
emu
,
pos
+
rec
->
loop_start
[
0
]);
...
...
sound/isa/sb/sb16_csp.c
View file @
7606f3c8
...
@@ -89,9 +89,9 @@ static int read_register(sb_t *chip, unsigned char reg);
...
@@ -89,9 +89,9 @@ static int read_register(sb_t *chip, unsigned char reg);
static
int
set_mode_register
(
sb_t
*
chip
,
unsigned
char
mode
);
static
int
set_mode_register
(
sb_t
*
chip
,
unsigned
char
mode
);
static
int
get_version
(
sb_t
*
chip
);
static
int
get_version
(
sb_t
*
chip
);
static
int
snd_sb_csp_riff_load
(
snd_sb_csp_t
*
p
,
snd_sb_csp_microcode_t
*
code
);
static
int
snd_sb_csp_riff_load
(
snd_sb_csp_t
*
p
,
snd_sb_csp_microcode_t
__user
*
code
);
static
int
snd_sb_csp_unload
(
snd_sb_csp_t
*
p
);
static
int
snd_sb_csp_unload
(
snd_sb_csp_t
*
p
);
static
int
snd_sb_csp_load_user
(
snd_sb_csp_t
*
p
,
const
unsigned
char
*
buf
,
int
size
,
int
load_flags
);
static
int
snd_sb_csp_load_user
(
snd_sb_csp_t
*
p
,
const
unsigned
char
__user
*
buf
,
int
size
,
int
load_flags
);
static
int
snd_sb_csp_autoload
(
snd_sb_csp_t
*
p
,
int
pcm_sfmt
,
int
play_rec_mode
);
static
int
snd_sb_csp_autoload
(
snd_sb_csp_t
*
p
,
int
pcm_sfmt
,
int
play_rec_mode
);
static
int
snd_sb_csp_check_version
(
snd_sb_csp_t
*
p
);
static
int
snd_sb_csp_check_version
(
snd_sb_csp_t
*
p
);
...
@@ -213,7 +213,7 @@ static int snd_sb_csp_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cm
...
@@ -213,7 +213,7 @@ static int snd_sb_csp_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cm
info
.
run_width
=
p
->
run_width
;
info
.
run_width
=
p
->
run_width
;
info
.
version
=
p
->
version
;
info
.
version
=
p
->
version
;
info
.
state
=
p
->
running
;
info
.
state
=
p
->
running
;
if
(
copy_to_user
((
void
*
)
arg
,
&
info
,
sizeof
(
info
)))
if
(
copy_to_user
((
void
__user
*
)
arg
,
&
info
,
sizeof
(
info
)))
err
=
-
EFAULT
;
err
=
-
EFAULT
;
else
else
err
=
0
;
err
=
0
;
...
@@ -222,7 +222,7 @@ static int snd_sb_csp_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cm
...
@@ -222,7 +222,7 @@ static int snd_sb_csp_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cm
/* load CSP microcode */
/* load CSP microcode */
case
SNDRV_SB_CSP_IOCTL_LOAD_CODE
:
case
SNDRV_SB_CSP_IOCTL_LOAD_CODE
:
err
=
(
p
->
running
&
SNDRV_SB_CSP_ST_RUNNING
?
err
=
(
p
->
running
&
SNDRV_SB_CSP_ST_RUNNING
?
-
EBUSY
:
snd_sb_csp_riff_load
(
p
,
(
snd_sb_csp_microcode_t
*
)
arg
));
-
EBUSY
:
snd_sb_csp_riff_load
(
p
,
(
snd_sb_csp_microcode_t
__user
*
)
arg
));
break
;
break
;
case
SNDRV_SB_CSP_IOCTL_UNLOAD_CODE
:
case
SNDRV_SB_CSP_IOCTL_UNLOAD_CODE
:
err
=
(
p
->
running
&
SNDRV_SB_CSP_ST_RUNNING
?
err
=
(
p
->
running
&
SNDRV_SB_CSP_ST_RUNNING
?
...
@@ -231,7 +231,7 @@ static int snd_sb_csp_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cm
...
@@ -231,7 +231,7 @@ static int snd_sb_csp_ioctl(snd_hwdep_t * hw, struct file *file, unsigned int cm
/* change CSP running state */
/* change CSP running state */
case
SNDRV_SB_CSP_IOCTL_START
:
case
SNDRV_SB_CSP_IOCTL_START
:
if
(
copy_from_user
(
&
start_info
,
(
void
*
)
arg
,
sizeof
(
start_info
)))
if
(
copy_from_user
(
&
start_info
,
(
void
__user
*
)
arg
,
sizeof
(
start_info
)))
err
=
-
EFAULT
;
err
=
-
EFAULT
;
else
else
err
=
snd_sb_csp_start
(
p
,
start_info
.
sample_width
,
start_info
.
channels
);
err
=
snd_sb_csp_start
(
p
,
start_info
.
sample_width
,
start_info
.
channels
);
...
@@ -297,11 +297,12 @@ static int snd_sb_csp_unuse(snd_sb_csp_t * p)
...
@@ -297,11 +297,12 @@ static int snd_sb_csp_unuse(snd_sb_csp_t * p)
* load microcode via ioctl:
* load microcode via ioctl:
* code is user-space pointer
* code is user-space pointer
*/
*/
static
int
snd_sb_csp_riff_load
(
snd_sb_csp_t
*
p
,
snd_sb_csp_microcode_t
*
mcode
)
static
int
snd_sb_csp_riff_load
(
snd_sb_csp_t
*
p
,
snd_sb_csp_microcode_t
__user
*
mcode
)
{
{
snd_sb_csp_mc_header_t
info
;
snd_sb_csp_mc_header_t
info
;
unsigned
char
*
data_ptr
,
*
data_end
;
unsigned
char
__user
*
data_ptr
;
unsigned
char
__user
*
data_end
;
unsigned
short
func_nr
=
0
;
unsigned
short
func_nr
=
0
;
riff_header_t
file_h
,
item_h
,
code_h
;
riff_header_t
file_h
,
item_h
,
code_h
;
...
@@ -627,7 +628,6 @@ static int snd_sb_csp_load(snd_sb_csp_t * p, const unsigned char *buf, int size,
...
@@ -627,7 +628,6 @@ static int snd_sb_csp_load(snd_sb_csp_t * p, const unsigned char *buf, int size,
/* Send high byte */
/* Send high byte */
snd_sbdsp_command
(
p
->
chip
,
(
unsigned
char
)((
size
-
1
)
>>
8
));
snd_sbdsp_command
(
p
->
chip
,
(
unsigned
char
)((
size
-
1
)
>>
8
));
/* send microcode sequence */
/* send microcode sequence */
if
(
load_flags
&
SNDRV_SB_CSP_LOAD_FROMUSER
)
/* load from kernel space */
/* load from kernel space */
while
(
size
--
)
{
while
(
size
--
)
{
if
(
!
snd_sbdsp_command
(
p
->
chip
,
*
buf
++
))
if
(
!
snd_sbdsp_command
(
p
->
chip
,
*
buf
++
))
...
@@ -676,7 +676,7 @@ static int snd_sb_csp_load(snd_sb_csp_t * p, const unsigned char *buf, int size,
...
@@ -676,7 +676,7 @@ static int snd_sb_csp_load(snd_sb_csp_t * p, const unsigned char *buf, int size,
return
result
;
return
result
;
}
}
static
int
snd_sb_csp_load_user
(
snd_sb_csp_t
*
p
,
const
unsigned
char
*
buf
,
int
size
,
int
load_flags
)
static
int
snd_sb_csp_load_user
(
snd_sb_csp_t
*
p
,
const
unsigned
char
__user
*
buf
,
int
size
,
int
load_flags
)
{
{
int
err
=
-
ENOMEM
;
int
err
=
-
ENOMEM
;
unsigned
char
*
kbuf
=
kmalloc
(
size
,
GFP_KERNEL
);
unsigned
char
*
kbuf
=
kmalloc
(
size
,
GFP_KERNEL
);
...
...
sound/oss/sb_audio.c
View file @
7606f3c8
...
@@ -836,7 +836,7 @@ static signed short *lbuf16 = (signed short *)lbuf8;
...
@@ -836,7 +836,7 @@ static signed short *lbuf16 = (signed short *)lbuf8;
static
void
static
void
sb16_copy_from_user
(
int
dev
,
sb16_copy_from_user
(
int
dev
,
char
*
localbuf
,
int
localoffs
,
char
*
localbuf
,
int
localoffs
,
const
char
*
userbuf
,
int
useroffs
,
const
char
__user
*
userbuf
,
int
useroffs
,
int
max_in
,
int
max_out
,
int
max_in
,
int
max_out
,
int
*
used
,
int
*
returned
,
int
*
used
,
int
*
returned
,
int
len
)
int
len
)
...
...
sound/oss/sb_common.c
View file @
7606f3c8
...
@@ -943,7 +943,10 @@ void sb_setmixer(sb_devc * devc, unsigned int port, unsigned int value)
...
@@ -943,7 +943,10 @@ void sb_setmixer(sb_devc * devc, unsigned int port, unsigned int value)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
if
(
devc
->
model
==
MDL_ESS
)
return
ess_setmixer
(
devc
,
port
,
value
);
if
(
devc
->
model
==
MDL_ESS
)
{
ess_setmixer
(
devc
,
port
,
value
);
return
;
}
spin_lock_irqsave
(
&
devc
->
lock
,
flags
);
spin_lock_irqsave
(
&
devc
->
lock
,
flags
);
...
...
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