Skip to content

Commit 019d80d

Browse files
Antonio Ospitetiwai
authored andcommitted
ALSA: Force a cast to silence a warning from "sparse"
Some audio drivers are calling snd_dma_continuous_data(GFP_KERNEL) which makes "sparse" give a warning: $ make C=2 M=sound/usb modules ... sound/usb/6fire/pcm.c:625:25: warning: cast from restricted gfp_t sound/usb/caiaq/audio.c:845:41: warning: cast from restricted gfp_t sound/usb/usx2y/usbusx2yaudio.c:997:54: warning: cast from restricted gfp_t sound/usb/usx2y/usbusx2yaudio.c:1001:54: warning: cast from restricted gfp_t sound/usb/usx2y/usx2yhwdeppcm.c:774:54: warning: cast from restricted gfp_t sound/usb/usx2y/usx2yhwdeppcm.c:778:54: warning: cast from restricted gfp_t Add __force to the cast to silence the warning. Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 7b2ee29 commit 019d80d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎include/sound/memalloc.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct snd_dma_device {
3737
#ifndef snd_dma_pci_data
3838
#define snd_dma_pci_data(pci) (&(pci)->dev)
3939
#define snd_dma_isa_data() NULL
40-
#define snd_dma_continuous_data(x) ((struct device *)(unsigned long)(x))
40+
#define snd_dma_continuous_data(x) ((struct device *)(__force unsigned long)(x))
4141
#endif
4242

4343

0 commit comments

Comments
 (0)