diff options
author | Antonio Ospite <ao2@amarulasolutions.com> | 2013-01-29 06:56:26 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-01-29 09:08:43 -0500 |
commit | 019d80db5727707faa2108fcd4fbbfac9defb3a6 (patch) | |
tree | bc9fe19c941b6f75e906578f561709a8cf700091 | |
parent | 7b2ee291fbd3dbe8079c67fec6382a8ed6c275f7 (diff) |
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>
-rw-r--r-- | include/sound/memalloc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sound/memalloc.h b/include/sound/memalloc.h index 844af65af626..cf15b8213df7 100644 --- a/include/sound/memalloc.h +++ b/include/sound/memalloc.h | |||
@@ -37,7 +37,7 @@ struct snd_dma_device { | |||
37 | #ifndef snd_dma_pci_data | 37 | #ifndef snd_dma_pci_data |
38 | #define snd_dma_pci_data(pci) (&(pci)->dev) | 38 | #define snd_dma_pci_data(pci) (&(pci)->dev) |
39 | #define snd_dma_isa_data() NULL | 39 | #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)) |
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | 43 | ||