Skip to content

Commit

Permalink
ALSA: emu8000: Fix the cast to __user pointer
Browse files Browse the repository at this point in the history
Fixes the sparse warnings.  The cast to __user pointer needs __force:
  sound/isa/sb/emu8000_pcm.c:528:9: warning: cast removes address space '<asn:1>' of expression

No functional changes, just sparse warning fixes.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Feb 10, 2020
1 parent 6a7322d commit f4caf89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/isa/sb/emu8000_pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ enum {
#define LOOP_WRITE(rec, offset, _buf, count, mode) \
do { \
struct snd_emu8000 *emu = (rec)->emu; \
unsigned short *buf = (unsigned short *)(_buf); \
unsigned short *buf = (__force unsigned short *)(_buf); \
snd_emu8000_write_wait(emu, 1); \
EMU8000_SMALW_WRITE(emu, offset); \
while (count > 0) { \
Expand Down Expand Up @@ -492,7 +492,7 @@ static int emu8k_pcm_silence(struct snd_pcm_substream *subs,
#define LOOP_WRITE(rec, pos, _buf, count, mode) \
do { \
struct snd_emu8000 *emu = rec->emu; \
unsigned short *buf = (unsigned short *)(_buf); \
unsigned short *buf = (__force unsigned short *)(_buf); \
snd_emu8000_write_wait(emu, 1); \
EMU8000_SMALW_WRITE(emu, pos + rec->loop_start[0]); \
if (rec->voices > 1) \
Expand Down

0 comments on commit f4caf89

Please sign in to comment.